Skip to main content
Glama
Astromei MCP
by astromei
README.md
# Astromei MCP · 九星気学、宿曜占星術、四柱推命

Astromei の計算ツールを Claude Desktop、Cursor などの MCP クライアントから利用できます。九星気学・宿曜占星術・インド占星術・四柱推命・梅花易数・ルノルマンカードの 6 分野、計 14 ツールを収録しています。

The Astromei MCP server exposes 14 tools across six traditions. It runs locally over stdio and connects to the same Astromei API used by the website. No Astromei account or API key is required. Node.js 22 or later is required.

## 接続 / Setup

Use the release archive with `npx`. The client starts the MCP server over stdio.

```json
{
  "mcpServers": {
    "astromei": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/astromei/astromei-mcp/releases/download/v0.1.0/astromei-mcp-0.1.0.tgz"
      ]
    }
  }
}
```

すべてのツールが既定で有効です。分野を絞る場合は、`args` の末尾に `"--tools", "kyusei", "--tools", "sukuyo"` のように追加します。出力言語の既定は日本語です。各ツールの `locale` に `ja`、`en`、`zh-CN`、`zh-TW`、`ko` を指定できます。返却される `source` は Astromei の日本語ツールページです。

Use `--tools` more than once to select multiple groups. Each response includes a link to the Japanese Astromei tool page.

| Group | MCP tools | Astromei |
| --- | --- | --- |
| `kyusei` | `get_kyusei_chart`, `get_kyusei_board`, `compare_kyusei` | [九星気学 / Nine Star Ki](https://astromei.com/ja/kyusei) |
| `sukuyo` | `get_sukuyo_chart`, `get_sukuyo_daily`, `compare_sukuyo` | [宿曜占星術 / Sukuyo](https://astromei.com/ja/workspace/sukuyo) |
| `vedic` | `get_vedic_chart`, `get_vedic_transits` | [インド占星術 / Vedic astrology](https://astromei.com/ja/workspace/vedic) |
| `bazi` | `get_four_pillars_chart` | [四柱推命 / Four Pillars](https://astromei.com/ja/workspace/shichusuimei) |
| `meihua` | `cast_meihua_numbers`, `cast_meihua_now` | [梅花易数 / Meihua I Ching](https://astromei.com/ja/workspace/meihua) |
| `lenormand` | `get_lenormand_card`, `list_lenormand_spreads`, `draw_lenormand_cards` | [ルノルマンカード / Lenormand](https://astromei.com/ja/lenormand) |

## 使用例 / Examples

These are example MCP tool arguments. Dates and places in the examples are sample inputs.

- `get_kyusei_chart` with `{"birth":"2024-02-04","on":"2026-11-28"}` returns the two alternatives around 立春 when the birth time is unspecified. For a known birth time, pass `time` as `HH:MM` in JST.
- `compare_sukuyo` with `{"birth_a":"1990-04-17","birth_b":"1992-06-15"}` returns the relationship and distance between the two Japanese lunar mansions. Dates from 2051 use an approximate lunar calendar, marked in applicable results.
- `get_vedic_chart` with `{"birth_time":"1990-04-17T08:26:00","latitude":35.6812,"longitude":139.7671}` returns the sidereal natal chart and the available Vimshottari periods. The default ayanamsa is Lahiri.
- `get_four_pillars_chart` with the same example time and coordinates plus `"gender":"female"` returns the 命式, 通変星 and 大運. Birth times are local clock times at the birthplace. If the birth time is unknown, enter noon and set `hour_unknown` to true.
- `cast_meihua_numbers` with `{"numbers":[12,27],"timezone":"Asia/Tokyo"}` calculates the original, mutual and changing hexagrams. The server uses the current date in the specified time zone for the timing portion.
- `draw_lenormand_cards` with `{"spread":"three"}` draws three unique cards locally using the Astromei catalogue and assigns them to the spread positions.

## データ送信 / Data sent to the API

ツールの呼び出しにはインターネット接続が必要です。生年月日・出生時刻・出生地など、入力した値は計算のため `api.astromei.com` に送信されます。ルノルマンの抽選は、公開カタログの取得後にローカルで行います。六曜をオフラインで調べる場合は [Astromei Rokuyo MCP](https://github.com/astromei/rokuyo-mcp) を利用できます。

The tools send their inputs, including supplied birth details, to `api.astromei.com` over HTTPS as needed. Lenormand draws use the public catalogue and run locally without a website reading record. Meihua accepts time or numbers and sends a fixed marker for the API's required question field.

## 開発 / Development

```sh
npm ci
npm test
npm run test:live
node src/stdio.js --tools kyusei
```

`npm test` verifies the stdio entry point, group selection and input validation. `npm run test:live` calls all 14 tools against the public API using sample data.