
Saju Mcp
io.github.ghdejr11-beep由 GitHub 帳號 ghdejr11-beep 發布v0.1.0更新於 Oct 25, 2026
Korean Four Pillars of Destiny (Saju/Bazi): calculate, interpret, compatibility & daily fortune.
概覽
一個本機 MCP 伺服器,包裝 Saju API,讓助理計算、解讀與比較韓國四柱(四柱八字)命盤,並查詢每日運勢。
- 可以做什麼
- 依國曆出生日期計算命盤:四柱、五行分布、日主與生肖,並可解讀十神、藏干、用神與大運,支援十種輸出語言,結果同時以文字與結構化內容回傳,方便依元素或分數等欄位分支處理。比較兩人的合婚分數(0–100)並提供分項明細。依日主與日期取得每日運勢快照(分數與建議)。
- 適用情境
- 適合希望在對話中由 AI 用戶端產生韓國四柱八字解讀、合婚比較或每日運勢,而不必自行呼叫上游 API 的情境。適合命理興趣與輕度原型開發,免費額度不適合正式上線流量。
- 執行需求
- 以 stdio 在本機執行,通常透過 npx 啟動,需要 Node.js 18 或更新版本。需在 SAJU_API_KEY 環境變數提供 Saju API 金鑰,上游以 X-API-Key 標頭送出;缺少時呼叫會回傳 401。需要連線至 Saju API 的網路。可選的 SAJU_API_BASE 變數可覆寫上游基礎網址。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Saju Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Saju MCP — Korean Four Pillars & BaZi Astrology
[npm] [node] [MCP Registry] [license]
An MCP (Model Context Protocol) server that wraps the Saju API — Korean Four Pillars of Destiny (사주팔자 / BaZi / 八字) — so any MCP-capable AI client (Claude Desktop, Cursor, VS Code, Windsurf, and custom agents) can compute, interpret, and compare Korean Saju charts directly in a conversation.
30-second path: get a free key → add the config → ask your AI client "calculate the saju for someone born 1990-05-15 14:00, male."
Why this MCP?
- The only production-grade Korean Saju engine available as an MCP server.
- KASI-validated lunar conversion (47,000+ days cross-checked, zero failures).
- Ten Gods (十神) + Yongshin (用神) + Daeun (大運) — interpretive features absent from generic Western astrology APIs that only return sun/moon signs.
- 10 output languages: Korean, English, Japanese, Chinese, Spanish, Portuguese, Vietnamese, Indonesian, Hindi, Thai.
- Free tier: 100 requests/day, no credit card. Freemium — start building today and upgrade only when your app needs production volume.
Backed by the live API at https://saju-api.pages.dev.
What it looks like in practice
Ask your AI client a natural-language question; it calls saju_calculate and gets
back structured data it can reason over. This is a real, unedited response from
the live API for { year: 1990, month: 5, day: 15, hour: 14, gender: "M", lang: "en" }:
Every response is returned to the model as both human-readable text and
structuredContent, so agents can branch on day_master.element, elements, a
compatibility score, etc. without re-parsing prose.
Tools
Quickstart
1. Get a free API key (no card)
The free tier is 100 requests/day, no credit card:
The response contains an api_key of the form sajuapi_free_...:
The key is shown only once — store it now. It is passed to the server via the
SAJU_API_KEYenvironment variable, never hardcoded. (Disposable /example.comemail domains are rejected — use a real address.)
2. (Optional) Smoke-test without an MCP client
npx runs the server straight from npm — no clone, no local build:
It speaks MCP over stdio and exposes the four saju_* tools. Press Ctrl-C to exit.
3. Register in your MCP client
The server is stdio-based, so every MCP client uses the same three pieces:
command: npx, args: ["-y", "saju-mcp"], and an env with your SAJU_API_KEY.
Claude Desktop
Edit your config file, then restart Claude Desktop:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project), then
reload:
VS Code (GitHub Copilot / MCP)
Add to .vscode/mcp.json in your workspace:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json, then refresh MCP servers:
Restart / reload your client. The four saju_* tools appear in its tool list.
Example tool inputs
saju_calculate / saju_interpret:
(hour: -1 if the birth hour is unknown.)
saju_compatibility:
saju_daily (Day Master from a prior calculate/interpret call):
Input bounds (validated server-side, mirrors the API): year 1920–2050,
month 1–12, day 1–31, hour -1–23, gender "M"|"F", lang one of the 10
supported codes (default ko).
Environment variables
Errors & troubleshooting
When an upstream call fails, the tool returns an MCP error result (isError: true)
whose text is Saju API error <status>: <body> plus a hint. Common cases:
Keys never appear in tool output or logs. If a key leaks, mint a new one — the old one keeps its own quota and can be abandoned.
Develop / build from source
Run the local build directly:
Requires Node.js 18+ (uses the built-in global fetch).
Upgrading to production
The free tier (100 req/day, 1 rps) is for building and evaluation. When your app ships, higher-volume tiers are available on the same API — see https://saju-api.pages.dev for current plans and the key endpoint. Your code and config don't change; only the key does.
Related
- Korea Calendar API — Korean public holidays, lunar↔solar conversion, the gapja (간지) pillars and the 24 solar terms over REST. Pairs naturally with this server when you need the raw calendar facts behind a saju reading: https://korea-calendar-api.kunstudio.workers.dev
License
Proprietary — KunStudio. Wraps the Saju API; subject to that API's terms.
來源:README.md,提交 e19b578
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。