← Back to directory
B

Bazi MCP

Community
Accurate Bazi calculation MCP server, providing reliable data for AI agents.
GitHub source repository ↗
★ 424 Stars Category · Other Popular Source revision 61b9012759fb
63FMRS · C
Reliability
8/20
Security and permissions
12/20
Maintenance
14/20
Documentation
16/20
Setup experience
13/20

Bazi MCP is an open-source MCP server focused on Bazi calculation, providing accurate Bazi tools suitable for developers and metaphysics enthusiasts to integrate into AI applications.

Read the FMRS scoring method →

The Bazi MCP is the first AI-powered Bazi calculator server from Cantian AI, built to address inaccuracies in existing AI fortune-telling tools like GPT and DeepSeek. It delivers precise Bazi data for personality analysis, destiny forecasting, and more. It offers multiple tools, including calculating detailed Bazi results, reversing the Bazi to find possible solar datetimes, and getting Chinese calendar information. Originating from the popular _Chinese Bazi Fortune Teller_ GPTs in the GPT Store, this project is now integrated with Cantian AI (cantian.ai). We invite Bazi practitioners and AI enthusiasts to collaborate and contribute to our open-source community.

Tools

getBaziDetail
Calculate Bazi results based on the solar/lunar datetime, including four pillars, ten gods, and auspicious stars.
getSolarTimes
Return a list of possible solar calendar datetimes based on the given Bazi.
getChineseCalendar
Get Chinese calendar information for the specified solar calendar date (default is today).

Setup

Prerequisite: Node.js 22 or above. To start via Streamable HTTP, run npm start. To start via Stdio, configure your AI application (e.g., Claude Desktop) with the mcpServers JSON example: {"mcpServers":{"Bazi":{"command":"npx","args":["bazi-mcp"]}}}. You can also install automatically via Smithery: npx -y @smithery/cli install @cantian-ai/bazi-mcp --client claude. For detailed steps, refer to the project README.

claude_desktop_config.json
{
  "mcpServers": {
    "Bazi": {
      "command": "npx",
      "args": [
        "bazi-mcp"
      ]
    }
  }
}

Fit and risk

Best for

  • AI application developers who need accurate Bazi calculation data
  • Chinese metaphysics enthusiasts or researchers who want to use AI tools for Bazi analysis
  • Users who wish to integrate Bazi and calendar features into AI assistants like Claude Desktop

Not for

  • Users who do not require high accuracy in Bazi calculations or only need simple entertainment
  • Non-technical users, as there is no GUI and command-line operations are required
  • Users who need commercial support or official guarantees (this is an open-source community-driven project)

Required permissions

  • Requires Node.js runtime environment
  • Requires network connectivity (for npx installation or communication with AI clients)
  • No additional system permissions needed, but ensure the AI client can access the local process or connect via HTTP

Risks and side effects

  • Bazi calculations are based on traditional metaphysics; results are for reference only and should not be used as a basis for decisions
  • Data may have inaccuracies despite the project's goal to improve precision
  • Open-source projects may update frequently or have unstable maintenance; monitor version changes
  • Content related to fortune-telling may be controversial; approach with rationality

Troubleshooting

  1. Ensure Node.js version is 22 or above, otherwise it may not run.
  2. When installing with npx, if network issues occur, check connectivity or use a proxy.
  3. If the Stdio method does not work in Claude Desktop, verify the configuration path and command.
  4. If getBaziDetail returns unexpected results, check the input date format (e.g., ISO format).
  5. Check the GitHub repository issues or community discussions for more help.

Use cases

Provide Bazi calculation capability to AI agents for personality analysis and destiny forecasting.
Reverse-engineer possible birth times from a given Bazi to assist metaphysical research.
Get daily Chinese calendar information for selecting auspicious dates or travel reference.

Supported clients

Claude DesktopFull support