The Bazi MCP by Cantian AI is an advanced metaphysical Bazi calculator designed to provide accurate Chinese astrological calculations. It addresses the inaccuracies in existing AI fortune-telling tools like GPT and DeepSeek, delivering reliable Bazi data for personality analysis, destiny forecasting, and other metaphysical applications.
You'll need Node.js 22 or above installed on your system.
Clone the repository and navigate to its directory:
git clone https://github.com/cantian-ai/bazi-mcp.git
cd bazi-mcp
Install dependencies:
npm i
Configure your AI application (e.g., Claude Desktop) by adding the following to its configuration:
{
"mcpServers": {
"Bazi": {
"command": "node",
"args": ["{Absolute path of the repository directory}/dist/stdio.js"]
}
}
}
For a simpler installation process with Claude Desktop, use Smithery:
npx -y @smithery/cli install @cantian-ai/bazi-mcp --client claude
The Bazi MCP provides two main tools for calculating Bazi results:
The buildBaziFromLunarDatetime
tool calculates Bazi results based on lunar datetime:
Arguments:
The buildBaziFromSolarDatetime
tool calculates Bazi results based on solar datetime:
Arguments:
The tools return comprehensive Bazi results in JSON format, including:
Here's an example of what the result looks like (abbreviated):
{
"性别": "女",
"阳历": "2000年1月3日 10:24:00",
"农历": "农历己卯年十一月廿七辛巳时",
"年柱": {
"天干": { "天干": "己", "五行": "土", "阴阳": "阴", "十神": "正印" },
"地支": { "地支": "卯", "五行": "木", "阴阳": "阴", "藏干": { "主气": { "天干": "乙", "十神": "正财" } } },
"纳音": "城头土",
"旬": "甲戌",
"空亡": "申酉",
"星运": "胎",
"自坐": "病"
}
// Additional pillars and information omitted for brevity
}
For more information or support, contact: [email protected]
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.