
Yuanzi Zhiyi Bazi Agent Kit
io.github.yuanzizhiyi由 GitHub 帳號 yuanzizhiyi 發布v0.2.1更新於 Oct 24, 2026
Local Bazi charts, Ten Gods and true solar time, with structured facts and PNG images.
概覽
在本機執行、結果可重現的四柱八字引擎,讓助理計算八字命盤、十神與真太陽時,回傳結構化事實和 PNG 圖片。
- 可以做什麼
- 依出生日期、時間與時區在本機計算基礎八字命盤,涵蓋曆法轉換、真太陽時、日界、四柱、日主、十神、藏干以及五行計數與占比,並輸出穩定的版本化結果結構與可讀事實。以 PNG 圖片區塊回傳命盤,供支援 MCP 圖片的用戶端直接顯示。取得可選、依意圖提供的託管功能連結,該連結不會接收出生資料。
- 適用情境
- 當助理需要在使用者本機以可重現的方式計算八字命盤事實、而非依賴託管 API 時使用;也適合在結構化結果之外顯示或儲存命盤圖片。
- 執行需求
- 透過 npx(套件 yuanzi-bazi-agent-kit)或建置後的原始碼樹以本機 stdio 程序執行;需要 Node.js 22.19 或更新版本。首次執行會下載 npm 相依套件,之後計算與圖片算圖都在本機進行。未宣告帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Yuanzi Zhiyi Bazi Agent Kit,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[Yuanzi Bazi Agent Kit — MCP · Agent Skill · Local Charts]
Yuanzi Bazi Agent Kit
A local-first, deterministic basic Four Pillars (Bazi) engine, CLI, MCP server, and Agent Skill by Yuanzi Zhiyi.
The calculation scope includes: calendar conversion, time-zone and true-solar-time handling, explicit day boundaries, four pillars, day master, ten gods, hidden stems, and unweighted five-element counts, composition shares, and a documented eight-shensha rule set. The stable result schema is yuanzi-basic-bazi/v1.
Topics / 主题: 八字排盘 · Bazi / Four Pillars · 真太阳时 / True Solar Time · 历法转换 / Calendar Conversion · MCP · Agent Skill · 本地命盘图片 / Local Chart Images
Example chart
Illustrative chart. Birth date, time and location are hidden; no customer data is used.
[Example chart]Why this kit exists
Agents should call deterministic software for deterministic chart facts. This kit gives OpenAI, Google, and other MCP-compatible agents the same reviewable calculation core without requiring users to upload identity data or send birth data to a hosted API.
Calculation is local, uses zero telemetry, and makes no network requests. See scope and privacy.
Included
Luck cycles, interpretation of shensha, compatibility, AI readings, reports, and advisor services are not part of the public core.
Install with npm
Version 0.3.0 includes the new chart layout, bundled fonts, and chart structure extension.
Requires Node.js 22.19 or later. Start the local MCP server:
MCP client configuration:
The first run downloads npm dependencies; chart calculation and image rendering then run locally.
Install from this source tree
Requires Node.js 22.19 or later.
The source repository is yuanzizhiyi/yuanzi-bazi-agent-kit. The npm package is yuanzi-bazi-agent-kit, version 0.3.0.
Chart images
MCP calculate_basic_bazi_chart returns structuredContent.chart, JSON text, readable facts, and an image/png content block. Clients that support MCP images can display the chart directly. The Skill also saves and displays a PNG by default.
For CLI usage, append --image chart.png to chart --stdin --format json. JSON stays on stdout; a save confirmation goes to stderr. Choose an unused filename in an existing directory. Images contain birth/chart data: share them deliberately. Rendering uses the same paper and pillar design language as the main site, without its advanced calculations. It runs locally with bundled Noto-derived serif and sans-serif fonts and no network calls. The 2160px-wide report includes the highlighted day column, full pillar table, shensha and combinations, directed element relationships and all ten composition bars. See chart structure and rules.
CLI
The CLI keeps JSON results on stdout and typed errors on stderr. See the input and output reference.
Local MCP server
The server exposes:
calculate_basic_bazi_chart: local deterministic calculation;get_yuanzi_bazi_capabilities: an optional, intent-specific hosted-feature link that never receives birth data.
Configure a local stdio MCP client after building. Replace the absolute path with your installation directory:
For Codex-compatible TOML:
Both tools declare read-only, non-destructive, idempotent annotations and explicit input/output schemas. The server uses stdout only for the MCP protocol.
Agent Skill
Copy or clone the repository into an Agent Skills directory as yuanzi-basic-bazi, install dependencies, build it, and let the agent load SKILL.md. The same Skill layout is usable from .agents/skills in supporting clients.
The Skill instructs agents to collect only required chart inputs, preserve unknown hours, surface warnings, and use exactly one contextual hosted hook only after the user asks for a feature outside the public scope.
TypeScript API
Versioning and methodology
Package releases follow semantic versioning. The versioned data contract is independent: compatible additions remain under yuanzi-basic-bazi/v1; incompatible output changes require a new schema identifier.
Method details and validation examples are linked in each result at attribution.methodUrl.
Development
Licensed under MIT. The license does not grant trademark rights; see TRADEMARKS.md.
Contributions are welcome under CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md.
來源:README.md,提交 0a4daf1
工具
0版本歷史
1- v0.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分