Bazi MCP logo

Bazi MCP

by openfate-ai

Calculates deterministic Bazi charts, True Solar Time, luck cycles, branch interactions, and reverse date candidates 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": {
    "openfate-ai-bazi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openfate/bazi-mcp"
      ]
    }
  }
}

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

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

Overview

The openfate-ai/bazi-mcp MCP server provides deterministic Bazi and Four Pillars calculations for AI agents. It runs locally over MCP and uses OpenFate calculation engines for solar-term handling, lunar and solar conversion, True Solar Time, DST, and Da Yun timing. Use it when an agent needs structured chart data or branch relationships instead of attempting calendrical math itself. Reverse lookup results are candidate datetimes that require recalculation with exact location and timezone details.

Use cases

  • Calculate a Bazi chart from an exact birth time and location
  • Convert clock time to True Solar Time
  • Detect raw Earthly Branch relationships in a natal chart
  • Search Gregorian datetimes matching a four-pillar string
  • Retrieve OpenFate calculation policy and reference links

Key features

  • Deterministic Bazi and Four Pillars chart calculation
  • True Solar Time and lunar-solar calendar handling
  • Da Yun timing with DAYUN_SECOND_V2 policy
  • Raw Earthly Branch interaction detection
  • Reverse Bazi lookup for candidate Gregorian datetimes
  • Machine-readable results with calculation metadata

Tools6

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

Verified live~1.6k 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.

20/21 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 · @openfate/bazi-mcp (npm)

Adoption & maintenance

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

GitHub stars160Stargazers on the source repository.
npm downloads1.5kPackage downloads in the last 30 days.
Last commit1mo 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 exposed6Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Bazi MCP works

What openfate-ai/bazi-mcp MCP server does

The openfate-ai/bazi-mcp MCP server exposes local Bazi and Four Pillars calculations through the Model Context Protocol. It is intended for agents that need consistent calendrical results, including solar and lunar calendar normalization, True Solar Time correction, Da Yun timing, and Earthly Branch relationship detection.

Chart responses include enriched pillar facts such as Ten Gods, hidden stems, Na Yin, Xun, void branches, and growth stages. Responses use machine-readable English keys and include calculation policy and OpenFate attribution data. The server wraps the @openfate/bazi-engine and @openfate/true-solar-time packages.

This listing belongs to the 🔮 Spirituality & Esoterica category. It supplies calculation data; interpretation of the results remains the responsibility of the agent or application using the server.

How it works

The server runs as a local stdio MCP process. Install it with npx -y @openfate/bazi-mcp, then configure an MCP client to launch that command. Calculations run locally in the subprocess, and the package does not phone home.

For chart calculation, provide the birth date and time, gender, calendar type, and relevant location or timezone inputs. Longitude enables True Solar Time correction. The server uses the ZI_HOUR_23 day-boundary default and fixes Da Yun onset to DAYUN_SECOND_V2; callers cannot silently select another onset policy.

The interaction detector preserves each matching pillar occurrence. Annual and Da Yun branches retain separate roles, and omitted birth hours remain unknown rather than being replaced with an assumed branch. Interaction output is raw occurrence data, not a score or final interpretive judgment.

Setup and configuration

The openfate-ai/bazi-mcp MCP server can be added to a client with a command-and-arguments configuration:

config.json
{
  "mcpServers": {
    "openfate-bazi": {
      "command": "npx",
      "args": ["-y", "@openfate/bazi-mcp"]
    }
  }
}

The README provides configurations for Claude Desktop, Cursor, and Cline, and identifies Continue as a supported agent. On macOS, Claude Desktop may need the absolute path to npx. The repository also includes an Agent Skill at skills/openfate-bazi/SKILL.md for compatible tools, including Claude Code and Codex-style workflows.

Tools and capabilities

  • calculate_bazi_chart calculates a chart from birth, calendar, timezone, longitude, DST, and True Solar Time inputs.
  • detect_bazi_interactions reports clashes, combinations, half-trines, trines, directional relationships, punishments, destructions, and harms.
  • calculate_true_solar_time calculates True Solar Time independently.
  • reverse_bazi_to_solar_times searches for possible Gregorian datetimes matching a four-pillar string.
  • get_openfate_bazi_policy returns rules for True Solar Time, day boundaries, DST, Da Yun timing, reverse lookup, and interactions.
  • get_openfate_bazi_resources returns canonical OpenFate links for charting, readings, compatibility, wealth, True Solar Time, and llms.txt.

Limitations and notes

Reverse lookup is a candidate search, not a final determination. Recalculate a returned datetime with exact longitude, timezone, and True Solar Time settings. Da Yun dates should be treated as exact only when the chart contains a calculated timing receipt with version DAYUN_SECOND_V2; otherwise, the response identifies unavailable timing and may retain fallback scalar fields.

The openfate-ai/bazi-mcp MCP server does not score interactions, automatically resolve clashes, or establish transformation outcomes. Combination transformation status is reported as not evaluated, while other relationship types use a not-applicable status. Version 0.3 requires @openfate/bazi-engine version 2.

Reviews

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

Frequently Asked Questions about Bazi MCP

openfate-ai/bazi-mcp is an MCP server that connects AI agents to OpenFate's local Bazi calculation engines. Its main tools calculate Bazi charts, detect Earthly Branch interactions, calculate True Solar Time, reverse-search Bazi dates, and return OpenFate policy and resource links.

Install it by running `npx -y @openfate/bazi-mcp` and configuring the command in your MCP client. The README includes setup examples for Claude Desktop, Cursor, and Cline.

Yes, it works with Cursor through a standard MCP server configuration. Set the server command to `npx` and pass `-y` and `@openfate/bazi-mcp` as arguments.

Yes, it provides a dedicated `calculate_true_solar_time` tool. True Solar Time can also be enabled during chart calculation, with longitude supplied for the correction.

No, reverse lookup returns possible Gregorian datetime candidates. Recalculate a candidate using exact longitude, timezone, and True Solar Time settings for final accuracy.

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/openfate-ai-bazi-mcp?style=directory)](https://allmcps.com/mcp/openfate-ai-bazi-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/openfate-ai-bazi-mcp"><img src="https://allmcps.com/api/badge/openfate-ai-bazi-mcp?style=directory" alt="Bazi MCP on AllMCPs" /></a>