New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mingpan

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mingpan

MCP service for accurate Bazi and Ziwei chart calculations

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

命盘 MCP Server

Version License

命盘(Mingpan) 是一个中华传统术数 MCP 服务,为 Claude 等 AI 应用提供命理排盘与占卜起卦的计算能力。

特性

  • MCP 原生:无缝集成 Claude Desktop 及 Claude Code
  • 🌏 中文输出:以简体为主,术语保持传统
  • 📊 结构化文本:便于 AI 理解与分析的格式

配置方法

Claude Desktop

找到配置文件并添加以下内容:

  • 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 Code

claude mcp add mingpan -- npx -y mingpan

验证

配置完成后重启客户端,然后尝试:

请帮我排一个八字命盘,1992年4月12日7点30分,男性

请帮我起一个奇门遁甲时盘,2024年6月21日10点

工具列表

命理排盘

命理学基于出生时间推算人生运势,属于「命」的范畴。

八字命理

工具说明
bazi_basic八字命盘排盘(四柱、藏干、十神、五行力量)
bazi_dayun大运列表(十年一运)
bazi_liunian流年列表(指定年份范围)
bazi_liuyue流月列表(节气月,立春起算)
bazi_liuri流日列表(指定月份内每日)

紫微斗数

工具说明
ziwei_basic紫微命盘排盘(十二宫、主星、辅星、四化)
ziwei_daxian大限列表(十年一限)
ziwei_xiaoxian小限列表(每年一宫)
ziwei_liunian流年列表(指定年份范围)
ziwei_liuyue流月列表(农历月)
ziwei_liuri流日列表(农历日)

占卜起卦

占卜术基于起卦时间或随机数推演卦象,属于「卜」的范畴。

六爻

工具说明
liuyao_basic六爻排盘(本卦/变卦、纳甲、六亲、六神、世应、旬空)

六爻输入为六个爻值(自下而上):

  • 6 = 老阴(动爻,阴变阳)
  • 7 = 少阳(静爻)
  • 8 = 少阴(静爻)
  • 9 = 老阳(动爻,阳变阴)

梅花易数

工具说明
meihua_basic梅花易数排盘(本卦/变卦/互卦、体用分析)

支持两种起卦方式:

  • 时间起卦:根据农历年月日时计算
  • 数字起卦:根据两个数字计算

大六壬

工具说明
daliuren_basic大六壬排盘(天地盘、四课、三传、十二天将、神煞)

大六壬为三式之首,需输入节气、农历月、日干支、时干支。

奇门遁甲

工具说明
qimen_basic奇门遁甲排盘(九宫布局、三奇六仪、八门九星八神、格局判断)
qimen_yongshen奇门用神分析(按事类选取用神,含主客、旺衰、空亡、入墓等)
qimen_zeri奇门择日(指定日期区间内筛选相对更佳的时机)

奇门遁甲为三式之一,盘式与规则主要参考张志春《神奇之门》,支持:时盘/日盘/月盘/年盘、转盘/飞盘、拆补法/茅山法。

更多说明见:docs/qimen-yongshen-guide.md

输入参数

命理工具(八字/紫微)

参数类型必填说明
yearnumber出生年份(1900-2100)
monthnumber出生月份(1-12)
daynumber出生日期(1-31)
hournumber出生时辰(0-23)
minutenumber出生分钟(0-59),默认 0
genderstringmale / female
longitudenumber出生地经度,用于真太阳时校正
isLunarboolean是否为农历输入,默认 false

占卜工具(六爻/梅花/大六壬)

占卜工具使用起卦时间而非出生时间,具体参数请参考各工具说明。

奇门遁甲工具

参数类型必填说明
yearnumber起盘年份(1900-2100)
monthnumber起盘月份(1-12)
daynumber起盘日期(1-31)
hournumber起盘时辰(0-23)
minutenumber分钟(0-59),默认 0
isLunarboolean是否为农历输入,默认 false
panTypestring时盘 / 日盘 / 月盘 / 年盘,默认 时盘
panStylestring转盘 / 飞盘,默认 转盘
zhiRunMethodstringchaibu(拆补法)/ maoshan(茅山法),默认 chaibu

月份基准说明

系统月份基准日期基准
八字节气月(立春起算)公历日
紫微农历月(初一起算)农历日

开发

git clone https://github.com/ChesterRa/mingpan.git
cd mingpan
npm install
npm run build
npm run dev  # 监听变化

依赖

用途
@modelcontextprotocol/sdkMCP 协议实现
lunar-javascript农历/公历转换
iztro紫微斗数计算引擎
zod输入参数校验

路线图

  • 八字基础排盘与时运列表
  • 紫微基础排盘与时运列表
  • 六爻排盘
  • 梅花易数排盘
  • 大六壬排盘
  • 奇门遁甲排盘

许可证

Apache License 2.0

Keywords

mcp

FAQs

Package last updated on 30 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts