Qimen Dunjia & BaZi Charts

io.github.wyl743405571-cpu由 GitHub 账号 wyl743405571-cpu 发布v1.0.1更新于 Nov 1, 2026

Free Qimen Dunjia and BaZi charts via MCP - deterministic engine, nine palaces and four pillars.

已验证Streamable HTTP可网页运行位置与生活

概览

AI 生成的概览

远程 MCP 服务器,可根据指定日期时间免费排奇门遁甲九宫盘与八字四柱盘。

可以做什么
  • 按指定日期时间排奇门遁甲盘,返回九宫布局、神、星、门、空亡宫、检测到的格局以及基于规则的解读,支持中文或英文。
  • 排八字命盘,返回四柱、藏干、十神、日主强弱证据链、格局与等级、喜忌五行以及当前大运。
  • 两个工具均使用确定性计算引擎,相同输入每次得到相同结果。
适用场景
适合在对话中直接生成并解释奇门遁甲择时盘或八字命盘,无需在本地安装软件包。两个工具均标注为免费,适合偶尔或探索性使用。
运行要求
需要可访问的远程 streamable HTTP 端点;未声明需要安装软件包、账号、API 密钥或环境变量。需要能访问提供方的服务器。
安装前请注意
排盘与解读属于命理阐释内容,并非经过验证的预测;README 也说明解读与断法不在引擎范围内,案例库的复现率只是部分吻合。请求会把日期、时间和语言发送到第三方服务器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Qimen Dunjia & BaZi Charts,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.wyl743405571-cpu%2Fqimen-dunjia-engine/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "qimen-dunjia-bazi-charts": {
      "type": "http",
      "url": "https://qimenseek.aicreditsapi.com/mcp"
    }
  }
}

README

qimen-dunjia-engine

Qimen Dunjia (奇门遁甲) chart calculation engine for Node.js — deterministic, no AI/LLM dependency, pure calculation.

时家转盘法 · 置闰符头定元 · 值使独立转门

实测数据(每一条都可复现,脚本在 verify/):44,064 次全量遍历崩溃 0、不变式违反 0;41 种格局零命中盘 0%、无恒真规则、无死规则;拆补 vs 置闰分歧率 41.6%;两批书载案例审计(142 例与 79 例,各自独立口径,不可混算)。

Why this engine

Most open-source Qimen libraries cut corners. This one implements the classical mainstream ruleset faithfully:

RuleCommon shortcut in other librariesThis engine
Zhirun (置闰) ju determination~5-day bucket approximationFutou-based: solar-term attribution decided by the futou day (上元符头 = 甲子/甲午/己卯/己酉)
Zhi-Shi door (值使门)Falls into the same palace as Zhi-Fu star (skipped rotation)Rotates independently from the hour-stem position in the xun
Rotating plate pathsLinear palace order 1-9Plate palace order [1,8,3,4,9,2,7,6]
ValidationSpot checks at best44,064-chart sweep, 0 crashes, 5 invariants enforced — verify/

Features

  • Hour-based rotating-plate method (时家转盘), Chabu (拆补), Zhirun (置闰) and Shen Jie Qi (超神接气) determination
  • Full plate: earth plate (地盘), heaven plate (天盘), 9 stars (九星), 8 doors (八门), 8 gods (八神), hidden stems (遁干)
  • Formation detection (格局): 41 formations detected in real computation — Fu-Yin (伏吟), Fan-Yin (反吟), 门迫, 击刑, 入墓, 青龙返首, 飞鸟跌穴, 玉女守门, 三奇得使, 十干克应 combinations, and more
  • Horse palace (马星), void branches (旬空), year/month stems lodging
  • Four-pillar (干支) calculation for year/month/day/hour via lunar-javascript
  • Zero network, zero AI — same numbers every run

Install

bash
# Install straight from GitHub (npm supports this natively)
npm install github:wyl743405571-cpu/qimen-dunjia-engine

# Or clone + install
git clone https://github.com/wyl743405571-cpu/qimen-dunjia-engine.git
cd qimen-dunjia-engine && npm install

# npm registry package: coming soon

Usage

js
const qimen = require('qimen-dunjia-engine');

// year, month, day, hour, minute, method: 'zhirun' | 'chaibu' | 'shenjieqi'
const chart = qimen.paipan(2026, 6, 7, 11, 0, 'zhirun');

