|
|
@@ -1,37 +1,36 @@
|
|
|
# Ephemeris MCP
|
|
|
|
|
|
-Ephemeris MCP is a standalone celestial computation engine exposed through MCP.
|
|
|
-v0.1 ships the core sky-state slice: planetary positions, solar events, lunar
|
|
|
-state, moon phase, sidereal time, constellation lookup, discovery, and a raw
|
|
|
-sky-state snapshot for downstream chart engines. Satellite tooling remains
|
|
|
-planned for later slices.
|
|
|
+Ephemeris MCP is a standalone Swiss Ephemeris computation service exposed through MCP.
|
|
|
+v0.2 provides planetary positions, house cusps, lunar state, sidereal time, and
|
|
|
+related astronomical data to downstream consumers. astro-mcp is the first
|
|
|
+downstream consumer; others (e.g. satrack-mcp) are planned.
|
|
|
|
|
|
The server binds to `0.0.0.0` and the current reachable instance is
|
|
|
-`192.168.0.249:7015`.
|
|
|
+`192.168.0.200:7015`.
|
|
|
|
|
|
## What it is
|
|
|
|
|
|
-- A shared sky-state service for time- and location-dependent calculations
|
|
|
-- A source of planetary positions, solar events, lunar state, sidereal time, and constellation lookup
|
|
|
+- A shared Swiss Ephemeris service so downstream servers don't have to bundle it
|
|
|
+- Source of planetary positions, house cusps, solar events, lunar state, sidereal time, and constellation lookup
|
|
|
- A convenience moon-phase tool for quick manual checks
|
|
|
-- A raw sky-state snapshot tool for downstream chart engines
|
|
|
-- A utility layer for downstream consumers that want raw sky data
|
|
|
+- A raw sky-state snapshot tool (`get_sky_state`) for downstream chart engines
|
|
|
+- 22 house systems available for house cusp computation
|
|
|
|
|
|
## What it is not
|
|
|
|
|
|
-- Not an interpretation engine
|
|
|
-- Not a charting service
|
|
|
+- Not an interpretation engine (no element balance, stelliums, aspect patterns)
|
|
|
+- Not a charting service (no aspects, transits, synastry)
|
|
|
- Not a consumer-facing astrology app
|
|
|
-- Not a finished satellite tracking stack in v0.1
|
|
|
+- Not a finished satellite tracking stack in v0.2
|
|
|
|
|
|
## Project direction
|
|
|
|
|
|
The implementation is intentionally split between:
|
|
|
|
|
|
-- objective ephemeris computation
|
|
|
-- cache-backed retrieval of repeatable results
|
|
|
-- a small MCP surface for downstream consumers
|
|
|
-- a later satellite slice that will add TLE and pass prediction support
|
|
|
+- Swiss Ephemeris computation as a service (positions, houses, lunar, solar, sidereal)
|
|
|
+- Cache-backed retrieval of repeatable results
|
|
|
+- A small MCP surface for downstream consumers
|
|
|
+- A later satellite slice that will add TLE and pass prediction support
|
|
|
|
|
|
The current design and tool intent are described in:
|
|
|
|
|
|
@@ -42,16 +41,14 @@ The current design and tool intent are described in:
|
|
|
|
|
|
## Repo layout
|
|
|
|
|
|
-- `main.py` - uvicorn entry point
|
|
|
-- `src/ephemeris_mcp/` - application code
|
|
|
-- `tests/` - automated checks
|
|
|
-- `run.sh` / `restart.sh` / `killserver.sh` - service helpers
|
|
|
-- `Dockerfile` / `docker-compose.yml` - container entry points
|
|
|
-- `.env.example` - optional runtime environment template
|
|
|
-- `tests.sh` - test runner
|
|
|
-- `data/` - local ephemeris/cache data
|
|
|
-- `logs/` - runtime logs
|
|
|
-- `mcporter` - preferred manual client for smoke tests
|
|
|
+- `main.py` — uvicorn entry point
|
|
|
+- `src/ephemeris_mcp/` — application code
|
|
|
+- `tests/` — automated checks
|
|
|
+- `run.sh` / `restart.sh` / `killserver.sh` — service helpers
|
|
|
+- `Dockerfile` / `docker-compose.yml` — container entry points
|
|
|
+- `data/ephe/` — Swiss Ephemeris .se1 files (git-tracked, image-bundled)
|
|
|
+- `data/cache/` — runtime sqlite cache (gitignored, volume-mounted)
|
|
|
+- `logs/` — runtime logs
|
|
|
|
|
|
## mcporter Examples
|
|
|
|
|
|
@@ -89,28 +86,34 @@ mcporter --config "$CONFIG" call ephemeris.get_lunar_state --args '{"datetime":"
|
|
|
mcporter --config "$CONFIG" call ephemeris.get_planetary_positions --args '{"datetime":"2026-05-10T12:00:00Z","lat":52.52,"lon":13.405}'
|
|
|
```
|
|
|
|
|
|
-The server is exposed on the LAN at `192.168.0.249:7015` and mounts MCP at
|
|
|
+The server is exposed on the LAN at `192.168.0.200:7015` and mounts MCP at
|
|
|
`/mcp/sse`.
|
|
|
|
|
|
## Astro-client contract
|
|
|
|
|
|
- `get_sky_state` is the preferred raw snapshot for downstream chart engines.
|
|
|
- It contains planetary positions, lunar state, sidereal time, and solar events.
|
|
|
-- Houses, Placidus, and zodiac-sign placement stay outside this repo.
|
|
|
+- When `house_system` is provided, it also includes house cusps and angles.
|
|
|
+- 22 house systems: P=Placidus, K=Koch, E=Equal, W=Whole Sign, A=Alcabitius,
|
|
|
+ C=Campanus, M=Morinus, R=Porphyry, T=Polich/Page, U=Krusinski-Pisa,
|
|
|
+ V=Vehlow Equal, X=Meridian, Y=Horizontal, H=Azimuthal, O=Equal/MC,
|
|
|
+ F=Carter poli-eq, D=Equal (15° Aries), G=Gauquelin sectors, I=Sunshine,
|
|
|
+ J=Sunshine alt, L=Pullen SD, N=Equal/1, Q=Pullen SR, S=Sripati, Z=APC houses.
|
|
|
|
|
|
## Data files
|
|
|
|
|
|
-- Chiron requires Swiss Ephemeris asteroid ephemeris files in `./data/`.
|
|
|
+- Swiss Ephemeris data lives in `./data/ephe/` and is bundled into the Docker image.
|
|
|
+- Chiron requires `seas_18.se1` (and related `seas_*.se1` files) — all included.
|
|
|
- The time-segmented files `seas_00.se1` through `seas_168.se1` cover Chiron from ~675 CE to ~4650 CE.
|
|
|
- The files `sepl_*.se1` and `semo_*.se1` are needed for far-future dates (beyond 3000 CE).
|
|
|
-- If any of these files are missing, `get_planetary_positions` will still return the other bodies, but Chiron will error until the files are present.
|
|
|
-- All files are from the Swiss Ephemeris distribution (based on JPL DE441), available at https://github.com/aloistr/swisseph/tree/master/ephe
|
|
|
+- Runtime cache (`ephemeris.sqlite3`) lives in `./data/cache/` and is NOT bundled — it's volume-mounted at runtime.
|
|
|
+- All .se1 files are from the Swiss Ephemeris distribution (based on JPL DE441), available at https://github.com/aloistr/swisseph/tree/master/ephe
|
|
|
|
|
|
## Docker
|
|
|
|
|
|
- Build and run the service with `docker compose up --build`.
|
|
|
-- The compose file mounts `./data` and `./logs` into the container.
|
|
|
-- Keep `seas_18.se1` in `./data` before starting the container if you want Chiron in the response set.
|
|
|
+- `data/ephe/` is COPY'd into the image (self-contained, no volume mount needed).
|
|
|
+- `data/cache/` is volume-mounted for persistent runtime cache.
|
|
|
- The container listens on port `7015` and serves MCP at `/mcp/sse`.
|
|
|
|
|
|
## Working notes
|
|
|
@@ -118,4 +121,4 @@ The server is exposed on the LAN at `192.168.0.249:7015` and mounts MCP at
|
|
|
- Keep the server deterministic and easy to reason about.
|
|
|
- Prefer structured outputs over free-form text.
|
|
|
- Keep the repo docs and wiki reference aligned when the scope changes.
|
|
|
-- Keep future ideas in the plan even if they are not in v0.1 yet.
|
|
|
+- Keep future ideas in the plan even if they are not in v0.2 yet.
|