bazi-lab-mcp
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
bazi-lab-mcp
MCP server for accurate BaZi (Four Pillars of Destiny) — bridges Claude, ChatGPT, Cursor and other MCP clients to the free, deterministic engine hosted at bazi-lab.com.
This process stores nothing and calls no AI model. It is a thin stdio bridge: every tool call is
forwarded to the hosted engine, which computes with calendar code and returns structured JSON. Results
carry a source attribution with canonical page URLs so any answer can be verified on the site.
Why not let the LLM compute BaZi?
LLMs asked from memory reliably get BaZi wrong: the month pillar turns at exact solar-term moments (not month boundaries), the year turns at 立春 (not Chinese New Year), and the hour pillar must be corrected to the birthplace's true solar time — legal UTC offset including historical daylight saving (China used DST in 1986–1991) plus longitude × 4 minutes. This server does all of that with calendar code, so the model only interprets — it never calculates.
Related MCP server: ming-metaphysics-mcp
Tools
Tool | What it returns |
| Four pillars with ten gods, day master element, zodiac, true-solar-time correction |
| Ten 10-year pillars (大运) with direction, start age, favourable elements, best/worst years |
| Year-by-year OHLC candles on a fixed 0–100 scale for ~96 years (comparable across people) |
| 0–100 love score from year-branch relations and the two day masters |
| Chinese almanac (黄历): day pillar, lunar date, do (宜) / avoid (忌) lists, activity matching |
| BM25 search over BaZi Lab's bilingual guides, returning excerpts with page URLs |
Setup
Hosted (recommended, no install) — point any client that supports remote MCP at:
https://www.bazi-lab.com/mcpClaude (desktop, web, mobile): Settings → Connectors → Add custom connector → paste the URL.
ChatGPT: enable Developer mode under Settings → Apps & Connectors → add the URL as a connector.
Cursor / other remote-capable clients: add a remote MCP server with the URL.
stdio via this package — for clients that only support local servers:
{
"mcpServers": {
"bazi-lab": {
"command": "npx",
"args": ["-y", "bazi-lab-mcp"]
}
}
}Claude Code: claude mcp add bazi-lab -- npx bazi-lab-mcp
Environment: set BAZI_MCP_URL to override the hosted endpoint (defaults to
https://www.bazi-lab.com/mcp; useful for tests).
Privacy & fair use
No API key, no signup, no account.
Birth data sent to a tool call is used to compute the response and is not persisted.
Fair-use rate limits apply per IP: 30 requests/minute and 600/day (one tool call ≈ 2–3 requests through this bridge). The server is read-only — it cannot write data or spend credits. Reports, saved charts and sharing live on the website.
Accuracy notes
Hour pillar: corrected from the birthplace legal clock time to local solar time (legal UTC offset + longitude × 4 minutes). Historical DST is included — a June-1990 Beijing birth is corrected by UTC+9, not UTC+8.
Year pillar turns at 立春, months at exact solar-term moments.
The 0–100 trajectory is a pure function of the twelve flow months of each year: same input, same output, two charts are directly comparable.
Pass
longitude(andcountry) whenever known — without them the engine falls back to 120°E and the nominal timezone, which shifts the true solar time by minutes (the four pillars usually stay the same).
Development
npm install
npm run build # tsc -> dist/
npm test # stdio smoke test (initialize + tools/list, no network)
node test/live-check.mjs # optional: one real call through the hosted engineBAZI_MCP_URL points the bridge elsewhere for local testing.
Related
BaZi Lab — the free website calculator, luck-pillars curve and on-site agent
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted remote MCP server for BaZi (Four Pillars) charts and the Chinese almanac. No install.
BaZi, Zi Wei, Qi Zheng Si Yu, divination and almanac from a deterministic engine. Pay per call.
BaZi MCP gateway: 14 tools (6 fortune / 5 forum / 3 meta). API key required. Entertainment only.
Free Qimen Dunjia and BaZi charts via MCP - deterministic engine, nine palaces and four pillars.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides professional Chinese astrology calculations including Four Pillars, Five Elements, zodiac signs, and lunar calendar details. It allows users to perform accurate Bazi analysis with global timezone support directly within MCP-compatible clients.15 npm10MIT
- AlicenseAqualityDmaintenanceProvides five Chinese metaphysics engines (BaZi, QMDJ, ZWDS, Feng Shui, I Ching) as MCP tools for analysis and forecasting.6MIT
- AlicenseAqualityCmaintenanceMCP server for computing BaZi (Four Pillars) charts. Supports Gregorian, lunar, or direct Four Pillars input, with optional true solar time correction, and outputs strength, pattern, and useful god.11Apache 2.0
- AlicenseAqualityDmaintenanceEnables users to compute a full Chinese Bazi (Four Pillars of Destiny) chart from a birth date, time, and place, with True Solar Time correction and historical daylight saving adjustments, running fully offline via MCP.253 npmMIT