console.log(chart.juNum);        // 6  (Yang Dun 6)
console.log(chart.isYang);       // true
console.log(chart.zhiFuXing);    // 天蓬 — Zhi-Fu star
console.log(chart.zhiFuGong);    // 4
console.log(chart.zhiShiMen);    // 休门 — Zhi-Shi door (independently rotated)
console.log(chart.zhiShiGong);   // 3
console.log(chart.dp);           // earth plate stems, keyed by palace 1-9
console.log(chart.tp);           // heaven plate stems
console.log(chart.xing);         // 9 stars by palace
console.log(chart.men);          // 8 doors by palace
console.log(chart.shen);         // 8 gods by palace
console.log(chart.geju);         // detected formations [{name, level, gong, detail}]
console.log(chart.maGong);       // horse palace
console.log(chart.kong);         // void branches, e.g. ['寅','卯']
console.log(chart.ygz);          // four pillars: year/month/day/hour ganzhi

See examples/basic.js for a runnable demo that prints a full nine-palace grid.

Output reference

FieldMeaning
juNum / isYangJu number (1–9) and Yin/Yang dun
methodzhirun / chaibu / shenjieqi
xun / kong / kongGongsHour xun, void branches, void palaces
zhiFuXing / zhiFuGongZhi-Fu star and its palace
zhiShiMen / zhiShiGongZhi-Shi door and its palace
dp / tpEarth / heaven plate stems by palace
xing / men / shenStars / doors / gods by palace
dunGanHidden stems (遁干)
gejuDetected formations with auspicious/inauspicious level
maGongHorse palace (驿马)
ygz / mgz / dgz / hgzYear / month / day / hour pillars

Scope

This package computes charts only. Interpretation, judgment rules (用神/断法), and case libraries are not included — those are product-layer assets of QiMenSeek.

The engine is流派-aware in one dimension: it implements the mainstream hour-based rotating-plate tradition (时家转盘). It does not compute flying-plate (飞盘) charts.

Test & Verification

bash
npm test    # 3 known-good snapshot charts + plate-structure invariants

That only covers three sample charts. For real numbers, run the measurement suite — every figure quoted in this README comes from these scripts, and you will get the same output on your own machine:

bash
node verify/sweep_coverage_v2.js 2000 2050   # 44,064 charts: 0 crashes, 0 invariant violations
node verify/measure_divergence.js 30# 12,960 moments: 41.6% of charts differ between Chaibu/Zhirun
node verify/measure_geju.js 10                # 41 formations, 0% zero-hit charts, no dead rules
node verify/audit_book_cases.js               # 142-case classical library audit
node verify/audit_book_cases_v2.js            # 79-case 1990s casebook audit (incl. Shen Jie Qi mode)

See verify/README.md for what each script proves, what it does not prove, and the measurement traps we hit while writing them.

Known limitation we do not hide

The 142-case classical library (verify/book_case_library_tagged.json, 95.8% with page citations) reproduces the book-stated ju number 64.9% of the time under Chaibu (63/97 testable) vs 42.6% under Zhirun (40/94). Only 51 of 142 cases carry an expected verdict, and 45 of those are OCR-extracted and still flagged needsReview. So: use the library for regression exploration, not as an accuracy claim.

The second, independent library (verify/book499_case_library.json, 79 testable cases from a 1990s casebook) reproduces the book-stated ju 82.3% under Chaibu (65/79) and 91.1% under the Shen Jie Qi mode (72/79). Note what that mode is: it is fitted from this casebook's own data — it explains this book, it does not claim to be "more classical". The default remains Chaibu. Five boundary cases stay unexplained, listed by the script itself. The two libraries never mix: different books, different denominators.

Live tools

End-user guides & articles

For people facing real decisions — not just developers — these plain-language guides explain the system (no mysticism, full reasoning, every claim sourced to your chart's symbols) and link back to the free tools:

Index: articles/README.md

License

MIT

来源:README.md,提交 6f934a8

工具

2

qimen_pan

奇门遁甲排盘 · Qimen Dunjia Chart

Cast a Qimen Dunjia (奇门遁甲) chart for a given date/time. Deterministic engine (Zhi Run method, verified against classical case ledger). Returns the 9-palace chart, deities/stars/gates, void palaces, detected formations (geju) and a rule-based reading. FREE — no quota consumed. 中文/English via lang.

输入参数date必填langtime必填scene

bazi_chart

八字排盘 · BaZi (Four Pillars) Chart

Cast a BaZi (Four Pillars) natal chart. Deterministic engine (solar-term month pillar, Five-Rats hour rule, true-solar-time ready). Returns pillars with hidden stems and Ten Gods, day master strength evidence chain, geju pattern with grade, favorable/unfavorable elements, current luck cycle. FREE — no quota consumed. 中文/English via lang.

输入参数langgenderbirthDate必填birthTime必填

版本历史

1
  1. v1.0.1最新Nov 1, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分