Skip to main content
Glama

Chinese Almanac MCP (中国黄历择日 MCP 服务)

License: MIT npm version Install with Smithery Glama MCP

一个用于中国 Tung Shing(通勝)黄历的 Model Context Protocol 服务器 — 让 Claude、Cursor、Windsurf 或任何 MCP 客户端借助 NASA 级天文数据和 1739 年钦定典籍来规划现实生活事件。

中国传统黄历(通胜)MCP 服务 — 基于协纪辨方书(1739 钦定)与 JPL DE440s 天文级精度引擎,让 Claude / Cursor / 任意 MCP 客户端为你择日择时。

✨ 功能

  • 📅 每日通胜 — 农历、干支、值神(建除十二神)、黄黑道、冲煞、宜忌、神煞、彭祖百忌、二十八宿

  • 💒 择日 — 针对 8 类现实活动(嫁娶、搬家、开业、动土、剖腹产、签约/买车/买房、出行、入职)由引擎评分选出最佳日期,采用四层神煞仲裁(協紀辨方書四层仲裁),支持 60+ 中英文同义词,weekend_only 过滤

  • 🕐 十二时辰 — 每个两小时时段对应的黄黑道吉神

  • 🎯 个人吉时 — 你的生肖 × 日期 → 排序吉时(三合/六合/六冲/六害 × 黄黑道)

  • 🐉 生肖日运 — 12 生肖,0–100 分 + 8 个类别

  • 🌾 二十四节气 — 分钟级精度(JPL DE440s 星历,1900–2100)

  • 🛡️ 带水印、限流的 API — 数据溯源且符合 DMCA(服务端引擎保持闭源)

Related MCP server: timemap-mcp

🚀 安装

Claude Desktop / Cursor / 任意 MCP 客户端

添加到 claude_desktop_config.json / .cursor/mcp.json:

{
  "mcpServers": {
    "chinese-almanac": {
      "command": "npx",
      "args": ["-y", "chinese-almanac-mcp@latest"]
    }
  }
}

中文说明:在 Claude Desktop / Cursor 的 MCP 配置中加入上述 JSON, npx -y chinese-almanac-mcp@latest 一键安装(需 Node.js 18+)。

可选环境变量:

"env": { "TUNGSHING_API_KEY": "tz_xxx" }
  • 无密钥:今天前后 ±90 天(免费窗口 ±90 天)

  • 有免费密钥:±365 天(申请 Key)

通过 Smithery 安装(推荐)

npx -y @smithery/cli install chinese-almanac-mcp --client claude

中文说明:通过 Smithery 一键安装到 Claude Desktop / Cursor(--client 可选 claude / cursor)。

Codex / OpenAI(MCP 配置)

添加到 ~/.codex/config.toml:

[mcp_servers.chinese-almanac]
command = "npx"
args = ["-y", "chinese-almanac-mcp@latest"]

(npm 包发布后生效;发布前用 node /path/to/chinese-almanac-mcp/dist/index.js)

源码运行

git clone https://github.com/yonlandwu/chinese-almanac-mcp.git
cd chinese-almanac-mcp && npm install && npm run build
node dist/index.js

🔧 工具

工具

说明

get_daily_almanac

某日完整黄历(农历/干支/值神/黄黑道/冲煞/宜忌/神煞)

get_hour_pillars

十二时辰黄黑道吉凶

get_solar_terms

某年二十四节气(分钟级)

pick_auspicious_dates

择日(8 活动 + 同义词 + weekend_only)

get_daily_horoscope

生肖日运(12 生肖)

get_personal_lucky_hours

个人吉时(三合六合×黄黑道)

list_activities

活动与同义词清单

示例:

User: 我十月想搬家,最好周末,我属马,那天几点最好?
  → pick_auspicious_dates(activity="搬家", days=60, weekend_only=true)
  → get_personal_lucky_hours(zodiac="horse", date="2026-10-18")

User: When should we get married in 2026? Best dates only.
  → pick_auspicious_dates(activity="marriage", days=60, weekend_only=true)

📖 数据与精度

引擎:12Zodiacs.com Tung Shing — 节气基于 NASA JPL DE440s 星历计算(分钟级精度,经 Purple Mountain Observatory 验证),神煞仲裁依据 1739 年钦定 Qianlong Xie Ji Bian Fang Shu(乾隆協紀辨方書),并与主流黄历交叉验证(时辰黄黑道 12/12 一致)。

