An MCP server that computes offline astronomical data for planets, the Moon, bright stars, and sky events, including positions, rise/set times, phases, eclipses, and visibility. It also offers optional network-backed ephemeris and satellite-pass tools when enabled by configuration.
From the registry: Offline observational astronomy: positions, rise/set, moon phases, eclipses, and seasons.
Please install the `astronomy-mcp-server` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install Node.js** — Node.js v24 or higher is required to use the portable npx install path. (https://nodejs.org/)
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","@cyanheads/astronomy-mcp-server@latest"]
- required environment variables:
- `MCP_TRANSPORT_TYPE`: Transport mode for the server. Use "stdio" for MCP client stdio connections. (example: `stdio`)
- optional environment variables:
- `MCP_LOG_LEVEL`: Log level for server logging. (example: `info`)
- `ASTRONOMY_ENABLE_HORIZONS`: Set to "true" to register the astronomy_get_ephemeris tool backed by JPL Horizons. (example: `true`)
- `ASTRONOMY_ENABLE_SATELLITES`: Set to "true" to register the astronomy_get_satellite_passes tool backed by CelesTrak + SGP4. (example: `true`)
- `ASTRONOMY_HORIZONS_BASE_URL`: Override the JPL Horizons API endpoint used by the ephemeris extension. (example: `<your-horizons-api-url>`)
- `ASTRONOMY_CELESTRAK_BASE_URL`: Override the CelesTrak GP/TLE endpoint used by the satellite extension. (example: `<your-celestrak-api-url>`)
- `ASTRONOMY_DEFAULT_TIMEZONE`: Fallback IANA timezone used when a tool call omits timezone. If unset, output is UTC-only. (example: `<your-iana-timezone>`)
- `ASTRONOMY_REQUEST_TIMEOUT_MS`: HTTP timeout in milliseconds for Horizons and CelesTrak requests. (example: `<your-timeout-ms>`)
- `ASTRONOMY_TLE_CACHE_TTL_MS`: In-process TLE cache TTL in milliseconds. (example: `<your-cache-ttl-ms>`)
- `MCP_HTTP_PORT`: Port for HTTP transport. Not needed for stdio, but supported by the server configuration. (example: `<your-port>`)
- `MCP_AUTH_MODE`: Authentication mode: none, jwt, or oauth. (example: `<your-auth-mode>`)
- `LOGS_DIR`: Directory for log files (Node.js only). (example: `<your-logs-directory>`)
- `STORAGE_PROVIDER_TYPE`: Storage backend type. (example: `<your-storage-provider-type>`)
- `OTEL_ENABLED`: Enable OpenTelemetry instrumentation. (example: `true`)
Note: The README also documents Streamable HTTP mode, started locally with MCP_TRANSPORT_TYPE=http and MCP_HTTP_PORT set; endpoint path is /mcp. The simplest portable MCP client configuration is the stdio npx path. No API key is required.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.ASTRONOMY_ENABLE_HORIZONSEnables registration of the JPL Horizons ephemeris tool.ASTRONOMY_ENABLE_SATELLITESEnables registration of the satellite-pass tool.MCP server for Gearsystem Sega Master System / Game Gear / SG-1000 emulator