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.
A calculator for Chinese calendrical work: three tools converting between solar and lunar datetimes, Bazi charts, and almanac entries.
- 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
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.
One command — npx bazi-mcp
