
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 分
请在仓库或注册中心条目中声明许可证。