Bazi MCP
An MCP server that calculates a Bazi chart from a birth date and returns the Chinese almanac, with no guessing of characters
- 437 ★ on the repository
- Last commit
- ISC
Extended access
Why this level
- An npm package runs on your machine; no keys or accounts are needed
- In HTTP mode the server accepts requests at /mcp with no access check
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/bazi-mcpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- An npm package runs on your machine; no keys or accounts are needed
- In HTTP mode the server accepts requests at /mcp with no access check
This is third-party code. Review the repository files before installing.
What it does
Bazi MCP calculates a Bazi chart from a solar or lunar birth date and time. There are four pillars: year, month, day and hour. For each pillar the response carries the element, yin or yang, hidden stems with the ten gods relation, the nayin sound, the ten-day cycle and the void. The shared part adds the zodiac animal, lists of symbolic stars per pillar and a table of ten-year periods with the starting age. Two more tools work around that calculation. getSolarTimes takes a four-pillar string and returns the possible solar dates: for 戊寅 己未 己卯 辛未 these are 1758, 1818 and 1998. getChineseCalendar returns an almanac for a given day, today by default: the lunar date, stems and branches, the solar term, the lunar mansion, the directions of the gods of wealth and happiness, and lists of suitable and unsuitable activities. The answer arrives as a JSON object with Chinese keys and values, and the agent paraphrases it. The server runs the calculation on calendar libraries; interpretation and conclusions are left to the model.
Who it is for. For developers and fans of Chinese metaphysics who wire Bazi calculation into Claude Desktop or another MCP client and want ready data from a birth date.
Good fit when
- You need a Bazi chart from a birth date in ISO format with a time zone, for example 2000-05-15T12:00:00+08:00
- The birth date is known in the lunar calendar: pass lunarDatetime instead of a solar date
- You only have a four-pillar string and want the solar dates it matches
- You need an almanac for today or a given day: directions, the lunar mansion, lists of suitable and unsuitable activities
- You build a Bazi bot or app where pillars must come from code and the model only paraphrases the result
Not a fit when
- You need the chart interpreted: the server returns a calculation only, and conclusions come from the model
- The birth time is unknown: getBaziDetail takes a date together with a time
- You want a forecast for a serious decision about health, money or relationships: the tool returns a calendar calculation and predicts nothing
- The machine has Node.js older than 22: the package targets version 22 and newer
Example request
Calculate the Bazi chart for a man born on 31 July 1998 at 14:10 Beijing time and list the four pillarsMCP
- Transport
- stdio, http
- Authentication
- not required
Environment variables
PORT- Port for the HTTP mode, 3000 by default.
Limitations
Node.js 22 or newer is required. No keys or accounts are needed, but there is no hosted remote server either: you run the package yourself. Answers arrive in Chinese, so translating the terms into your language is up to the agent, and it may render them inconsistently. For people born between 23:00 and 23:59 the result depends on the eightCharProviderSect parameter, which defaults to 2. The repository tree holds no tests or accuracy measurements, so the authors' claim that GPT and DeepSeek get charts wrong cannot be checked from it.
How to disable. Remove the Bazi block from mcpServers in the client configuration and restart the client. If the server runs over HTTP, stop the npm start process.
FAQ
How do I connect Bazi MCP to Claude Desktop?
Add a Bazi server to the client configuration following the install methods sample and restart the client. Node.js 22 or newer is required. Smithery can also handle the automatic install into Claude Desktop.
What does the eightCharProviderSect parameter do?
It sets the rule for births between 23:00 and 23:59. Value 1 puts the day stem on tomorrow, value 2 on today. The default is 2. The optional gender parameter takes 0 for female and 1 for male, 1 by default.
How do I find a date from a ready Bazi string?
Call getSolarTimes and pass the string with pillars separated by spaces. The tool returns a list of possible dates: for 戊寅 己未 己卯 辛未 these are 1758-07-29, 1818-07-15 and 1998-07-31 at 14:00.
How do I run Bazi MCP over HTTP?
Run npm start in a clone of the repository. The command rebuilds the project and starts a server at /mcp; the port comes from the PORT variable, 3000 by default. Requests are POST, and the server has no access check.
Can I get the almanac without calculating a chart?
Yes, that is what getChineseCalendar is for. It takes an optional solarDatetime and answers for today by default: lunar date, stems and branches, the solar term, directions of the gods, lists of suitable and unsuitable activities.
Discussion
No questions or reviews yet.
Related
MCP serversSkill for Zi Wei Dou Shu charts: a script computes the birth chart, rules classify the pattern and an HTML report with two themes is built
MCP server for the macOS calendar: an agent creates, finds and edits events in natural language
Google Calendar MCP Server: calendar for Claude
Google Calendar MCP Server
A calendar MCP for Claude Desktop: the agent views, creates, updates and deletes Google Calendar events, recurring ones included
Yandex Calendar MCP server
Яндекс Календарь MCP для Claude
An MCP server for Yandex Calendar: view, create and delete events using an app password
Yandex Calendar MCP with a setup CLI
yandex-mcp workspace
A Yandex Calendar MCP server over CalDAV with a separate CLI for setup and app-password verification
Yandex Calendar MCP server over CalDAV
yandex-calendar-mcp
A Yandex Calendar MCP server over CalDAV: reading the schedule, creating and editing events, invitations with real email delivery
README in short
The project page is bilingual, in English and Chinese. The Cantian AI authors say the server grew out of the Chinese Bazi Fortune Teller GPTs in the GPT Store and is now part of the cantian.ai platform, and they give a support email and WeChat for contact. Requirements, two ways to run it and descriptions of the three tools with sample answers follow.