Labsco
MCP SERVER

Bazi MCP

by cantian-ai

Turn a birth date and time into a Bazi chart, run the conversion backwards from a chart to the solar times that produce it, and read the Chinese almanac for any date.

Time, Dates & CalculationVerified
Summary
The calendar arithmetic happens before the model sees it.

Asking a language model to derive a Bazi from a birth time invites it to guess; here the conversion is a function call, and getSolarTimes runs the same conversion in the other direction to list every solar datetime a given chart maps to. The interface is strict where it matters — a chart request takes solarDatetime or lunarDatetime, and passing both is refused rather than resolved silently.

What it is

A calculator for Chinese calendrical work: three tools converting between solar and lunar datetimes, Bazi charts, and almanac entries.

What you get
  • A Bazi chart from a datetime and gender, accepting either solarDatetime or lunarDatetime — exactly one of the two, not both
  • The reverse conversion: given a Bazi, the list of solar datetimes that produce it, returned as YYYY-MM-DD hh:mm:ss
  • The Chinese almanac entry for a solar date, defaulting to today
Requirements

A Node runtime. No account and no key are configured for it, and the three tools take only dates, a gender and a chart. ISC-licensed.

Setup effort

One command — npx bazi-mcp