Bazi MCP logo

Bazi MCP

by cantian-ai

Calculates Bazi charts, reverse-maps charts to possible solar times, and retrieves Chinese calendar information over MCP.

Install Bazi MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "cantian-ai-bazi-mcp": {
      "command": "npx",
      "args": [
        "bazi-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 3 tools correctly (24d ago).

Overview

cantian-ai/bazi-mcp MCP server gives AI agents access to Bazi (Chinese astrology) calculations and Chinese calendar data. It provides tools for generating detailed charts from solar or lunar birth times, finding possible solar times for a supplied Bazi, and retrieving calendar information for a date. Use it when an MCP client needs structured Bazi data for chart interpretation, personality analysis, or related Chinese metaphysics workflows. The server supports both stdio and Streamable HTTP transports and requires Node.js 22 or later.

Use cases

  • Calculate a Bazi chart from a solar birth datetime
  • Calculate a Bazi chart from a lunar birth datetime
  • Find possible solar dates for a known Bazi
  • Retrieve Chinese calendar information for a date
  • Provide structured chart data to an AI astrology workflow

Key features

  • Solar and lunar datetime chart calculation
  • Detailed Four Pillars result data
  • Reverse lookup from Bazi to possible solar times
  • Chinese calendar information lookup
  • Stdio and Streamable HTTP transports
  • Configurable late-night day assignment

Tools3

What Bazi MCP lets your agent do. Expand a tool for its parameters.

Verified live~287 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

19/19 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · bazi-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars436Stargazers on the source repository.
npm downloads1.2kPackage downloads in the last 30 days.
Last commit1y agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed3Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Bazi MCP works

What cantian-ai/bazi-mcp MCP server does

cantian-ai/bazi-mcp MCP server exposes Bazi calculation and calendar functions to MCP-compatible AI applications. Bazi, also known as the Four Pillars system, uses birth date and time information to produce a structured chart. The server is listed in the Spirituality & Esoterica category and is intended for applications involving Chinese astrology, metaphysics, chart interpretation, and related research.

The main charting operation accepts either a solar-calendar datetime or a lunar datetime. It returns the four pillars and associated details, including heavenly stems, earthly branches, elemental attributes, yin-yang classifications, hidden stems, ten gods, na yin, empty branches, star positions, and self-seated states. Results can also include the fetal origin, fetal breath, life palace, body palace, auxiliary stars, major fortune periods, and pillar relationships such as combinations or partial combinations.

How it works

The server can run through stdio or Streamable HTTP. For stdio, an MCP client launches the package with npx bazi-mcp. The README gives Claude Desktop as an example client and also documents an npm start command for Streamable HTTP.

getBaziDetail calculates a chart from an ISO solar datetime, a lunar datetime, or both according to the request. Gender is optional, with numeric values for female and male and male as the default. The eightCharProviderSect option controls how the late-night period from 23:00 to 23:59 is assigned to the current or following day.

getSolarTimes takes a space-separated Bazi string and returns possible solar-calendar datetimes. This supports workflows that start with known pillars and need candidate dates. getChineseCalendar returns Chinese calendar information for a supplied solar datetime, or for the current day when no date is specified.

Setup and configuration

cantian-ai/bazi-mcp MCP server requires Node.js 22 or newer. A stdio configuration can use the following structure:

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

The repository also documents installation through Smithery for Claude Desktop. That installation uses the Smithery CLI and targets the @cantian-ai/bazi-mcp package.

Tools and capabilities

  • getBaziDetail: Calculates detailed Bazi results from solar or lunar datetime input.
  • getSolarTimes: Returns possible solar datetimes for a supplied Bazi.
  • getChineseCalendar: Retrieves Chinese calendar information for a selected solar date or the default current date.

The returned chart data is structured for downstream agent analysis rather than limited to a single formatted interpretation. Developers can use the fields to build prompts, display chart components, or implement application-specific Bazi analysis.

Limitations and notes

Applications should validate datetime formats before calling the tools.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Bazi MCP

cantian-ai/bazi-mcp is an MCP server that connects AI agents to Bazi (Chinese astrology) calculations and calendar data. Its main tools calculate detailed charts from solar or lunar datetimes, find possible solar times for a Bazi, and retrieve Chinese calendar information for a specified date or today by default.

Install it with Node.js 22 or newer and configure an MCP client to run `npx` with the `bazi-mcp` argument.

Yes, the README provides a Claude Desktop stdio configuration and a Smithery installation command for Claude Desktop. Configure the client to launch `npx bazi-mcp`.

The chart tool accepts a solar datetime in ISO format or a lunar datetime. It also accepts optional gender and late-night day-assignment settings. The reverse lookup tool accepts a Bazi string with each pillar separated by spaces.

Run `npm start` to start the server using the documented Streamable HTTP transport.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewBazi MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/cantian-ai-bazi-mcp?style=directory)](https://allmcps.com/mcp/cantian-ai-bazi-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/cantian-ai-bazi-mcp"><img src="https://allmcps.com/api/badge/cantian-ai-bazi-mcp?style=directory" alt="Bazi MCP on AllMCPs" /></a>