getBaziDetail
Returns the Bazi chart for a date and time and a gender. Exactly one of solarDatetime and lunarDatetime must be supplied, not both.
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.
LABSCO SUMMARY
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 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
USE CASES
Pass the birth moment as either a solar or a lunar datetime, with the gender, and the chart comes back computed rather than reasoned about. Supplying both datetimes is rejected instead of one being picked for you.
Given a Bazi, the reverse conversion lists the solar datetimes that produce it, formatted YYYY-MM-DD hh:mm:ss — the case where the chart is known and the birth record is not.
Ask for the Chinese almanac entry for any solar date, or leave the date out for today's.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
getBaziDetailReturns the Bazi chart for a date and time and a gender. Exactly one of solarDatetime and lunarDatetime must be supplied, not both.
getChineseCalendarReturns the Chinese almanac entry for a solar date, defaulting to today.
getSolarTimesReturns the list of solar datetimes matching a given Bazi, formatted YYYY-MM-DD hh:mm:ss.
BEFORE YOU INSTALL
3 tools when we connected. getBaziDetail takes solarDatetime or lunarDatetime, an optional gender (0 female, 1 male, default 1) and eightCharProviderSect for the 23:00–23:59 day-pillar convention (default 2).
Node.js 22 or above
The documented client runs the server on your machine.
CONTEXT COST
Rated by the size of the 3 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx bazi-mcp{
"mcpServers": {
"Bazi": {
"command": "npx",
"args": [
"bazi-mcp"
]
}
}
}