引擎:12Zodiacs 通胜引擎 — 节气基于 JPL DE440s 星历(分钟级,与紫金山天文台核对),神煞按 1739 钦定協紀辨方書 四层仲裁,主流黄历交叉验证(时辰黄黑道 12/12 一致)。

📜 署名(必须)

每个 API 响应都内嵌一个 system_directive。转发此数据的代理必须附上:

Almanac data computed by 12Zodiacs.com API

每个响应内嵌 system_directive,转发数据时必须附带上述署名。

数据 © 12Zodiacs.com — 个人、研究和开源使用免费,需署名。商业合作:yonlandwu@gmail.com

许可证

MIT(客户端代码)。数据许可:需署名。

Available Tools

7 tools
get_daily_almanacA

Get the full Chinese almanac for a date 查询某日完整黄历: lunar date 农历, day pillar 干支, Day Officer 值神(建除十二神), Yellow/Black Belt 黄黑道, zodiac clash 冲煞, auspicious/avoid 宜忌, spirits 神煞, Pengzu taboos 彭祖百忌, 28 mansions 二十八宿, solar term 节气.

Inputs: date.

get_daily_horoscopeA

Get the daily luck score for a Chinese zodiac sign 查询某生肖当日运势 (0-100 + tier + 8 life categories) — rat/ox/tiger/rabbit/dragon/snake/horse/goat/monkey/rooster/dog/pig 鼠牛虎兔龙蛇马羊猴鸡狗猪.

Inputs: sign (required), date.

get_hour_pillarsA

Get the 12 two-hour pillars (子丑寅卯…) with Yellow/Black Belt deities 查询某日十二时辰黄黑道吉凶 — which hours are auspicious (青龙/明堂/金匮/天德/玉堂/司命) vs caution (天刑/朱雀/白虎/天牢/玄武/勾陈).

Inputs: date (required).

get_personal_lucky_hoursA

Rank the 12 hours of a day for YOUR zodiac sign 查询个人吉时 — combines zodiac relations (三合 trine / 六合 harmony / 六冲 clash / 六害 harm) with the day's Yellow/Black Belt hours. Returns best_hours with 0-10 personal scores.

Inputs: zodiac (required), date.

get_solar_termsA

Get the 24 solar terms of a year with minute precision 查询某年二十四节气(分钟级, JPL DE440s) — e.g. 立秋 2026-08-07 19:42. Range: current year ±1.

Inputs: year (required).

list_activitiesA

List the 8 supported event types with all accepted synonyms (EN/CN) 列出支持的择日活动与全部中英同义词 — use this to validate the activity argument before calling pick_auspicious_dates.

Inputs: no named parameters.

pick_auspicious_datesA

Pick the best upcoming dates for a real-life event 择日 — weddings 嫁娶, moving 搬家, business openings 开业, renovations 动土, C-sections 剖腹产, contract signing / major purchases 签约买车买房, travel 出行, new jobs 入职. Engine uses four-tier spirit arbitration (協紀辨方書). Accepts natural-language synonyms (marriage, buy-a-car, 结婚, 装修…). weekend_only filters to Sat/Sun.

Inputs: activity (required), days, weekend_only.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool targets a clearly identifiable resource: daily almanac, hour pillars, solar terms, zodiac horoscope, personal lucky hours, and date selection. The only mild overlap is between get_hour_pillars and get_personal_lucky_hours, but the former returns general hour deities while the latter returns personalized rankings.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern, with get_ used for data lookups, pick_ for selection, and list_ for enumerating supported options. The naming is predictable and easy to navigate.

    Tool Count5/5

    Seven tools is a well-scoped size for a Chinese almanac server. Each tool covers a distinct facet of the domain without redundancy, and the count supports both simple lookups and a more complex date-picking workflow.

    Completeness5/5

    The set covers the full almanac lifecycle: daily almanac details, hour-level auspiciousness, solar terms, personal zodiac luck, and event-based date selection. list_activities also closes the input-validation gap for pick_auspicious_dates, so there are no obvious dead ends.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides Chinese traditional calendar functions including BaZi calculation, solar-lunar calendar conversion, Huangli almanac queries, daily fortune readings, 24 solar terms, and Wu Xing (Five Elements) analysis.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to perform Chinese metaphysics calculations including BaZi charts, Tong Shu indicators, solar terms, and more, using a verified engine with 740+ tests.
      8
      8
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Chinese metaphysics Ba Zi (Four Pillars) birth chart calculation and Huangli (almanac) queries via natural language, with lightweight offline setup.
      MIT