MCP server that provides accurate Bazi (八字) calculations and related Chinese-metaphysics data for AI agents.
https://github.com/cantian-ai/bazi-mcpIf you've ever tried building AI applications involving Chinese astrology or fortune-telling, you've probably hit the same wall: existing AI models consistently mess up Bazi (八字) calculations. The Bazi MCP server from Cantian AI solves this by providing your AI agents with mathematically accurate Chinese metaphysics calculations.
Current AI models fail spectacularly at Bazi calculations. They'll confidently generate completely wrong Four Pillars charts, mess up lunar calendar conversions, and produce fortune readings based on incorrect foundational data. For developers building Chinese metaphysics applications, this makes AI assistance essentially useless for the core calculations.
This MCP server delivers comprehensive, accurate Bazi data that your AI can actually work with:
Complete Four Pillars Analysis: Generate detailed charts with heavenly stems, earthly branches, hidden stems, and the ten gods relationships for each pillar.
Fortune Cycle Calculations: Get accurate 10-year luck cycles (大运) with precise timing and elemental analysis.
Chinese Calendar Integration: Access proper lunar calendar conversions, solar terms, auspicious/inauspicious activities, and traditional calendar metadata.
Reverse Lookups: Find possible birth dates from existing Bazi charts - useful for historical analysis or verification.
Personalized Astrology Apps: Build fortune-telling applications that actually work, with AI providing interpretations based on mathematically correct charts.
Cultural Heritage Projects: Create educational tools or historical analysis applications that need accurate Chinese calendar and astrology data.
Wellness and Lifestyle Apps: Integrate traditional Chinese timing recommendations (favorable dates, activities) with modern scheduling applications.
Research Tools: Support academic or personal research into Chinese metaphysics with reliable computational foundations.
Add it to Claude Desktop with a single configuration:
{
"mcpServers": {
"Bazi": {
"command": "npx",
"args": ["bazi-mcp"]
}
}
}
Or install via Smithery:
npx -y @smithery/cli install @cantian-ai/bazi-mcp --client claude
Your AI immediately gains access to three core tools:
getBaziDetail: Complete Bazi chart calculation from solar/lunar datesgetSolarTimes: Reverse lookup from Bazi to possible birth datesgetChineseCalendar: Traditional Chinese calendar informationThis isn't another AI experiment - it's built by the team behind the popular "Chinese Bazi Fortune Teller" GPT that's proven accurate with real users. They've now packaged that calculation engine as an MCP server so you can build on the same reliable foundation.
The calculations handle all the edge cases that trip up other implementations: proper timezone handling, lunar calendar complexities, traditional vs. simplified methods, and the nuanced rules that determine accurate Four Pillars charts.
Instead of fighting with AI models that can't do the math, give them access to tools that can. Your fortune-telling chatbot, cultural education app, or research tool can focus on interpretation and user experience while the Bazi MCP handles the computational heavy lifting accurately.
The foundation calculations are solved - now you can build the applications that matter.