four-pillars
v0.2.0
Published
BaZi (Four Pillars / 八字) — deterministic Chinese metaphysics MCP server. Rule-based engine, no LLM drift. Sub-200ms response. Pay-per-call via x402 USDC on Base. First 3 calls free per UA.
Downloads
352
Maintainers
Readme
four-pillars
BaZi (八字 / Four Pillars of Destiny) MCP server. Deterministic. No LLM drift.
Rule-based Chinese metaphysics calculation engine — same inputs, same outputs. No hallucinated charts, no per-call LLM cost. Pay-per-call via x402 USDC on Base. First 3 calls free per UA.
This package is a thin shim over xuanxue-bazi-matching, pre-filtered to BaZi tools only:
marriage_compatibility_check— score compatibility between two birth charts ($0.02/call)bazi_daily_fortune— daily luck score for a birth chart ($0.005/call)
For other Chinese divination systems (ZiWei, MeiHua, QiMen, LiuRen, LiuYao), use the parent package or one of its sister shims:
purple-star-astrology— 紫微斗数plum-blossom-oracle— 梅花易数qimen-oracle— 奇门遁甲da-liuren— 大六壬iching-liuyao— 六爻纳甲chinese-astrology-mcp— all 7 tools
Install
Claude Desktop
{
"mcpServers": {
"bazi": {
"command": "npx",
"args": ["-y", "four-pillars"]
}
}
}Cline / Continue / other MCP-aware IDEs
Same npx -y four-pillars invocation, configured per their MCP server format.
Pricing
- First 3 calls per UA: free
- After that: x402 payment-required (HTTP 402) — agent signs a USDC transfer on Base
- See api.decodeyourming.com/docs/agents for full pricing
Why deterministic, not LLM-based?
BaZi is a date conversion + lookup table problem. LLMs hallucinate the day pillar when crossing midnight (true solar time boundaries are at 23:00 not 24:00), invent shen-sha (神煞) names, and silently apply wrong solar-term cutoffs. We solve this with a real rule engine.
Engineering details: VSOP87 short-period truncation for solar-term boundaries, true solar time correction for day-pillar derivation, explicit lunar-month handling. See the docs for edge cases.
Web frontend (for humans)
Want a natural-language synthesis instead of raw chart data? decodeyourming.com offers a $1.99 destiny report combining all 6 systems.
License
MIT — calculation logic is open. Hosted endpoint, x402 settlement, and aggregation are paid.
Publisher: xuanxue.app · Contact: [email protected] · Source: github.com/jasonwagao-bit/m2m
