Xuanqing MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Xuanqing MCP Cast a BaZi chart for 1990-05-15 14:30 male in Urumqi with true solar time."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Xuanqing MCP (xuanqing-mcp)
Verifiable BaZi & Ziwei Dou Shu MCP Server, Agent Skill, Classical Provenance Auditor & Ink Poster Generator
Zero Charting Hallucination × Zero Fabricated Citations
Live Interactive Playground ↗ · npm Package ↗ · Try Full Web App (DaoKeDao 道可道) ↗ · Auditable Corpus & Benchmark ↗ · Book Distillation Framework ↗
Most AI astrology MCP servers and skills solve charting hallucination (stopping LLMs from miscalculating pillars or stars), yet still let models fabricate classical book quotes, confuse branch interactions (e.g. calling Zi-Mao a "Harm" when it is a "Punishment"), and flatten disagreeing schools into one dogmatic verdict.
xuanqing-mcp adds the missing second line of defense:
Deterministic Dual-Engine Charting + True Solar Time Cross-Shichen Guard (
@openfate/bazi-engine+@openfate/true-solar-time+iztro), issuing stablefact_idregistries andSHA-256hashes.Classical Claim Verifier backed by 278 CC BY-SA 4.0 Chinese Wikisource short excerpts across 8 classical volumes (Yuanhai Ziping, Sanming Tonghui, Ditian Sui Chanwei, Ziwei Doushu Quanshu) + 13 audited deterministic reference tables.
4-Tier Anti-Hallucination Reading Auditor (
fact/source/interpretation/uncertain) that rejects fabricatedentry_ids and downgrades unverified or example-generalized claims.New-Chinese Ink-Gold HTML/SVG Poster Generator (
render_chart_poster) with an inline SVG Four-Pillar Branch Relation Field and traditional 12-Palace Ziwei grid.
30-Second Quickstart
1. MCP Server (Claude Desktop / Cursor / Windsurf / Cline)
Add to your MCP config (claude_desktop_config.json, .cursor/mcp.json, etc.):
{
"mcpServers": {
"xuanqing": {
"command": "npx",
"args": ["-y", "xuanqing-mcp"]
}
}
}2. Agent Skill (Claude Code / OpenClaw / TypingMind / Codex)
npx skills add https://github.com/bobobo2026/xuanqing-mcp --skill xuanqing-fateOr copy skills/xuanqing-fate/SKILL.md into your agent's skills/ directory.
3. CLI (Zero-Setup Terminal Check)
# Intercept a false branch-relation claim (Zi-Mao is Punishment, not Harm!)
npx -y xuanqing-mcp verify "子卯害"
# Inspect cross-classic disagreement (Sanming Tonghui vs Ditian Sui on Storage Clash)
npx -y xuanqing-mcp verify "墓库开库"
# Cast BaZi with True Solar Time cross-shichen detection (Urumqi 87.62°E)
npx -y xuanqing-mcp bazi --date 1990-05-15 --time 14:30 --gender male --city 乌鲁木齐
# Render a self-contained New-Chinese Ink-Gold Dual Chart Poster
npx -y xuanqing-mcp poster --date 1995-08-22 --time 09:15 --gender female --city 北京 --mode dual --out poster.htmlRelated MCP server: 命盘 MCP Server
Why Xuanqing? (Landscape Comparison)
Capability | Raw LLM | Typical BaZi/Ziwei MCP or Skill |
|
BaZi + Ziwei Dual Deterministic Engines | Mental math (frequent errors) | Single or dual engine | Dual ( |
True Solar Time Cross-Shichen Alert | None | Silent override or ignored | Explicit cross-shichen / cross-day boundary warning |
Branch-Relation Trap Interception ( | Often agrees with user | Not checked | Intercepted deterministically against truth tables |
Classical Provenance (Wikisource URL + SHA-256) | Fabricates quotes | Uncited summary prompts | 278 CC BY-SA 4.0 excerpts (8 volumes) with permalinks |
Cross-Classic Disagreement Preservation | Flattens into one voice | Single-school prompt | Side-by-side conflicts (e.g. Sanming vs Ditian Sui) |
Automated 4-Tier Reading Audit Validator | None | None |
|
Offline Ink-Gold Relation Field + 12-Palace Poster | Text only | Basic HTML | Zero-CDN SVG Relation Arcs + 12-Palace Grid ( |
Copyright & Privacy Boundary | N/A | Often scrapes copyrighted courses | Strict Fail-Closed Allowlist (MIT code + CC BY-SA 4.0 data) |
MCP Tools, Resources & Prompts
Tool | Purpose |
| Deterministic Four Pillars, True Solar Time check, hidden stems, Ten Gods, NaYin, 12 Growth Stages, branch interactions (presence-only), core ShenSha, DaYun, |
| Deterministic 12-Palace Ziwei astrolabe ( |
| Casts both BaZi & Ziwei, checks cross-engine True Solar Time consistency, aligns DaYun vs DaXian on a shared age/year timeline without conflating traditions |
| Fact-checks claims against 13 deterministic tables, reviewed cross-classic conflicts, and 278 CC BY-SA 4.0 excerpts; explicitly returns |
| Audits AI reading drafts against |
| Generates a self-contained New-Chinese Ink-Gold HTML/SVG chart & branch relation field poster (`mode: dual |
Also exposes MCP Resources (xuanqing://corpus/overview, xuanqing://reference-tables/index) and Prompt (verifiable_dual_reading).
Xuanqing Open-Source Ecosystem
xuanqing-mcp(this repo) — Verifiable BaZi & Ziwei MCP Server, Agent Skill & Ink Poster Generator.xuanqing-tianji-knowledge— Dual-System CC BY-SA 4.0 Auditable Classical Corpus +Fate-Hallucination-Benchv1.0 (60-question anti-hallucination benchmark for LLMs).evidence-distill— Domain-agnostic Audit-Grade Book & Long-Corpus Distillation Framework for AI Agents (Prompt-Injection Firewall, Multi-School Isolation, Zero-Weight Dedup, Release Gates & Incremental Concept Dossiers).DaoKeDao (道可道) Web App — Looking for a zero-setup mobile/web experience with 159 verifiable reference pages, persistent multi-chart archives, and deep topic QA? Try DaoKeDao online.
Licenses & Research Boundary
Code: MIT License.
Bundled Classical Excerpts (
data/*.jsonl): CC BY-SA 4.0 derived from Chinese Wikisource (<= 180Unicode code points per excerpt,full_text_included: false). Zero proprietary course transcripts, personal birth archives, or unverified web articles are included.Boundary: Provided strictly for traditional cultural research, deterministic calendar computation, and AI hallucination auditing. Not medical, legal, financial, or scientific prediction advice.
Available Tools
6 toolsaudit_reading_responseA
Audit an AI-generated BaZi/Ziwei reading draft against deterministic fact IDs and verified corpus entry IDs. Enforces 4-tier separation (fact / source / interpretation / uncertain), blocks fabricated citations, downgrades background_only or example-only generalizations, and flags high-risk absolute medical/financial/marriage claims.
Inputs: sections (required), valid_fact_ids, valid_entry_ids.
cast_bazi_chartB
Cast a deterministic BaZi (Four Pillars of Destiny / 八字排盘) chart with True Solar Time correction, cross-shichen boundary detection, core ShenSha lookups, branch interactions (presence-only), DaYun cycles, and a stable fact_registry + SHA-256 hash.
Inputs: date (required), gender (required), city, time, +6 more.
cast_ziwei_chartB
Cast a deterministic Ziwei Dou Shu (紫微斗数) 12-palace astrolabe via iztro with explicit True Solar Time cross-shichen boundary validation, natal transformations (四化), decadal cycles (大限), and stable fact_registry.
Inputs: date (required), gender (required), city, time, +6 more.
cross_verify_chartsA
Cast BOTH BaZi and Ziwei Dou Shu charts for the same birth profile, verify True Solar Time consistency across engines, align BaZi DaYun and Ziwei DaXian timelines without conflating traditions, and suggest classical verification queries.
Inputs: date (required), gender (required), city, time, +5 more.
render_chart_posterC
Generate a self-contained New-Chinese Ink-Gold HTML + SVG chart poster featuring Four Pillars, SVG Branch Relation Field arcs, Five-Element distribution, DaYun strip, and optional 12-Palace Ziwei astrolabe.
Inputs: date (required), gender (required), city, mode, +4 more.
verify_classical_claimA
Verify a BaZi or Ziwei claim/concept against 278 CC BY-SA 4.0 Wikisource excerpts (8 classical volumes: 渊海子平/三命通会/滴天髓阐微/紫微斗数全书) and 13 deterministic reference tables. Catches factual traps (e.g. 子卯害 -> actual 相刑), surfaces cross-classic conflicts side by side (e.g. 墓库开库), and refuses to fabricate citations.
Inputs: query (required), limit, domain.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct role: two casting tools split cleanly by tradition (BaZi vs Ziwei), plus rendering, cross-verification, corpus verification, and draft auditing. The only soft overlap is between cast_bazi_chart/cast_ziwei_chart and cross_verify_charts, which re-casts both charts internally, but the descriptions make the 'single tradition' vs 'aligned dual-engine' distinction reasonably clear.
All names are snake_case and verb-first (render_, cast_, cross_verify_, verify_, audit_), with the noun consistently naming the object acted upon. No casing or style drift across the six tools.
Six tools is well-scoped for a domain that naturally decomposes into cast-BaZi, cast-Ziwei, render, cross-verify, verify-source, and audit-output. No tool looks redundant or like filler, and none of the responsibilities are crammed into a mega-tool.
The surface covers the full workflow from casting through rendering, cross-tradition verification, classical citation checking, and output auditing, with stable fact_registry hashes for traceability. Minor gaps: no tool to retrieve or re-list a previously cast chart by its registry/hash, and no direct search over the 278-excerpt corpus or the 13 reference tables outside of claim verification.
Maintenance
Related MCP Connectors
Deterministic BaZi and Chinese metaphysics tools for AI agents: charts, divination, almanac.
Calculate authentic Four Pillars (BaZi) natal charts & classical poetic Chinese names.
Verifiable Chinese calendar & feng shui: BaZi, flying stars, Kua, almanac. SHA-256 replayable.
Free BaZi, I Ching, tarot, Zi Wei and bilingual learning tools with transparent methods. No API key.
Related MCP Servers
AlicenseBqualityBmaintenanceEnables AI agents to calculate deterministic Bazi (Four Pillars) charts with True Solar Time and Earthly Branch interactions, avoiding LLM hallucination of calendrical math.16355 npm166MIT- AlicenseAqualityBmaintenanceEnables AI applications to generate deterministic Chinese metaphysics charts and divination hexagrams—including Bazi, Ziwei, Liuyao, Meihua, Daliuren, and Qimen—plus solar-term and lunar/Gregorian calendar queries, with multi-timezone support.18Apache 2.0
- AlicenseAqualityBmaintenanceDeterministic BaZi (Four Pillars of Destiny / 四柱推命 / 八字) astronomical 24 solar-term perpetual calendar MCP server with universal-UTC solar-term transitions, True Solar Time, IANA historical DST rollback, and an open 100-case LLM accuracy benchmark.3341 npmMIT
- AlicenseCqualityBmaintenanceEnables local AI assistants to generate deterministic Chinese metaphysics charts across 16 tools, retrieve classical texts and personal long-term memory, and archive or calibrate readings through 22 MCP tools.22MIT