bazi-chart MCP server
io.github.liyooh007/bazi-chart·v1.2.0·1 starsChinese BaZi Four Pillars engine: precise solar terms, true-solar-time, lunar, patterns, offline.
1 stars373 downloads/wk
Reviews
Write oneNobody has reviewed bazi-chart yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
bazi-chart tools
No tool declarations could be read from the package source. They show once the server is installed.
Public scan report
scanner v0.1.10 · 2026-10-26 · same rubric, same numbers if you re-run it
- Code scan23 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 6 days ago15/15
- Maintainer identityregistry namespace matches repository owner6/10
How bazi-chart compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 89/100
- higher than 80% of 48,255 servers
- GitHub stars
- 1
- more than 65% of 28,688 servers
- Downloads a week
- 373
- more than 84% of 12,191 servers with a package
Install bazi-chart in Claude Code, Cursor or VS Code
claude mcp add bazi-chart -- uvx bazi-chart
What the publisher says
From the bazi-chart repository's README, as published. We do not edit it. Read it on GitHub
bazi-chart|Python 四柱八字 CLI 排盘引擎
<!-- mcp-name: io.github.liyooh007/bazi-chart -->
中文 | English
天文历实时推算节气 · 真太阳时跨时区自动换日柱 · 纯标准库离线运行
🌐 不想安装?直接用浏览器在线排盘:
(Pyodide 在本地浏览器 WASM 运行,出生信息不上传)
一个用 Python 从零实现的四柱八字排盘工具,重点解决很多开源库的共同短板: 把输入时间直接当作当地时间,忽略真太阳时,海外出生场景不会自动跨日期换日柱。
本项目用太阳视黄经实时推算节气,内置真太阳时校正,支持东经/西经输入;海外出生时间 换算落到前一天时,日柱、时柱会整体重算。CLI、Python API、JSON 输出都可用,适合做 历法学习、天文算法验证,也方便接入其它自动化工具。
⚠️ 免责声明:本项目仅用于历法、天文算法与 Python 工程学习,属于传统民俗文化的
规则化实现,不具备科学预测能力,不可作为人生决策依据。文档中的名人出生时辰取
网络流传版本,仅用于排盘引擎回归测试,不作真实命例参考。
✨ 项目特性
- 🌍 真太阳时校正:支持东经/西经,自动处理经度时差、均时差和跨日期换日柱
- 🌌 天文实时定节气:VSOP87D 太阳黄经 + 章动 + 光行差 + ΔT,不硬编码节气表
- 🎯 JPL DE441 对照验证:1900–2050 年 240 个节气点误差 ≤1 分钟
- 📅 完整农历转换:1899–2100,含闰月;73,000+ 天公历↔农历往返零误差
- 📜 完整四柱排盘:年/月/日/时柱、藏干、十神、纳音、十二长生、旬空、刑冲合害
- ⚖️ 五行力量量化:日主旺衰、月令、通根、十神分布、用神/喜神/忌神/仇神/闲神
- 📚 多流派并列输出:扶抑、《穷通宝鉴》调候、《子平真诠》格局成败/官杀混杂/真假从
- 🧧 神煞 40+:天乙贵人、羊刃、桃花、华盖、驿马、十恶大败等,附查法与权重
- 📈 大运/流年/流月:顺排逆排、起运精确到小数岁、支持自定义流年区间
- 🪶 命理诗与评分:七言八句、逐句可核查;0–100 六项综合评分
- 💻 跨平台:Linux / Windows / macOS,树莓派 5 原生可跑
- 🤖 MCP server:内置 bazi-mcp(JSON-RPC stdio,零依赖),4 个工具供 Claude Desktop 等 AI 客户端调用,只返回确定性排盘事实
与同类项目对比
定位差异:lunar-python 是优秀的「历法/干支基石」,本项目不重复造这一层的轮子之争,
而是用独立天文内核 + 完整子平上层推理 + MCP/Pyodide 分发,补「高精度四柱 + AI 可直连」这个位。
数据事实部分欢迎用边界日期(跨年、节气交界、海外跨日)在 Issue 挑错。
📦 安装
PyPI
pip install bazi-chart安装后得到 bazi 命令:
bazi --help源码安装
git clone https://github.com/liyooh007/bazi-chart.git
cd bazi-chart
pip install .
# 或
uv pip install .不安装也可以直接在源码目录运行:
python -m bazi --help🚀 快速开始
CLI:基础排盘
bazi chart 1990-05-12 14:30 -g 男 --lon 116.4示例 1:国内出生(四川内江,东经)
bazi chart 1971-06-22 10:30 -g 男 --lon 105.06 --years 2000 2030实际真太阳时校正结果:10:30 → 09:28。
示例 2:海外出生(美国旧金山,西经,跨日核心用例)
# 输入的是北京时间 1940-11-27 07:00,出生地经度 -122.42
bazi chart 1940-11-27 07:00 -g 男 --lon -122.42 --years 1950 1980实跑结果:
排盘时刻:1940-11-26 15:02(真太阳时:已启用)
天干:庚 丁 癸 庚
地支:辰 亥 酉 申即北京时间输入 1940-11-27 07:00,按出生地经度校正后落到当地前一天, 日柱自动由「甲戌」切换为「癸酉」。
如果手上是出生地的当地时钟时间,需要同时指定 --tz:
bash
bazi chart 1940-11-27 07:00 -g 男 --lon -122.42 --tz -8
--lon 管经度时差和均时差,--tz 管输入时间采用的时区。
📖 参数说明
bazi chart <YYYY-MM-DD> <HH:MM> -g <男|女> [--lon 经度] [--tz 时区] [--years 起 止]Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
bazi-chart: common questions
- Is bazi-chart MCP server safe?
- Yes, by our scan: it is graded A (89/100). Read the bazi-chart safety report
- How do I install bazi-chart?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does bazi-chart need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is bazi-chart maintained?
- The last commit was 14 days ago (2026-10-21). The latest release is v1.2.0.
- How does bazi-chart compare with other MCP servers?
- safety score 89/100 (higher than 80% of 48,255 servers); github stars 1 (more than 65% of 28,688 servers); downloads a week 373 (more than 84% of 12,191 servers with a package). Full comparison.