@openephemeris/mcp-server
v3.5.0
Published
Model Context Protocol server for the Open Ephemeris astronomical computation API
Maintainers
Readme
OpenEphemeris MCP Server
Model Context Protocol server for OpenEphemeris. This package exposes typed astrology tools and an allowlist-gated generic proxy (dev.call) for MCP-compatible clients.
Quick Start
One-click install (Cursor)
Replace
YOUR_API_KEY_HEREin Cursor MCP settings with your API key from https://openephemeris.com/dashboard.
Cursor deeplink payload:
{
"command": "npx",
"args": [
"-y",
"@openephemeris/mcp-server"
],
"env": {
"OPENEPHEMERIS_PROFILE": "dev",
"OPENEPHEMERIS_BACKEND_URL": "https://api.openephemeris.com",
"OPENEPHEMERIS_API_KEY": "YOUR_API_KEY_HERE"
}
}Manual install (stdio MCP clients)
{
"mcpServers": {
"openephemeris": {
"command": "npx",
"args": ["-y", "@openephemeris/mcp-server"],
"env": {
"OPENEPHEMERIS_PROFILE": "dev",
"OPENEPHEMERIS_BACKEND_URL": "https://api.openephemeris.com",
"OPENEPHEMERIS_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Platform guide
Detailed setup walkthroughs for each platform are in SETUP.md.
| Client | Install mode | Config location |
|---|---|---|
| Cursor | One-click deeplink or manual | ~/.cursor/mcp.json |
| Claude Desktop (macOS) | Manual | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | Manual | %APPDATA%\Claude\claude_desktop_config.json |
| Windsurf | Manual | ~/.codeium/windsurf/mcp_config.json (or legacy ~/.codeium/mcp_config.json) |
Client install walkthroughs
- Cursor
- Click the "Install in Cursor" button above, then replace
YOUR_API_KEY_HEREin Cursor MCP settings. - If you prefer manual setup, paste the
mcpServers.openephemerisblock from "Manual install" into~/.cursor/mcp.json.
- Click the "Install in Cursor" button above, then replace
- Claude Desktop (macOS/Windows)
- Open the platform config file from the table above.
- Add the same
mcpServers.openephemerisblock from "Manual install". - Restart Claude Desktop.
- Windsurf
- Open
~/.codeium/windsurf/mcp_config.json(or the legacy~/.codeium/mcp_config.jsonpath). - Add the
mcpServers.openephemerisblock from "Manual install". - Restart Windsurf.
- Open
Remote-only clients (ChatGPT Developer Mode, Antigravity, etc.)
This package runs as a local stdio MCP server. Remote-only clients require a hosted MCP endpoint (Streamable HTTP/SSE), so you must run this server behind an MCP bridge/proxy and expose it over HTTPS before adding it in those clients.
Auth and upgrade behavior in MCP clients
- Missing/invalid credentials (
401): tool call fails with a message that points users to sign up/sign in athttps://openephemeris.com/login?signup=true&redirect=%2Fdashboard%3Ftab%3Daccount, then create/manage keys inhttps://openephemeris.com/dashboard?tab=account. - Tier-gated endpoint (
403): tool call returns an upgrade-required message withhttps://openephemeris.com/payand dashboard billing/key management link. - Monthly quota exhausted (
402): tool call returns usage quota guidance with both dashboard (/dashboard?tab=account) and upgrade (/pay) links. - Burst/rate limit (
429): tool call returns retry guidance and links to dashboard usage monitoring.
What You Can Ask
- "Calculate a natal chart for 1990-04-15 14:30 in Chicago."
- "Find transit events for the next 6 months."
- "Get moon phase and void-of-course status right now."
- "Find an electional window for signing a contract next month."
- "Generate Human Design chart data from birth details."
- "Call
/predictive/transits/searchwithformat=llm."
Tooling Model
- Typed tools are preferred for common workflows (natal, transits, moon phase, eclipse, synastry, relocation, electional, Human Design).
- Generic tools:
dev.list_allowedreturns all currently allowlisted operations, anddev.callinvokes any allowlisted operation bymethod + path. - Security model: default-deny with explicit allowlist in
config/dev-allowlist.json. - Deny prefixes block sensitive route families (
/auth,/billing,/admin, etc.).
dev.call input
| Parameter | Type | Required | Description |
|---|---|---|---|
| method | GET\|POST\|PUT\|PATCH\|DELETE | Yes | HTTP method |
| path | string | Yes | Absolute API path, e.g. /ephemeris/natal-chart |
| query | object | No | Query parameters |
| body | object | No | JSON body for non-GET requests |
| preset | full\|simple | No | Convenience mapping to query.preset |
| format | json\|llm\|llm_v2 | No | Convenience mapping to query.format (llm_v2 normalizes to llm) |
| output_mode | full\|simple\|llm\|llm_v2 | No | Legacy compatibility field |
Environment Variables
| Variable | Required | Description |
|---|---|---|
| OPENEPHEMERIS_API_KEY | Yes (unless service key/JWT used) | API key for OpenEphemeris |
| ASTROMCP_API_KEY | No | Legacy alias for OPENEPHEMERIS_API_KEY (checked as fallback) |
| OPENEPHEMERIS_BACKEND_URL | No | Defaults to https://api.openephemeris.com |
| OPENEPHEMERIS_PROFILE | No | dev by default |
| OPENEPHEMERIS_SERVICE_KEY | No | Internal service auth |
| OPENEPHEMERIS_JWT | No | Bearer token auth |
| OPENEPHEMERIS_DEV_ALLOWLIST_PATH | No | Override allowlist file path |
| MCP_USER_ID | No | Per-instance user identifier |
Legacy aliases (ASTROMCP_*, MERIDIAN_*) remain supported.
Legal
This package is licensed under the MIT License. However, use of this package to access the OpenEphemeris API constitutes use of the Service and is governed by the OpenEphemeris Terms of Service. By using this package, you agree to those terms. See also the Privacy Policy and Acceptable Use Policy.
Development
npm install
npm run dev
npm run typecheck
npm test
npm run regen:dev-allowlist
npm run check:dev-allowlist
npm run sync:readme
npm run check:readme
npm run verify:releaseDeploying the SSE Server to Fly.io
When you update the MCP server logic (handlers, bug fixes, hardening), you should deploy it so clients connecting via our remote https://mcp.openephemeris.com/sse endpoint get the updates immediately.
- Navigate to
apps/api/mcp-server - Run
fly deploy --remote-only
Note on NPM: Deploying to Fly.io instantly updates the web-accessible SSE tool. However, users installing your tool locally in Cursor/Desktop via npx @openephemeris/mcp-server will only receive the updates once a new version is published to NPM. If your changes are critical, you should bump the version in package.json and run npm publish (or your CI release pipeline) after deploying to Fly.
npm run verify:release is the release gate. It checks:
- allowlist freshness against OpenAPI
- schema pack freshness
- README synchronization
- type safety + tests
- publish tarball contents (
npm pack --dry-run --json)
Architecture
MCP Client (Cursor / Claude / Windsurf / other stdio clients)
| stdio JSON-RPC
v
openephemeris-mcp (Node.js)
| typed tools + dev.call/dev.list_allowed
| auth chain: Service Key > API Key > JWT
v
OpenEphemeris APIRuntime Snapshot (Generated)
Generated by npm run sync:readme from config/dev-allowlist.json and the live tool registry.
- Allowlisted operations: 20
- Methods:
GET=4,POST=16,PUT=0,PATCH=0,DELETE=0 - Registered tools (
OPENEPHEMERIS_PROFILE=dev): 50 - Typed tools:
acg_hits,acg_power_lines,auth_login,auth_logout,auth_status,chinese_bazi,dev_call,dev_list_allowed,electional_aspect_search,electional_moment_analysis,electional_station_tracker,ephemeris_angles_points,ephemeris_aspect_check,ephemeris_bi_wheel,ephemeris_chart_wheel,ephemeris_composite,ephemeris_composite_midpoint,ephemeris_dignities,ephemeris_electional,ephemeris_fixed_stars,ephemeris_hermetic_lots,ephemeris_house_cusps,ephemeris_lunar_return,ephemeris_midpoints,ephemeris_moon_phase,ephemeris_natal_batch,ephemeris_natal_chart,ephemeris_natal_transits,ephemeris_next_eclipse,ephemeris_overlay,ephemeris_planet_position,ephemeris_planetary_return,ephemeris_progressed_chart,ephemeris_relocation,ephemeris_retrograde_status,ephemeris_solar_return,ephemeris_synastry,ephemeris_transits,hd_opposition,hd_planetary_return,human_design_chart,human_design_composite,human_design_penta,vedic_chart,venus_eight_year_star,venus_elongations,venus_phase,venus_star_points,venus_star_points_conjunctions,venus_stations - Generic tools:
Allowlist Families
| Family | Operations | Example |
|---|---:|---|
| acg | 2 | POST /acg/ccg, POST /acg/power-lines |
| comparative | 5 | POST /comparative/composite, POST /comparative/composite/midpoint |
| electional | 4 | GET /electional/aspect-search, GET /electional/find-window |
| ephemeris | 1 | POST /ephemeris/relocation |
| predictive | 6 | POST /predictive/returns, POST /predictive/returns/lunar |
| visualization | 2 | POST /visualization/bi-wheel, POST /visualization/chart-wheel |
Why OpenEphemeris for AI Agents?
Most LLMs (like Claude and ChatGPT) struggle heavily with astronomical calculations (trigonometry, Julian date conversions, and Swiss Ephemeris lookups). OpenEphemeris serves as a secure, remote math engine.
By pairing LLMs with the OpenEphemeris MCP server, your agents can instantly access:
- Zero-hallucination coordinates: Direct, sub-arcsecond NASA JPL DE440/DE441 calculations.
- LLM-optimized tokens (
format=llm): We compress standard 25,000 token JSON chart responses into minimal text blocks, cutting your inference costs by 50%. - Ready-to-use astrology layers: Built-in support for Astrocartography geoJSON lines, Hermetic Lots, Fixed Stars, and complex Human Design matrix generation.
