BaZi Solar-Term MCP (Fate Partner)
Deterministic astronomical BaZi (Four Pillars of Destiny / 四柱推命) MCP server, CLI, Agent Skill & 100-case LLM boundary benchmark with exact 24 solar-term UTC instants, True Solar Time calibration, and historical DST rollback (<2ms, 0 tokens). Published on npm as bazi-solar-term-mcp.
Dokümantasyon
bazi-solar-term-mcp
Deterministic BaZi (Four Pillars of Destiny / 四柱推命 / 八字) MCP Server, CLI, Agent Skill & 100-Case Solar-Term Boundary Benchmark (MIT)
日本語 README · 繁體中文 README · Agent Skill (SKILL.md) · npm (bazi-solar-term-mcp) · LobeHub MCP · Official Methodology (Fate Partner)
Why This Exists: 5-Model 100-Case Astronomical Boundary Benchmark (v1.1)
General-purpose LLMs generate tokens probabilistically without an astronomical ephemeris. When asked to compute BaZi / Four Pillars directly from a birthday, fast and non-reasoning models routinely miscalculate Year, Month, Day Master, or Hour Pillars around Start of Spring (立春), the 24 Solar Terms, True Solar Time, Late Zi hour (23:00–23:59), and historical Daylight Saving Time — while frontier reasoning models burn tens of thousands of thinking tokens (~5–18 minutes per 100 charts) and still make minute-level solar-term mistakes.
Using this repository's open-source 100-case universal-UTC boundary benchmark (benchmark/bazi-boundary-100.json, v1.1.0), we audited 5 zero-tool LLMs on 2026-11-22 (full multi-model results):
| Model / Engine | Protocol & Reasoning Budget | Exact 4-Pillar | Any-Pillar Error | LiChun Err (25) | 12-Jie Err (25) | True Solar Time Err (20) | Late Zi Err (15) | Historical DST Err (15) |
|---|---|---|---|---|---|---|---|---|
| DeepSeek-Chat | Non-reasoning REST API (temp=0, 1/call) | 22.0% | 78.0% | 72.0% | 48.0% | 100.0% | 86.7% | 100.0% |
Gemini 3.8 Flash (Medium) | Zero-tool blind 50×2 (~53k thinking tokens) | 56.0% | 44.0% | 12.0% | 48.0% | 95.0% | 33.3% | 33.3% |
Claude Sonnet 5.5 (Medium) | Zero-tool blind 50×2 (~49k thinking tokens) | 84.0% | 16.0% | 16.0% | 32.0% | 10.0% | 6.7% | 6.7% |
Claude Opus 5.5 (Medium) | Zero-tool blind 50×2 (~38k thinking tokens) | 96.0% | 4.0% | 0.0% | 12.0% | 0.0% | 6.7% | 0.0% |
Gemini 4 Carbon (Medium) | Zero-tool blind 50×2 (~105k thinking tokens / ~18m) | 100.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
bazi-solar-term-mcp (MIT) | Deterministic ephemeris (<2 ms / 0 tokens) | 100.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
Methodological transparency notes:
- Upper-bound condition: Every test prompt explicitly supplied city longitude, IANA time zone,
TST=YES/NOflag, and DST/Late-Zi rules. Casual consumer chat prompts without longitude or DST reminders exhibit even higher error rates.- Excluded model:
GPT-OSS 120B (Medium)refused zero-tool computation on Attempt 1 and collapsed into repeated placeholder strings (甲子|甲子|甲子|甲子) under 50-case batching on Attempt 2; excluded to avoid strawmanning.- v1.1.0 Changelog (Open-Source Audit Win): Cross-model disagreement auditing caught a 1-hour cross-timezone solar-term bug in v1.0.0 affecting 10 Japan (
Asia/Tokyo, UTC+9) boundary cases (lunar-javascriptreturns solar terms in UTC+8). v1.1.0 aligns all Year/Month solar-term comparisons to universal UTC instants (birthUtcMs >= solarTermUtcMs), verified across JST (UTC+9), CST (UTC+8), and EST (UTC-5).
Plug bazi-solar-term-mcp into Claude, Cursor, Codex, or any MCP-compatible agent to replace probabilistic guessing and 1,000-token mental arithmetic with <2 ms, 0-token deterministic astronomical chart math.
MCP Tools Included
calculate_bazi_chart— Computes Year, Month, Day, and Hour Pillars, Day Master polarity/element, surface Five Elements, governing Solar Term instant, historical DST rollback, and True Solar Time offset.check_solar_term_boundary— Returns all 24 astronomical Solar Terms for the birth year and flags whether the birthday falls within a high-hallucination boundary window.audit_llm_bazi_answer— Grades any chatbot's claimed Four Pillars against the astronomical ground truth and pinpoints exact mismatches.
Quick Start (MCP Server)
Claude Desktop / Cursor / Windsurf (mcpServers)
{
"mcpServers": {
"bazi-solar-term": {
"command": "npx",
"args": ["-y", "bazi-solar-term-mcp"]
}
}
}
CLI Usage
# Run directly via npx (no clone required)
npx -y bazi-solar-term-mcp calculate "1992-11-03 00:35" --city Tokyo
# Inspect nearest Solar Term boundary
npx -y bazi-solar-term-mcp solar-terms "1991-06-06 12:18"
# Audit a chatbot's claimed pillars
npx -y bazi-solar-term-mcp audit "1992-11-03 00:35" 壬申 庚戌 癸未 壬子 --city Tokyo
# Or run from a local clone
npm install && npm test
Scope & Attribution
- Open-Source (MIT): Deterministic astronomical calendar engine, True Solar Time & IANA DST normalizer, MCP server, Agent Skill (
SKILL.md), and the 100-case public boundary benchmark. - Full Relationship Compatibility Platform: Maintained by Fate Partner — a calm, non-fatalistic BaZi dual relationship compatibility platform available in Japanese, Traditional Chinese, Simplified Chinese, and English (Official Facts & Methodology · Free Dual Chart).