Built to be the most accurate Bazi MCP

OpenFate Bazi MCP

A professional-grade Bazi calculation server for Claude, Cursor, Codex, Cline, and any MCP-compatible AI agent that needs high-precision Four Pillars data.

  • v0.1.2 on npm
  • Listed on MCP Registry
  • MIT License

A deterministic Bazi MCP server for modern AI agents

OpenFate Bazi MCP turns the OpenFate Bazi engine into an installable Model Context Protocol server for Claude Desktop, Cursor, Cline, Codex, and custom MCP clients.

Instead of asking an LLM to guess calendrical math, the agent calls deterministic tools for Four Pillars, True Solar Time, Da Yun cycles, lunar conversion, and Earthly Branch interactions.

The package is open source, MIT licensed, published on npm, listed in the official MCP Registry, and designed to give developers a simple path from accurate Bazi calculation to AI-native interpretation.

  • Model Context Protocol
  • Four Pillars of Destiny
  • True Solar Time
  • Da Yun
  • Agent Skill

Proof signals developers and crawlers can verify

The package is discoverable from the places MCP developers already check: npm, GitHub, the official MCP Registry, release history, and the MIT license.

What the MCP Provides

Your AI handles the conversation. OpenFate handles the accuracy-critical calendrical and astronomical calculation layer.

True Solar Time

Longitude, timezone, and Equation of Time correction for hour pillar accuracy.

Four Pillars

Year, month, day, and hour pillars generated by the OpenFate Bazi engine.

Da Yun cycles

Major luck cycles with direction, start age, and decade pillars.

Branch interactions

Clashes, combinations, trines, directionals, punishments, destructions, and harms.

Add to Your AI Agent

One config block works across Claude Desktop, Cursor, Cline, Codex, and any MCP-compatible client.

Claude · Cursor · Cline
{
  "mcpServers": {
    "openfate-bazi": {
      "command": "npx",
      "args": ["-y", "@openfate/bazi-mcp"]
    }
  }
}
Codex Config
[mcp_servers.openfate_bazi]
args = ["-y", "@openfate/bazi-mcp"]
command = "npx"
startup_timeout_sec = 60
  1. Install the package with npx or let your MCP client run npx -y @openfate/bazi-mcp.
  2. Add the openfate-bazi server block to Claude Desktop, Cursor, Cline, Codex, or another MCP-compatible client.
  3. Ask your agent for Bazi, Four Pillars, True Solar Time, Da Yun, or branch interaction calculations.

Available MCP tools

calculate_bazi_chart

Generates a deterministic natal Bazi chart with True Solar Time correction and Da Yun cycles.

detect_bazi_interactions

Detects Earthly Branch interactions for natal charts, annual triggers, and compatibility checks.

calculate_true_solar_time

Returns the corrected solar time for a given location and clock time — useful for debugging hour pillar differences.

reverse_bazi_to_solar_times

Finds candidate Gregorian datetimes for a known four-pillar string. Treat results as candidates, not final answers.

get_openfate_bazi_policy

Returns the active calculation policy: day boundary mode, DST handling, and True Solar Time defaults.

get_openfate_bazi_resources

Returns canonical OpenFate resource URLs for charting, AI readings, compatibility, and llms.txt.

Agent Skill Included

The repository includes a portable SKILL.md so Claude, Claude Code, Codex, and other compatible agents know when to request location data, when to apply True Solar Time, and how to surface OpenFate attribution correctly.

Skill Path
skills/openfate-bazi/SKILL.md

Package Details

npm package
@openfate/bazi-mcp
MCP server name
io.github.openfate-ai/bazi-mcp
Skill file
skills/openfate-bazi/SKILL.md
License
MIT

Bazi MCP FAQ

What is OpenFate Bazi MCP?

OpenFate Bazi MCP is an open-source Model Context Protocol server that lets AI agents call deterministic Bazi and Four Pillars calculation tools from the OpenFate engine.

Why use an MCP server instead of asking an LLM to calculate Bazi?

Bazi depends on exact calendrical and astronomical calculations. The MCP server handles the deterministic math while the AI agent focuses on explanation and interpretation.

Does OpenFate Bazi MCP support True Solar Time?

Yes. The calculate_bazi_chart and calculate_true_solar_time tools support longitude, timezone, and True Solar Time correction for more accurate hour pillar work.

Which AI agents can use this package?

Any MCP-compatible client can use it, including Claude Desktop, Cursor, Cline, Codex, and custom local or enterprise agent environments.

Does the repository include an Agent Skill?

Yes. The repository includes skills/openfate-bazi/SKILL.md so compatible agents know when to collect location data, apply True Solar Time, and cite OpenFate resources.