Content
# Bazi MCP by Cantian AI
[](https://smithery.ai/server/@cantian-ai/bazi-mcp)
[](https://mseep.ai/app/453ac410-d93a-45fb-8563-7d3cccfbe956)
Unlock precise Bazi insights with the **Bazi MCP**, the first AI-powered Bazi calculator. Built to address inaccuracies in existing AI fortune-telling tools like GPT and DeepSeek, our MCP delivers reliable Bazi data for personality analysis, destiny forecasting, and more.
### Why Bazi MCP?
- **Accurate Bazi Calculations**: Provide insightful Bazi information.
- **AI Agent Integration**: Empowers AI agents with precise Bazi data.
- **Community-Driven**: Join enthusiasts to advance Chinese metaphysics.
Originating from the popular [_Chinese Bazi Fortune Teller_](https://chatgpt.com/g/g-67c3f7b74d148191a2167f44fd13412d-chinese-bazi-fortune-teller-can-tian-ba-zi-suan-ming-jing-zhun-pai-pan-jie-du) GPTs in the GPT Store, this project is now integrated with **Cantian AI** ([cantian.ai](https://cantian.ai)). We invite Bazi practitioners and AI enthusiasts to collaborate, share insights, and contribute to our open-source community.
### Get Involved
- **Contact**: [support@cantian.ai](mailto:support@cantian.ai)
## English Version
**Bazi MCP** is the first MCP launched by Cantian AI aimed at the field of metaphysics, providing accurate Bazi data to address common charting errors found in fortune-telling tools like GPT and DeepSeek, assisting in personality analysis, destiny forecasting, and more.
### Highlights of Bazi MCP
- **Accurate Charting**: Provides comprehensive Bazi charting information.
- **AI Empowerment**: Offers reliable Bazi services for AI agents.
- **Community Collaboration**: Welcomes enthusiasts of destiny studies to engage in discussions and development.
The project originates from the popular application [_Chinese Bazi Fortune Teller_](https://chatgpt.com/g/g-67c3f7b74d148191a2167f44fd13412d-chinese-bazi-fortune-teller-can-tian-ba-zi-suan-ming-jing-zhun-pai-pan-jie-du) in the GPT Store and is now integrated into the **Cantian AI** platform ([cantian.ai](https://cantian.ai)). We sincerely invite researchers in destiny studies and AI developers to join us in promoting the inheritance and innovation of traditional Chinese culture.
### Contact Us
- **Email**: [support@cantian.ai](mailto:support@cantian.ai)
- **WeChat**:
<img src="https://github.com/user-attachments/assets/7790b64e-e03f-47e2-b824-38459549a6d8" alt="WeChat QR Code" width="200"/>
## Prerequisite
Node.js version 22 or above.
## Start
Configure AI application (e.g. Claude Desktop).
```json
{
"mcpServers": {
"Bazi": {
"command": "npx",
"args": ["bazi-mcp"]
}
}
}
```
### Installing via Smithery
To install bazi-mcp for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@cantian-ai/bazi-mcp):
```bash
npx -y @smithery/cli install @cantian-ai/bazi-mcp --client claude
```
## Tools
### getBaziDetail
> Calculate the Bazi results based on the solar/lunar datetime.
#### Arguments
- solarDatetime: `String`
> Solar datetime in ISO format. Example: `2000-05-15T12:00:00+08:00`.
- lunarDatetime: `String`
> Lunar datetime. Example: `2000-05-15 12:00:00`.
- gender: `Number`
> Gender. Optional. 0 for female, 1 for male. 1 by default.
- eightCharProviderSect: `Number`
> Configuration for eight char provider. Optional. 1 for meaning the day stem of 23:00-23:59 is for tomorrow, 2 for meaning the day stem of 23:00-23:59 is for today. 2 by default.
#### Result example
```json
{
"gender": "male",
"solar": "July 31, 1998 14:10:00",
"lunar": "Lunar Year of Wu Yin, June 9, Xin Wei Hour",
"bazi": "Wu Yin Ji Wei Ji Mao Xin Wei",
"zodiac": "Tiger",
"dayMaster": "Ji",
"yearPillar": {
"heavenlyStem": {
"stem": "Wu",
"element": "Earth",
"yinYang": "Yang",
"tenGod": "Rob Wealth"
},
"earthlyBranch": {
"branch": "Yin",
"element": "Wood",
"yinYang": "Yang",
"hiddenStems": {
"mainQi": {
"stem": "Jia",
"tenGod": "Direct Officer"
},
"middleQi": {
"stem": "Bing",
"tenGod": "Direct Seal"
},
"remainingQi": {
"stem": "Wu",
"tenGod": "Rob Wealth"
}
}
},
"naYin": "City Wall Earth",
"period": "Jia Xu",
"void": "Shen You",
"starLuck": "Death",
"selfSit": "Long Life"
},
"monthPillar": {
"heavenlyStem": {
"stem": "Ji",
"element": "Earth",
"yinYang": "Yin",
"tenGod": "Peer"
},
"earthlyBranch": {
"branch": "Wei",
"element": "Earth",
"yinYang": "Yin",
"hiddenStems": {
"mainQi": {
"stem": "Ji",
"tenGod": "Peer"
},
"middleQi": {
"stem": "Ding",
"tenGod": "Indirect Seal"
},
"remainingQi": {
"stem": "Yi",
"tenGod": "Seven Kill"
}
}
},
"naYin": "Heavenly Fire",
"period": "Jia Yin",
"void": "Zi Chou",
"starLuck": "Crown",
"selfSit": "Crown"
},
"dayPillar": {
"heavenlyStem": {
"stem": "Ji",
"element": "Earth",
"yinYang": "Yin"
},
"earthlyBranch": {
"branch": "Mao",
"element": "Wood",
"yinYang": "Yin",
"hiddenStems": {
"mainQi": {
"stem": "Yi",
"tenGod": "Seven Kill"
}
}
},
"naYin": "City Wall Earth",
"period": "Jia Xu",
"void": "Shen You",
"starLuck": "Illness",
"selfSit": "Illness"
},
"timePillar": {
"heavenlyStem": {
"stem": "Xin",
"element": "Metal",
"yinYang": "Yin",
"tenGod": "Food God"
},
"earthlyBranch": {
"branch": "Wei",
"element": "Earth",
"yinYang": "Yin",
"hiddenStems": {
"mainQi": {
"stem": "Ji",
"tenGod": "Peer"
},
"middleQi": {
"stem": "Ding",
"tenGod": "Indirect Seal"
},
"remainingQi": {
"stem": "Yi",
"tenGod": "Seven Kill"
}
}
},
"naYin": "Roadside Earth",
"period": "Jia Zi",
"void": "Xu Hai",
"starLuck": "Crown",
"selfSit": "Decline"
},
"胎元": "Geng Xu",
"胎息": "Jia Xu",
"命宫": "Yi Mao",
"身宫": "Yi Mao",
"神煞": {
"yearPillar": ["National Seal", "Death God"],
"monthPillar": ["Heavenly Virtue Combination", "Monthly Virtue Combination", "Heavenly Nobleman", "Taiji Nobleman", "Fortune Star Nobleman", "Golden Carriage", "Blood Blade", "Flower Canopy", "Heavenly Joy", "Original Star"],
"dayPillar": ["Heavenly Virtue Combination", "Monthly Virtue Combination", "Peach Blossom", "Nine Ox", "Child God"],
"timePillar": ["Heavenly Nobleman", "Taiji Nobleman", "Fortune Star Nobleman", "Golden Carriage", "Blood Blade", "Flower Canopy", "Heavenly Joy", "Original Star", "Child God"]
},
"大运": {
"起运年龄": 4,
"起运日期": "2001-1-26",
"大运": [
{
"干支": "Geng Shen",
"开始年份": 2001,
"结束": 2010,
"天干十神": "Shang Guan",
"地支十神": ["Shang Guan", "Zheng Cai", "Jie Cai"],
"地支藏干": ["Geng", "Ren", "Wu"],
"开始年龄": 4,
"结束年龄": 13
},
{
"干支": "Xin You",
"开始年份": 2011,
"结束": 2020,
"天干十神": "Shi Shen",
"地支十神": ["Shi Shen"],
"地支藏干": ["Xin"],
"开始年龄": 14,
"结束年龄": 23
},
{
"干支": "Ren Xu",
"开始年份": 2021,
"结束": 2030,
"天干十神": "Zheng Cai",
"地支十神": ["Jie Cai", "Shi Shen", "Pian Yin"],
"地支藏干": ["Wu", "Xin", "Ding"],
"开始年龄": 24,
"结束年龄": 33
},
{
"干支": "Gui Hai",
"开始年份": 2031,
"结束": 2040,
"天干十神": "Pian Cai",
"地支十神": ["Zheng Cai", "Zheng Guan"],
"地支藏干": ["Ren", "Jia"],
"开始年龄": 34,
"结束年龄": 43
},
{
"干支": "Jia Zi",
"开始年份": 2041,
"结束": 2050,
"天干十神": "Zheng Guan",
"地支十神": ["Pian Cai"],
"地支藏干": ["Gui"],
"开始年龄": 44,
"结束年龄": 53
},
{
"干支": "Yi Chou",
"开始年份": 2051,
"结束": 2060,
"天干十神": "Qi Sha",
"地支十神": ["Bi Jian", "Pian Cai", "Shi Shen"],
"地支藏干": ["Ji", "Gui", "Xin"],
"开始年龄": 54,
"结束年龄": 63
},
{
"干支": "Bing Yin",
"开始年份": 2061,
"结束": 2070,
"天干十神": "Zheng Yin",
"地支十神": ["Zheng Guan", "Zheng Yin", "Jie Cai"],
"地支藏干": ["Jia", "Bing", "Wu"],
"开始年龄": 64,
"结束年龄": 73
},
{
"干支": "Ding Mao",
"开始年份": 2071,
"结束": 2080,
"天干十神": "Pian Yin",
"地支十神": ["Qi Sha"],
"地支藏干": ["Yi"],
"开始年龄": 74,
"结束年龄": 83
},
{
"干支": "Wu Chen",
"开始年份": 2081,
"结束": 2090,
"天干十神": "Jie Cai",
"地支十神": ["Jie Cai", "Qi Sha", "Pian Cai"],
"地支藏干": ["Wu", "Yi", "Gui"],
"开始年龄": 84,
"结束年龄": 93
},
{
"干支": "Ji Si",
"开始年份": 2091,
"结束": 2100,
"天干十神": "Bi Jian",
"地支十神": ["Zheng Yin", "Shang Guan", "Jie Cai"],
"地支藏干": ["Bing", "Geng", "Wu"],
"开始年龄": 94,
"结束年龄": 103
}
]
},
"刑冲合会": {
"year": {
"heavenlyStem": {},
"earthlyBranch": {}
},
"month": {
"heavenlyStem": {},
"earthlyBranch": {
"halfCombination": [
{
"pillar": "day",
"knowledgePoint": "Wei Mao half combination Wood",
"element": "Wood"
}
]
}
},
"day": {
"heavenlyStem": {},
"earthlyBranch": {
"halfCombination": [
{
"pillar": "month",
"knowledgePoint": "Mao Wei half combination Wood",
"element": "Wood"
},
{
"pillar": "time",
"knowledgePoint": "Mao Wei half combination Wood",
"element": "Wood"
}
]
}
},
"time": {
"heavenlyStem": {},
"earthlyBranch": {
"halfCombination": [
{
"pillar": "day",
"knowledgePoint": "Wei Mao half combination Wood",
"element": "Wood"
}
]
}
}
}
}
```
### getSolarTimes
> Return a list of possible solar calendar datetime based on the given Bazi.
#### Arguments
- bazi: `String`
> Bazi, with each pillar separated by a space.
#### Result example
```json
["1758-07-29 14:00:00", "1818-07-15 14:00:00", "1998-07-31 14:00:00"]
```
### getChineseCalendar
> Get Chinese calendar information for the specified solar calendar date (default is today).
#### Arguments
- solarDatetime
> Solar datetime in ISO format. Example: `2000-05-15T12:00:00+08:00`.
#### Result example
```json
{
"solar": "May 7, 2025 Wednesday",
"lunar": "Lunar Year of Yi Si, April 10",
"heavenlyEarth": "Yi Si Xin Si Bing Zi",
"zodiac": "Snake",
"naYin": "Water Under the Stream",
"solarTerm": "Beginning of Summer",
"twentyEightConstellations": "Ji Shui Bao Lucky",
"PengzuHundredAvoidances": "Bing does not repair the stove must see disaster, Zi does not ask for divination to bring disaster",
"happyGodDirection": "Southwest",
"yangNobleGodDirection": "West",
"yinNobleGodDirection": "Northwest",
"fortuneGodDirection": "East",
"wealthGodDirection": "Southwest",
"conflict": "Conflict with Horse (Wu) South",
"suitable": "Marriage, sacrifice, prayer for blessings, seeking offspring, consecration, travel, dismantling, moving earth, raising beams, fire exit, entering population, moving in, bed setting, planting, livestock, raising, erecting pillars, setting doors, construction, release, meeting friends",
"taboo": ""
}
```
### ~~buildBaziFromLunarDatetime~~ (deprecated)
> Calculate the BaZi results based on the lunar datetime.
#### Arguments
- lunarDatetime: `String`
> Lunar datetime. Example: `2000-05-15 12:00:00`.
- gender: `Number`
> Gender. Optional. 0 for female, 1 for male. 1 by default.
- eightCharProviderSect: `Number`
> Configuration for eight char provider. Optional. 1 for meaning the day stem of 23:00-23:59 is for tomorrow, 2 for meaning the day stem of 23:00-23:59 is for today. 2 by default.
### ~~buildBaziFromSolarDatetime~~ (deprecated)
> Calculate the BaZi results based on the solar datetime.
#### Arguments
- solarDatetime: `String`
> Solar datetime in ISO format. Example: `2000-05-15T12:00:00+08:00`.
- gender: `Number`
> Gender. Optional. 0 for female, 1 for male.
- eightCharProviderSect: `Number`
> Configuration for eight char provider. Optional. 1 for meaning the day stem of 23:00-23:59 is for tomorrow, 2 for meaning the day stem of 23:00-23:59 is for today. 2 by default.
**Keywords**: Bazi MCP, Bazi AI Agent, Fengshui AI Agent, Bazi Calculator MCP, Bazi Calculator AI, Cantian AI
You Might Also Like
OpenWebUI
Open WebUI is an extensible web interface for customizable applications.

NextChat
NextChat is a light and fast AI assistant supporting Claude, DeepSeek, GPT4...

cherry-studio
Cherry Studio is a multilingual project for creative collaboration.
atlas-mcp-server
ATLAS is a task management system for LLM Agents, built on a 3-node architecture.
mysql_mcp_server_pro
mcp_mysql_server_pro offers advanced MySQL operations with anomaly analysis...
mysql_mcp_server_pro
支持SSE,STDIO的mysql mcp server 。Support for SSE, STDIO in MySQL MCP server.