MCP server for Bazi (八字) information
Configuration
View docs{
"mcpServers": {
"cantian-ai-bazi-mcp": {
"command": "npx",
"args": [
"bazi-mcp"
]
}
}
}You are deploying the Bazi MCP Server to get AI-powered Bazi calculations and related data for personality analysis, destiny forecasting, and integration with AI agents. This MCP provides accurate Bazi information, supports multiple calculators and calendar lookups, and is designed for seamless use with AI applications.
To use the Bazi MCP Server, connect your MCP client to the provided stdio configuration. This runs locally via a command you execute from your client’s environment and keeps the MCP service available for requests from your AI application.
Common usage pattern: - Install and prepare your MCP client environment. - Add a server entry that starts the MCP via stdio with the following command and arguments. - Launch your AI application and reference the MCP as a data provider for Bazi details, solar/lunar conversions, and Chinese calendar data.
Prerequisites: ensure Node.js version 22 or above is installed on your system.
Install the Bazi MCP via Smithery for direct integration with your AI client (Claude Desktop example). Run the following command in your terminal:
npx -y @smithery/cli install @cantian-ai/bazi-mcp --client claudeAfter installing, configure the MCP server in your client with the following stdio configuration. This starts the Bazi MCP as a local, in-process server accessible to your AI client.
{
"mcpServers": {
"Bazi": {
"command": "npx",
"args": ["bazi-mcp"]
}
}
}If you prefer to run the MCP via an HTTP transport, start your client normally and ensure the Streamable HTTP transport is enabled in your setup, then start the server usefully by the normal client workflow.
Note: the standard stdio method is provided above and is commonly used for local development and integration with AI clients.
Calculates Bazi information for a given solar or lunar datetime, returning structures that include year, month, day, and hour pillars with associated stems, branches, and hidden heavenly stems.
Returns a list of possible solar calendar datetimes that match a provided Bazi string, enabling you to explore dates that align with a specific Bazi configuration.
Fetches Chinese calendar (lunar) information for a specified solar date, including stems, branches, auspicious terms, and other traditional calendar data.