命盘(Mingpan) 是一个中华传统命理计算 MCP 服务,为 Claude 等 AI 应用提供八字与紫微斗数的排盘计算能力。
- MCP 原生:无缝集成 Claude Desktop 及 Claude Code
- 🌏 繁体中文输出:符合命理传统的专业术语
- 📊 结构化文本:便于 AI 理解与分析的格式
找到配置文件并添加以下内容:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"mingpan": {
"command": "npx",
"args": ["-y", "mingpan"]
}
}
}claude mcp add mingpan -- npx -y mingpan配置完成后重启客户端,然后尝试:
请帮我排一个八字命盘,1992年4月12日7点30分,男性
| 工具 | 说明 |
|---|---|
bazi_basic |
八字命盘排盘(四柱、藏干、十神、五行力量) |
bazi_dayun |
大运列表(十年一运) |
bazi_liunian |
流年列表(指定年份范围) |
bazi_liuyue |
流月列表(节气月,立春起算) |
bazi_liuri |
流日列表(指定月份内每日) |
| 工具 | 说明 |
|---|---|
ziwei_basic |
紫微命盘排盘(十二宫、主星、辅星、四化) |
ziwei_daxian |
大限列表(十年一限) |
ziwei_xiaoxian |
小限列表(每年一宫) |
ziwei_liunian |
流年列表(指定年份范围) |
ziwei_liuyue |
流月列表(农历月) |
ziwei_liuri |
流日列表(农历日) |
所有工具的基础输入:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| year | number | ✓ | 出生年份(1900-2100) |
| month | number | ✓ | 出生月份(1-12) |
| day | number | ✓ | 出生日期(1-31) |
| hour | number | ✓ | 出生时辰(0-23) |
| minute | number | 出生分钟(0-59),默认 0 | |
| gender | string | ✓ | male / female |
| longitude | number | 出生地经度,用于真太阳时校正 |
| 系统 | 月份基准 | 日期基准 |
|---|---|---|
| 八字 | 节气月(立春起算) | 公历日 |
| 紫微 | 农历月(初一起算) | 农历日 |
git clone https://github.com/ChesterRa/mingpan.git
cd mingpan
npm install
npm run build
npm run dev # 监听变化| 库 | 用途 |
|---|---|
@modelcontextprotocol/sdk |
MCP 协议实现 |
lunar-javascript |
农历/公历转换 |
iztro |
紫微斗数计算引擎 |
zod |
输入参数校验 |
- 八字基础排盘与时运列表
- 紫微基础排盘与时运列表
- 大六壬、六爻等其他术数系统
Apache License 2.0