Skip to main content Switch to mobile version fatebridge 0.1.2 Local BaZi, Zi Wei, Western astrology, divination, and Feng Shui calculations for AI applications via MCP, REST API, and CLI
pip install fatebridge==0.1.2 Copy PIP instructions
为 AI 应用提供可核对的术数与占星计算
FateBridge 为 AI 应用提供本地术数、占星与心理测量计算,通过 MCP、REST API、CLI 与 Python SDK 返回结构化事实、时间口径与运行回执。对话模型和界面由接入应用提供,计算服务无需 LLM API Key。
当前源码提供 86 个业务 REST 路由(另提供 /api/batch 批处理入口)。MCP 通过三个入口(discover_tools、run_calculation、run_batch)提供 86 项业务能力,覆盖 14 个 family。目录共有 86 条记录,CLI 可执行 86 条。三端共用规范工具名(spec.name)、请求字段与领域计算,见接口边界和算法覆盖矩阵。
需要 uv 和 Python 3.10+(源码默认 3.12,CI 测试 3.10–3.13)。完整安装步骤与环境自检见环境安装与首次运行。
已发布版本:uv tool install --python 3.12 fatebridge && fatebridge doctor(提供 fatebridge、fatebridge-api、fatebridge-mcp;找不到命令时运行 uv tool update-shell 并重开终端)。
当前源码:git clone https://github.com/thomas-yanxin/FateBridge.git && cd FateBridge && uv sync --extra dev && uv run --extra dev fatebridge doctor(未发布变化见 CHANGELOG,已发布版本查对应标签)。
下列虚构示例在终端直接运行,无需启动服务(源码用户加 uv run --extra dev,Windows 写法见部署指南):
fatebridge bazi_birth_chart \ --birth-year 1990 --birth-month 5 --birth-day 15 \ --birth-hour 10 --birth-minute 30 --gender male \ --birth-place 北京 --birth-timezone Asia/Shanghai \ --fields day_master.stem day_master.element day_master.polarity 发现工具、增量展开视图或一次串联单/双主体多工具批处理(单批最多 64 条;fatebridge batch --request-file batch.json,支持 --out results.json 自包含落盘与 fatebridge read results.json 无损列式精读,以及 fatebridge batch --schema / fatebridge discover batch,对应 MCP run_batch 与 REST POST /api/batch):
fatebridge discover --input-mode event_clock fatebridge discover bazi_birth_chart vedic_chart --detail brief { "subjects": { "p1": { "gender": "male", "birth_year": 1990, "birth_month": 5, "birth_day": 15, "birth_hour": 10, "birth_minute": 30, "birth_timezone": "Asia/Shanghai", "birth_place": "北京" }, "p2": { "gender": "female", "birth_year": 1992, "birth_month": 3, "birth_day": 2, "birth_hour": 8, "birth_minute": 30, "birth_timezone": "Asia/Shanghai", "birth_place": "北京" } }, "context": {"analysis_year": 2026, "analysis_month": 10, "analysis_day": 12, "analysis_hour": 12, "analysis_timezone": "Asia/Shanghai", "analysis_place": "北京"}, "calls": [ {"id": "bazi", "tool": "bazi_overview", "subject": "p1", "fields": ["four_pillars", "day_master"]}, {"id": "compat", "tool": "bazi_compatibility", "subjects": ["p1", "p2"], "arguments": {"relationship_type": "marriage"}, "fields": ["natal_contexts", "cross_chart_relations"]}, {"id": "qimen", "tool": "qimen", "include": ["hidden_stems"]}, {"id": "minggua", "tool": "fengshui_minggua", "subject": "p1"} ] } 接入 AI 助手或应用
MCP 验证:运行 fatebridge doctor --mcp 获取 executable 绝对路径注册客户端,升级后需重连 MCP;网络与 REST 鉴权边界见运行配置与安全策略(REST 密钥不保护 MCP)。
结果核对:不猜测未知生时;默认返回确定性核心层并在 run_metadata.omitted_views / omitted_fields 记入省略的领域视图与通用 "audit" 视图(按需传 include=["audit"] 获取完整溯源与执行回执),控制规则见输出控制与结果读取;外置星历核对见星历数据;分层状态语义见核心概念。
源码采用 Python src 布局,FastAPI、FastMCP、CLI 与 Python SDK 通过中央 ToolSpec 目录共享执行层与领域服务(见架构说明与 pyproject.toml)。
uv run --extra dev python scripts/check_docs.py uv run --extra dev python -m pytest -q tests/quality/test_documentation_integrity.py tests/quality/test_doc_tool_counts.py 问题反馈:请附版本、虚构最小复现与实际报错;安全漏洞请按 SECURITY.md 私下报告。
文档中心按 Diátaxis 四象限与双闭环索引全部维护文档;现象排查见故障排除。平台入口:ModelScope MCP Server。
项目代码采用 Apache-2.0。第三方组件与资料见 NOTICE;依赖、下载的星历与原典资料按各自声明核对许可。
Released: Dec 1, 2026
Author: thomas-yanxin
Both files in this release have provenance metadata.
View provenance details
Apache-2.0 View SPDX License List
Development Status 4 - Beta
Intended Audience Developers
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Python Modules
Release files for fatebridge 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 9.7 MB
Release files / fatebridge-0.1.2.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Release files / fatebridge-0.1.2-py3-none-any.whl
Security for fatebridge 0.1.2
Both files in this release have been uploaded with provenance metadata.
With provenance fatebridge-0.1.2.tar.gz Dec 1, 2026
With provenance fatebridge-0.1.2-py3-none-any.whl Dec 1, 2026
Attestation for fatebridge-0.1.2.tar.gz
Attestation for fatebridge-0.1.2-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 1, 2026 2 release files Full provenance
Oct 20, 2026 2 release files Full provenance
Oct 19, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from a8e35ed











