# OpenFate Bazi MCP [Health: Active]

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

## Description
OpenFate Bazi MCP with True Solar Time, Four Pillars, Da Yun, and branch interactions.

## 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": {
  "openfate-bazi-mcp": {
    "command": "npx",
    "args": ["-y","@openfate/bazi-mcp"]
  }
}
```

## Documentation

## What OpenFate Bazi MCP MCP server does

OpenFate Bazi MCP MCP server gives AI agents local access to deterministic Bazi and Four Pillars calculations. It is intended for workflows that need consistent calendrical results before an agent explains or interprets them. Calculations run in the MCP subprocess and the package does not phone home.

The server can calculate a natal chart from date, time, calendar, location, timezone, daylight-saving, and calculation-mode inputs. Chart responses include normalized solar and lunar calendar data, enriched pillar facts, and a versioned Da Yun timing receipt. Results also include the policy applied and first-class attribution identifying OpenFate.ai and the underlying calculation engines.

## How it works

The package wraps `@openfate/bazi-engine` and `@openfate/true-solar-time`. Its calculations account for solar-term boundaries, longitude and timezone corrections, daylight-saving offsets, Zi-hour day boundaries, lunar-to-solar conversion, and branch relationships.

`calculate_bazi_chart` uses the fixed `DAYUN_SECOND_V2` onset policy. An exact Da Yun onset should be presented only when the response includes a calculated timing receipt with that version. If required timing information is unavailable, the response identifies the reason and marks retained scalar values as fallback data.

`detect_bazi_interactions` reports raw occurrences rather than scores or interpretive conclusions. It preserves repeated matches and separates natal, annual, and Da Yun roles. Relationship types include clashes, six-combinations, half-trines, trines, directional groupings, punishments, destructions, and harms.

## Setup and configuration

Run the server through `npx`:

```bash
npx -y @openfate/bazi-mcp
```

A typical stdio client configuration uses `npx` as the command and passes `-y` and `@openfate/bazi-mcp` as arguments. The README provides configurations for Claude Desktop, Cursor, and Cline. If Claude Desktop on macOS cannot locate `npx`, configure its absolute path instead.

For MCPB-compatible clients or Smithery, the project can build a self-contained bundle with `npm run mcpb:pack`. The resulting artifact is written under `release/`. Publishing to Smithery requires the separate `smithery auth login` step followed by the repository’s publish command.

## Tools and capabilities

- `calculate_bazi_chart`: Builds a deterministic chart from birth and calendar inputs, with optional True Solar Time correction.
- `detect_bazi_interactions`: Finds raw Earthly Branch relationship occurrences across natal, annual, and Da Yun branches.
- `calculate_true_solar_time`: Converts clock time to True Solar Time directly.
- `reverse_bazi_to_solar_times`: Finds possible Gregorian datetimes for a supplied four-pillar string.
- `get_openfate_bazi_policy`: Returns calculation policies, including day-boundary, DST, True Solar Time, and Da Yun rules.
- `get_openfate_bazi_resources`: Returns canonical OpenFate links for charts, readings, compatibility, wealth, True Solar Time, and `llms.txt`.

## Limitations and notes

OpenFate Bazi MCP MCP server does not provide an interpretation or weighted evaluation of branch relationships. Its interaction output records structural occurrences; transformation status is not evaluated, and the results do not automatically cancel or settle opposing relationships.

For the most accurate chart, provide an exact birth time, timezone or timezone ID, and longitude when using True Solar Time. Pass `dstOffset` when the recorded time includes daylight saving. Reverse lookup is only a candidate search, so each candidate should be recalculated with exact location and timezone information.

The repository’s documented Agent Skill can help Claude, Claude Code, Codex, and other compatible agents follow the calculation policy. Version 0.3 requires `@openfate/bazi-engine` version 2.

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

