ming-metaphysics-mcp
ming-metaphysics-mcp
将五种中国玄学引擎作为 MCP 工具,适用于 Claude Desktop 及任何兼容 MCP 的客户端。
与 Cantian 的 bazi-mcp 对比
维度 | Cantian | Ming |
涵盖术数 | 仅八字 | 全部五种 — 八字 + 奇门 + 紫微 + 风水 + 易经 |
引擎深度 | 良好的八字实现 | 9.0–9.5/10 专家级验证,涵盖全部五种引擎 |
古典来源 | 未记录 | 《子平真诠》、《渊海子平》、《紫微斗数全书》及 108 部引用书目 |
输出质量 | 胜任解读 | 学者验证,双语 (EN/ZH),报告级深度 |
咨询渠道 | 无 | 可通过 Ming Bot 进行大师解读(链接待定) |
卦象 + 八宅 | ❌ | ✅ |
奇门时间 | ❌ | ✅ (sxtwl 局计算) |
易经 (六爻) | ❌ | ✅ (古典纳甲法) |
Related MCP server: 命盘 Mingpan
工具
工具 | 引擎 | 描述 |
| 八字 | 四柱命盘 — 日主、格局、大运 |
| 奇门 | 指定日期的最佳方位 + 时间窗口 |
| 紫微 | 十二宫命盘及四化转换 |
| 风水 | 命卦 + 八宅方位分析 |
| 易经 | 通过古典纳甲法(六爻)起卦 |
| 全部四种出生数据引擎 | 综合五引擎预测及置信度评分 |
引擎要求
此包是一个 MCP 封装器。它不包含玄学计算逻辑 — 它通过 HTTP 将工具调用转发给 Ming 引擎端点。要使用它,请将 MING_API_URL 指向正在运行的引擎。
获取引擎的两种方式:
托管端点(推荐,如有)。公共 Ming 端点即将发布;一旦可用,配置
MING_API_URL指向它即可。自托管。Ming 引擎本身目前是闭源参考实现。如果您有权访问 Ming 代码库,请运行
uvicorn api.main:app --port 8000并将此 MCP 指向localhost:8000。
如果没有可访问的引擎,MCP 服务器会启动并列出工具,但工具调用会返回 HTTP 错误。
安装
第 1 步 — 确保引擎可访问
请参阅上方的“引擎要求”。
第 2 步 — 安装 MCP 服务器
npm install -g ming-metaphysics-mcp第 3 步 — 添加到 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"
}
}
}
}重启 Claude Desktop。Ming 工具将出现在工具列表中。
验证
在 Claude Desktop 中:
Using the ming_bazi_analyze tool, analyze the chart for someone born 1990-03-15, male, in Singapore.您应该会得到一份完整的八字解读。如果工具报错,请检查 Python 引擎是否在 8000 端口运行。
端点差距
以下功能在完全按规范运行前需要扩展 FastAPI。每一项都在工具响应中标记了说明 — 不会静默失败。
差距 | 受影响工具 | 所需 FastAPI 更改 |
特定年份的年度飞星图 |
|
|
|
|
|
完整的 ISO 起卦时间戳 |
|
|
| 所有独立工具 | 规范假设 |
要实现特定年份的飞星或 forecast_year 支持,请在 api/main.py 的 /consult 中添加这些参数,并在此处更新相应的工具处理程序。
开发
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 5环境变量
变量 | 默认值 | 描述 |
|
| Ming FastAPI 引擎的基准 URL |
延迟目标
工具 | 目标 |
| < 3s |
| < 3s |
| < 3s |
| < 5s |
| < 5s |
| < 3s |
如果任何工具持续超过 5 秒,请检查引擎瓶颈,并考虑在 MCP 配置中添加 timeout: 10000。
认证
封装层级无认证 — 此服务器是开源且免费的(MIT 许可证)。如有任何认证,均由 MING_API_URL 指向的端点强制执行。
获取完整的五引擎解读
通过 Ming 的 Telegram 机器人可获得由陈大师综合的五引擎咨询(八字 + 紫微 + 奇门 + 风水 + 易经)。链接将在机器人进入公开测试阶段后发布。
隐私
此 MCP 封装器本身不收集数据。它会将您的工具参数(出生日期、时间、性别、问题文本)转发给您配置的 MING_API_URL。如果您指向托管端点,该端点将接收数据 — 请阅读其隐私政策。如果您自托管,数据不会离开您的网络。
出生数据是敏感信息。如果您为最终用户配置此项,请明确告知哪个端点会接收他们的输入。
项目状态
此包版本为 1.0.0。MCP 协议表面(6 个工具、JSON 模式、响应形状)是稳定的。底层的 Ming 引擎演进较快 — 工具响应中的微小数值变化属于正常现象。
欢迎贡献 — 请参阅 CONTRIBUTING.md。
许可证
MIT — 请参阅 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.
Maintenance
Related MCP Connectors
Free Qimen Dunjia and BaZi charts via MCP - deterministic engine, nine palaces and four pillars.
Deterministic Chinese BaZi (Four Pillars) astrology MCP server with true solar time correction.
BaZi MCP gateway: 14 tools (6 fortune / 5 forum / 3 meta). API key required. Entertainment only.
Hosted remote MCP server for BaZi (Four Pillars) charts and the Chinese almanac. No install.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables traditional Chinese metaphysics tools like Bazi, Ziwei, and Qimen via MCP, integrating AI analysis for divination and fortune-telling.818AGPL 3.0
- AlicenseAqualityBmaintenanceProvides traditional Chinese astrology (Bazi, Ziwei) and divination (Liuyao, Meihua, Qimen, etc.) calculations as MCP tools for AI assistants.18760 npm139Apache 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.590 npm2MIT
- AlicenseAqualityDmaintenanceProvides MCP tools for Chinese metaphysics, including BaZi (Four Pillars) charting, Liu Yao hexagram casting, lunar conversion, and AI-powered destiny analysis.1037 npmMIT