space-mcp-server
# Space MCP Server
MCP server giving AI agents access to NASA and space/astronomy data — APOD, Mars rover photos, near-Earth asteroids, exoplanets, Earth imagery, natural events, and space weather.
## Features (10 Tools)
| Tool | Description |
|------|-------------|
| `get_astronomy_picture` | NASA's Astronomy Picture of the Day (APOD) |
| `search_nasa_images` | Search NASA's 140,000+ image/video library |
| `get_exoplanets` | Query 5,000+ confirmed exoplanets |
| `get_space_weather` | Solar flares, CMEs, geomagnetic storms (DONKI) |
| `get_mars_rover_photos` | Real photos from Curiosity, Perseverance, Opportunity, Spirit |
| `get_mars_rover_info` | Rover mission status, cameras, photo counts |
| `get_near_earth_objects` | Track asteroids approaching Earth (NeoWs) |
| `get_asteroid_details` | Orbital data and close approaches for specific asteroids |
| `get_earth_imagery` | Full-Earth photos from DSCOVR satellite (EPIC) |
| `get_natural_events` | Active wildfires, volcanoes, storms worldwide (EONET) |
## Quick Start
### Install from source
```bash
git clone https://github.com/AiAgentKarl/space-mcp-server.git
cd space-mcp-server
python -m venv .venv
.venv/Scripts/activate # Windows
# source .venv/bin/activate # Linux/Mac
pip install -e .
```
### Configure
```bash
cp .env.example .env
# Edit .env and add your NASA API key (optional, DEMO_KEY works out of the box)
```
Get a free API key at [https://api.nasa.gov/](https://api.nasa.gov/) for higher rate limits.
### Run
```bash
space-mcp
# or
python -m src.server
```
## Claude Code Integration
Add to your `.mcp.json`:
```json
{
"mcpServers": {
"space": {
"type": "stdio",
"command": "path/to/.venv/Scripts/python.exe",
"args": ["-m", "src.server"],
"env": {
"NASA_API_KEY": "your-api-key-here"
}
}
}
}
```
## API Sources
| API | Key Required | Rate Limit |
|-----|-------------|------------|
| [NASA API](https://api.nasa.gov/) (APOD, Mars, NeoWs, DONKI) | Yes (DEMO_KEY works) | 30/hour (DEMO), 1000/hour (registered) |
| [EPIC](https://epic.gsfc.nasa.gov/) | No | No limit |
| [EONET](https://eonet.gsfc.nasa.gov/) | No | No limit |
| [NASA Image Library](https://images.nasa.gov/) | No | No limit |
| [Exoplanet Archive](https://exoplanetarchive.ipac.caltech.edu/) | No | No limit |
## Architecture
```
src/
├── server.py # FastMCP server entry point
├── config.py # Settings & environment variables
├── analytics.py # Usage tracking
├── clients/
│ ├── nasa.py # NASA API (APOD, Mars, NeoWs, DONKI)
│ ├── epic.py # EPIC Earth imagery
│ ├── eonet.py # EONET natural events
│ ├── nasa_images.py # NASA Image Library
│ └── exoplanet.py # Exoplanet Archive
└── tools/
├── astronomy.py # APOD, image search, exoplanets, space weather
├── mars.py # Mars rover photos & info
├── asteroids.py # Near-Earth objects & asteroid details
└── earth.py # EPIC imagery & natural events
```
---
## More MCP Servers by AiAgentKarl
| Category | Servers |
|----------|---------|
| 🔗 Blockchain | [Solana](https://github.com/AiAgentKarl/solana-mcp-server) |
| 🌍 Data | [Weather](https://github.com/AiAgentKarl/weather-mcp-server) · [Germany](https://github.com/AiAgentKarl/germany-mcp-server) · [Agriculture](https://github.com/AiAgentKarl/agriculture-mcp-server) · [Space](https://github.com/AiAgentKarl/space-mcp-server) · [Aviation](https://github.com/AiAgentKarl/aviation-mcp-server) · [EU Companies](https://github.com/AiAgentKarl/eu-company-mcp-server) |
| 🔒 Security | [Cybersecurity](https://github.com/AiAgentKarl/cybersecurity-mcp-server) · [Policy Gateway](https://github.com/AiAgentKarl/agent-policy-gateway-mcp) · [Audit Trail](https://github.com/AiAgentKarl/agent-audit-trail-mcp) |
| 🤖 Agent Infra | [Memory](https://github.com/AiAgentKarl/agent-memory-mcp-server) · [Directory](https://github.com/AiAgentKarl/agent-directory-mcp-server) · [Hub](https://github.com/AiAgentKarl/mcp-appstore-server) · [Reputation](https://github.com/AiAgentKarl/agent-reputation-mcp-server) |
| 🔬 Research | [Academic](https://github.com/AiAgentKarl/crossref-academic-mcp-server) · [LLM Benchmark](https://github.com/AiAgentKarl/llm-benchmark-mcp-server) · [Legal](https://github.com/AiAgentKarl/legal-court-mcp-server) |
[→ Full catalog (40+ servers)](https://github.com/AiAgentKarl)
## License
MIT
TDQS
Scored across 11 tools
Each tool targets a distinct space-related domain (asteroids, APOD, Earth imagery, exoplanets, Mars rovers, natural events, NEO, space weather, usage stats, NASA image search). No two tools have overlapping purposes.
All tools follow a consistent verb_noun pattern in snake_case, with most using 'get_'. The exception is 'search_nasa_images' which uses 'search_' instead of 'get_', a minor deviation.
With 11 tools, the server covers a broad range of space data without being overwhelming. Each tool serves a clear, non-redundant purpose, making the count appropriate for the scope.
The tool set covers major NASA data sources (APOD, Mars photos, NEO, space weather, natural events, image search) but lacks coverage of satellite tracking, deep space missions, or planetary facts. Minor gaps but functional for common tasks.