
Cosine Astro Mcp
io.github.ganguoguo444004-coder由 GitHub 帳號 ganguoguo444004-coder 發布v0.1.0更新於 Oct 25, 2026
Astrology: natal charts, transits, synastry, retrogrades, profections. Computed offline.
概覽
一個本機 MCP 伺服器,離線計算西洋回歸黃道占星盤:本命盤、行運、合盤、水星逆行、年度小限與月相。
- 可以做什麼
- 計算本命盤:行星、上升、天頂、宮頭、相位以及元素與模式分布,可選用出生時間、經緯度或內建城市名。依指定日期時間計算行運,包括對本命行星的相位與所落本命宮位。用合盤比較兩張星盤的交叉相位與宮位落入。查詢水星逆行區間、年度小限和月相。每次回傳一段精簡文字摘要,並以 JSON 回傳相同資料。
- 適用情境
- 適合需要準確行星位置而非模型猜測的場合,例如占星學習、星盤探索或反思性解讀。也適合希望離線、確定性計算且無需帳號或 API 金鑰的使用者。
- 執行需求
- 需要 Node.js 20 以上版本;以 stdio 在本機執行,通常用 npx 啟動。無需 API 金鑰、帳號或連網。出生資料需要日期(1800–2200 年),可選時間、IANA 時區,以及經緯度或約 110 個內建城市名之一。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Cosine Astro Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
cosine-astro-mcp
An MCP server for Western (tropical) astrology calculations: natal charts, transits, synastry, Mercury retrograde, annual profections and moon phases.
Language models are poor at working out where the planets were on a given date; they tend to guess. This server computes the positions instead, offline, from the astronomy-engine ephemeris, and hands the model both a compact text summary and the full data as JSON. No API keys, no network calls, no accounts.
Made by COSINE 余弦 — cosineastro.com, a birth-chart site with AI readings. This is the same chart engine the site runs, published as an MCP server.
Install
Requires Node.js 20 or later.
Claude Code
Add --scope user to make it available in every project.
Claude Desktop — edit claude_desktop_config.json (Settings → Developer → Edit Config):
Cursor — ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):
Any other MCP client that speaks stdio works the same way: the command is npx -y cosine-astro-mcp.
Tools
All tools are read-only and deterministic for a given input (except where a date defaults to "now").
Birth data
natal_chart, annual_profection, and the natal / person_a / person_b objects of transits and synastry take:
Other parameters: transits takes date, time, timezone, natal, max_orb; mercury_retrograde takes start_date, end_date, timezone; annual_profection takes age or on_date; moon_phase takes date, time, timezone. Every tool's JSON schema carries a description of each field.
Output
Each call returns two text blocks and structuredContent:
- a compact summary written for a model to read, ending with a short note that the positions are computed and that interpretation should be offered as reflection, not prediction;
- the same data as JSON (also in
structuredContent).
Example (natal_chart, 1995-05-12 08:30, Shanghai):
Conventions
- Positions are geocentric, apparent, tropical ecliptic longitudes of date.
- Aspects within a chart: conjunction and opposition 8°, square and trine 6°, sextile 4°. Between two charts (synastry): 6°, 5°, 5°, 3°. Transits: one orb for all, default 2°.
- Element/modality balance: Sun, Moon and Ascendant count 2 points; Mercury to Pluto and the Midheaven 1 point each. Ties go to the Sun's element, then the Moon's, then the Ascendant's.
- Profections count whole signs from the Ascendant (from the Sun's sign when the birth time is unknown); the lord of the year is the traditional ruler, with the modern co-ruler (Pluto, Uranus, Neptune) noted where it differs.
- Shadow periods: the pre-shadow starts when Mercury first reaches the degree where it will later station direct; the post-shadow ends when it moves back past the degree where it stationed retrograde.
Not included: asteroids, lunar nodes, Lilith, Chiron, sidereal zodiacs, house systems other than Placidus and whole-sign, and interpretation text.
Accuracy
The test suite compares the engine with Swiss Ephemeris (2.10.03, via pyswisseph) on 55 reference charts from 1900 to 2050 — northern and southern hemispheres, east and west longitudes, the equator, high latitudes up to and inside the Arctic Circle, historical daylight saving time, and unknown birth times. Every planet longitude, Ascendant, Midheaven and Placidus cusp is within 1′ of arc of the reference (largest gaps: planets 0.34′, Ascendant/Midheaven 0.20′, cusps 0.21′), and every UTC conversion matches. The angles use the true obliquity of the ecliptic (nutation included), as Swiss Ephemeris does. Only the reference numbers are included in this repository (tests/fixtures/reference-charts.json); no Swiss Ephemeris code is used or distributed.
Things to know:
- Time zones come from the IANA database built into Node.js. For dates before a region adopted standard time, the database uses local mean time; if your source used a different rule, pass the zone you mean (for example
"Etc/GMT-8"for a fixed UTC+8). - The Ascendant moves about a degree every four minutes: the chart is only as accurate as the birth time.
- The built-in city coordinates are city centres to about 0.01°.
- Retrograde stations are located to about a minute.
COSINE's methodology and accuracy notes: cosineastro.com/en/accuracy.
About interpretation
The positions are astronomy. What they mean is a tradition of interpretation, not a measurement. The server says so in every result and suggests that a model present readings as prompts for reflection rather than predictions or advice.
Development
Credits and license
MIT. The chart engine is ported from COSINE and uses astronomy-engine by Don Cross (MIT). Reference values for the tests were generated with Swiss Ephemeris by Astrodienst (used only to produce the numbers; not part of this package).
Made by COSINE — https://www.cosineastro.com · Free birth chart · Accuracy
繁體中文
cosine-astro-mcp 是一個 MCP 伺服器,提供西洋占星(回歸黃道)計算:本命盤、行運、合盤、水星逆行、年度小限、月相。
大型語言模型自己推算行星位置往往不準。這個伺服器改用 astronomy-engine 星曆在本機離線計算,回傳一段給模型讀的精簡文字摘要,以及完整的 JSON 資料。不需要 API 金鑰,不連網。
由 COSINE 余弦(cosineastro.com)製作,和網站使用同一套星盤引擎。
安裝
需要 Node.js 20 以上。
- Claude Code:
claude mcp add cosine-astro -- npx -y cosine-astro-mcp - Claude Desktop/Cursor:在設定檔的
mcpServers加入"cosine-astro": { "command": "npx", "args": ["-y", "cosine-astro-mcp"] }(完整範例見上方英文說明)
工具
出生資料:date(YYYY-MM-DD,必填)、time(HH:MM,不知道就省略:不給上升、天頂與宮位)、timezone(IANA 時區,如 Asia/Taipei,自動套用歷史夏令時間)、latitude/longitude(北緯、東經為正),或用 city 從內建約 110 個大城市(中英文名皆可,繁簡皆可)中選取。不呼叫任何地理編碼服務;其他地點請直接給經緯度。
準確度
測試以 Swiss Ephemeris(2.10.03,pyswisseph)計算的 55 張參考星盤(1900–2050 年,涵蓋南北半球、東西經、赤道、高緯度與北極圈內、歷史夏令時間、出生時間不詳)比對:所有行星黃經、上升、天頂與 Placidus 宮頭誤差都在 1 角分以內(最大:行星 0.34′、上升/天頂 0.20′、宮頭 0.21′),UTC 換算全部一致。上升與天頂使用含章動的真黃赤交角,與 Swiss Ephemeris 相同。本專案只收錄參考數值,不含也不散布任何 Swiss Ephemeris 程式碼。準確度說明見 cosineastro.com/en/accuracy。
關於解讀
行星位置是天文計算;它們代表什麼,屬於占星的詮釋傳統,而非測量結果。每次回傳都附上提示:請把解讀當作自我反思的參考,而不是預言或建議。
授權
MIT。星盤引擎移植自 COSINE,使用 Don Cross 的 astronomy-engine(MIT)。
由 COSINE 製作 — https://www.cosineastro.com · 免費排本命盤
來源:README.md,提交 173254a
工具
0版本歷史
1- v0.1.0最新Oct 17, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分