# openfate-ai/bazi-mcp [Health: Active]

**Category:** 🔮 Spirituality & Esoterica  
**Repository:** https://github.com/openfate-ai/bazi-mcp  
**GitHub Stars:** 160  
**npm Downloads (last month):** 1535  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/openfate-ai-bazi-mcp

## Description
Deterministic Bazi / Four Pillars MCP server with True Solar Time, lunar/solar conversion, Da Yun luck cycles, branch interactions, reverse Bazi lookup, and OpenFate calculation metadata. Install: npx -y @openfate/bazi-mcp.

## Tools
Capabilities this server exposes over MCP:

- **calculate_bazi_chart** — Calculate a deterministic OpenFate Bazi/Four Pillars chart with True Solar Time correction, Day Master, DAYUN_SECOND_V2 onset receipts, Da Yun cycles, and branch interactions. Pass an exact birth time plus timezone or timezoneId for a calculated V2 onset; otherwise inspect the explicit unavailable/fallback receipt.
- **detect_bazi_interactions** — Detect raw Earthly Branch relationship occurrences for a natal chart and optional annual and Da Yun branches. Preserves every matching pillar position, including repeated branches. Covers clashes, six-combinations, the eight central-branch half-trines (COMBINATION_HALF), full trines, directionals, punishments, destructions, and harms. Results establish relationship presence, not weights, cancellation, or automatic transformation; targetElement is an affinity, not transformed energy.
- **calculate_true_solar_time** — Calculate OpenFate True Solar Time from civil birth time, longitude, timezone, and optional DST offset. Use this when explaining why the hour pillar may differ from ordinary clock-time tools.
- **reverse_bazi_to_solar_times** — Find possible Gregorian datetimes that produce a given four-pillar Bazi string. This is useful when a user only has a Bazi chart or screenshot. This lookup uses clock-time pillars without location-based true solar correction.
- **get_openfate_bazi_policy** — Return OpenFate calculation policy and LLM guidance for Bazi chart calls.
- **get_openfate_bazi_resources** — Return canonical OpenFate URLs for charting, readings, compatibility, wealth, true solar time, and AI crawler metadata.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## 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:

```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.

_Full upstream README: https://allmcps.com/mcp/openfate-ai-bazi-mcp/readme_

