ming-metaphysics-mcp
This server provides six Chinese metaphysics engines as MCP tools, enabling AI-powered divination and destiny analysis across multiple classical traditions:
BaZi Analysis (
ming_bazi_analyze): Compute a full BaZi (Four Pillars) chart given a birth date, gender, optional birth hour, and location — returns Day Master analysis, pattern classification (格局), decade luck pillars (大运), and annual outlook.Qi Men Dun Jia Direction Reading (
ming_qmdj_direction): Get optimal directions, best timing windows, and strategic framing for a specific date and intention using classical QMDJ.Zi Wei Dou Shu Natal Chart (
ming_zwds_chart): Generate a twelve-palace natal chart with starred positions, 四化 transformations, and palace-focused narrative for domains like career, wealth, marriage, and health.Feng Shui Flying Stars & Kua Analysis (
ming_fengshui_flying_stars): Calculate Kua number, Eight Mansions directional analysis, and annual Flying Star map (年飛星) for any year between 1700–2100, with favorable/unfavorable directional guidance.I Ching Hexagram Casting (
ming_iching_cast): Cast a hexagram using the classical 納甲法 (Liu Yao method) for a specific question, returning the hexagram, changing lines, transformed hexagram, and interpretation.Integrated Five-Engine Forecast (
ming_full_forecast): Run all four birth-data engines (BaZi + ZWDS + Feng Shui + QMDJ) together to produce a unified forecast focused on a specific domain (wealth, career, health, relationship, or general) for a target year.
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., "@ming-metaphysics-mcp Analyze BaZi for 1990-03-15 male Singapore"
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.
ming-metaphysics-mcp
Five Chinese metaphysics engines as MCP tools for Claude Desktop and any MCP-compatible client.
vs Cantian's bazi-mcp
Dimension | Cantian | Ming |
Arts covered | BaZi only | All five — BaZi + QMDJ + ZWDS + Feng Shui + I Ching |
Engine depth | Good BaZi implementation | 9.0–9.5/10 expert-verified across all five engines |
Classical sourcing | Not documented | 子平真詮, 淵海子平, 紫微斗數全書 + 108-title library cited |
Output quality | Competent readings | Scholar-validated, bilingual (EN/ZH), report-grade depth |
Consultation funnel | None | Master reading available via Ming Bot (link TBA) |
Kua + Eight Mansions | ❌ | ✅ |
QMDJ timing | ❌ | ✅ (sxtwl Ju computation) |
I Ching (Liu Yao) | ❌ | ✅ (classical 納甲法) |
Related MCP server: 命盘 Mingpan
Tools
Tool | Engine | Description |
| BaZi 八字 | Four Pillars chart — Day Master, pattern, luck pillars |
| QMDJ 奇門 | Optimal direction + timing window for a date |
| ZWDS 紫微 | Twelve-palace natal chart with 四化 transformations |
| Feng Shui 風水 | Kua number + Eight Mansions directional analysis |
| I Ching 易經 | Hexagram via classical 納甲法 (Liu Yao) |
| All four birth-data engines | Integrated five-engine forecast with confidence score |
Engine requirement
This package is an MCP wrapper. It does not contain metaphysics
calculation logic — it forwards tool calls to a Ming engine endpoint over
HTTP. To use it, point MING_API_URL at a running engine.
Two ways to get an engine:
Hosted endpoint (preferred, when available). A public Ming endpoint will be announced; once available, configure
MING_API_URLto point at it and you're done.Self-host. The Ming engine itself is currently a closed-source reference implementation. If you have access to the Ming codebase, run
uvicorn api.main:app --port 8000and point this MCP atlocalhost:8000.
Without a reachable engine, the MCP server starts and lists tools, but tool calls return an HTTP error.
Install
Step 1 — Ensure an engine is reachable
See "Engine requirement" above.
Step 2 — Install the MCP server
npm install -g @espivc/ming-metaphysics-mcpStep 3 — Add to claude_desktop_config.json
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ming": {
"command": "ming-metaphysics-mcp",
"args": [],
"env": {
"MING_API_URL": "http://localhost:8000"
}
}
}
}Restart Claude Desktop. The Ming tools will appear in the tools list.
Verification
In Claude Desktop:
Using the ming_bazi_analyze tool, analyze the chart for someone born 1990-03-15, male, in Singapore.You should get a full BaZi reading. If the tool errors, verify the Python engine is running at port 8000.
Endpoint Gaps
The following capabilities require FastAPI expansion before they fully function as specified. Each is flagged with a note in the tool response — no silent failures.
Gap | Affected Tool | Required FastAPI Change |
Annual flying star map for a specific year |
|
|
|
|
|
Full ISO casting_timestamp |
|
|
| All individual tools | The spec assumed |
To implement year-specific flying stars or forecast_year support, add those parameters to /consult in api/main.py and update the corresponding tool handlers here.
Development
git clone <this-repo>
cd ming-metaphysics-mcp
npm install
npm run build # compile TypeScript → dist/
npm test # smoke tests (no engine required)
# With engine running at localhost:8000:
npx ts-node scripts/benchmark.ts --tool all --iterations 5Environment variables
Variable | Default | Description |
|
| Base URL of the Ming FastAPI engine |
Latency targets
Tool | Target |
| < 3s |
| < 3s |
| < 3s |
| < 5s |
| < 5s |
| < 3s |
If any tool exceeds 5s consistently, check the engine bottleneck and consider adding timeout: 10000 to the MCP config.
Auth
None at the wrapper level — this server is open-source and free (MIT
license). Authentication, if any, is enforced by whatever endpoint
MING_API_URL points at.
For a complete five-engine reading
A guided five-engine consultation (BaZi + ZWDS + QMDJ + Feng Shui + I Ching synthesised by Master Chen) is available via Ming's Telegram bot. Link will be published once the bot is in public beta.
Privacy
This MCP wrapper itself does not collect data. It forwards your tool
arguments (birth date, hour, gender, question text) to whichever
MING_API_URL you configured. If you point at a hosted endpoint, that
endpoint receives the data — read its privacy policy. If you self-host,
nothing leaves your network.
Birth data is sensitive. If you're configuring this for end users, be explicit about which endpoint receives their inputs.
Project status
This package is at version 1.0.0. The MCP protocol surface (6 tools, JSON
schemas, response shapes) is stable. The underlying Ming engine evolves
faster — minor numeric changes in tool responses are normal.
Contributions welcome — see CONTRIBUTING.md.
License
MIT — see LICENSE.
Available Tools
6 toolsming_bazi_analyzeA
Compute a full BaZi (Four Pillars of Destiny 八字) chart. Returns Day Master analysis, pattern classification (格局), decade luck pillars (大运), and annual outlook. Engine verified against 子平真詮 and 淵海子平. Requires Ming engine running at MING_API_URL.
Inputs: birth_date (required), gender (required), birth_hour, birth_location, +1 more.
ming_fengshui_flying_starsA
Compute the Kua number (卦命), directional analysis, and annual Flying Star map (年飛星) for a person. Returns Kua group, favorable/unfavorable directions per Eight Mansions (八宅法), the nine-palace annual star chart for the requested year, and a five-engine directional synthesis.
Inputs: year (required), birth_date (required), gender (required), location_description.
ming_full_forecastA
Run all four birth-data engines (BaZi + ZWDS + Feng Shui + QMDJ) for a birth profile and return an integrated Master-tier forecast. I Ching is excluded from bulk forecasts (it requires a specific question — use ming_iching_cast separately).
Inputs: birth_date (required), gender (required), birth_hour, birth_location, +3 more.
ming_iching_castA
Cast an I Ching (易經) hexagram using the classical 納甲法 (Liu Yao method). Returns the hexagram, changing lines, transformed hexagram, and interpretation. The casting derives from the current date/time (SGT) by default.
Inputs: question (required), casting_timestamp.
ming_qmdj_directionA
Compute a Qi Men Dun Jia (奇門遁甲) reading for a specific date. Returns the optimal direction, best timing windows, lead star, and strategic framing. Ju number computed via sxtwl solar term library for classical accuracy.
Inputs: question (required), date, hour.
ming_zwds_chartB
Compute a Zi Wei Dou Shu (紫微斗數) twelve-palace natal chart. Returns palace highlights, starred positions, 四化 transformations, and synthesis for a specific question domain. Verified against 紫微斗數全書.
Inputs: birth_date (required), birth_hour (required), gender (required), birth_location, +1 more.
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 covers a distinct metaphysical system (BaZi, Feng Shui, I Ching, QMDJ, ZWDS) plus a combined forecast, with no overlapping purposes.
All tools follow a consistent 'ming_system_action' pattern in snake_case, e.g., ming_bazi_analyze, ming_iching_cast.
With 6 tools covering the main systems of Chinese metaphysics, the count is well-scoped and appropriate for the server's purpose.
The tool set covers all major Chinese metaphysical systems (BaZi, ZWDS, QMDJ, Feng Shui, I Ching) and includes a combined forecast, leaving no obvious gaps.
Related MCP Connectors
Free Qimen Dunjia and BaZi charts via MCP - deterministic engine, nine palaces and four pillars.
BaZi MCP gateway: 14 tools (6 fortune / 5 forum / 3 meta). API key required. Entertainment only.
Deterministic BaZi and Chinese metaphysics tools for AI agents: charts, divination, almanac.
Free BaZi, I Ching, tarot, Zi Wei and bilingual learning tools with transparent methods. No API key.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables traditional Chinese metaphysics tools like Bazi, Ziwei, and Qimen via MCP, integrating AI analysis for divination and fortune-telling.759AGPL 3.0
- AlicenseAqualityBmaintenanceProvides traditional Chinese astrology (Bazi, Ziwei) and divination (Liuyao, Meihua, Qimen, etc.) calculations as MCP tools for AI assistants.18266 npm131Apache 2.0
- AlicenseAqualityCmaintenanceProvides Chinese metaphysical tools (bazi, qimen, five elements) as MCP tools for AI agents to give personalized advice on timing, compatibility, and daily energy.582 npm2MIT
- AlicenseAqualityDmaintenanceProvides MCP tools for Chinese metaphysics, including BaZi (Four Pillars) charting, Liu Yao hexagram casting, lunar conversion, and AI-powered destiny analysis.1017 npmMIT