NASA MCP Server: APOD NEO EPIC GIBS
Explore NASA data via the MCP server, a unified gateway to APOD, NEO, EPIC, GIBS and more for images, orbits and earth imagery.
npx -y @ProgramComputer/NASA-MCP-serverOverview
The NASA MCP Server is a lightweight gateway that exposes curated NASA data sources (APOD, NEO, EPIC, GIBS, and related APIs) via a Model Context Protocol (MCP) compatible interface. It centralizes image assets, near-Earth object (NEO) telemetry, Earth planetary imagery, and map tile access into a single HTTP service, making it easier to incorporate authoritative NASA content into AI agents, chatbots, or developer tools.
By converting NASA endpoints into an MCP-friendly toolset, the server lets language models request precise data (images, metadata, or tile URLs) in a predictable format. This is useful for applications that need programmatic access to space imagery, orbital data, and Earth visualizations without wiring multiple APIs or implementing custom parsing logic.
Features
- Single MCP-compatible endpoint aggregating multiple NASA services
- Direct access to APOD (Astronomy Picture of the Day) images and metadata
- Near-Earth Object (NEO) lookups: objects, close approaches, orbit data
- EPIC (Earth Polychromatic Imaging Camera) historic image retrieval
- GIBS (Global Imagery Browse Services) tile or layer access for web maps
- Simple JSON tool descriptors for LLM tool invocation
- Configurable via environment variables and runnable with Docker
- Lightweight and designed to be embedded in AI agent contexts
Installation / Configuration
Clone the repository and run locally or with Docker. Replace <YOUR_NASA_API_KEY> with your NASA developer key.
Clone repository:
Node/npm-based local install (if the project is Node-based):
# Edit .env to add your NASA API key and options, or use the commands below
Docker build and run:
Example .env variables
PORT=8080
NASA_API_KEY=YOUR_KEY_HERE
ENABLE_GIBS=true
ENABLE_EPIC=true
LOG_LEVEL=info
Common environment variables (summary):
| Variable | Default | Description |
|---|---|---|
| PORT | 8080 | HTTP port the server listens on |
| NASA_API_KEY | — | Required: NASA API key for external API calls |
| ENABLE_GIBS | true | Toggle GIBS layer support |
| ENABLE_EPIC | true | Toggle EPIC image endpoints |
| LOG_LEVEL | info | Logging verbosity |
Available Tools / Available Resources
The MCP server exposes a set of resources and tool descriptors suited for LLM tool invocation. Typical endpoints:
| Path | Purpose |
|---|---|
| /mcp/tools | JSON listing of MCP tools supported (APOD, NEO, EPIC, GIBS) |
| /apod | Fetch APOD image and metadata (optional date query) |
| /neo | Query NEO by designation or date range |
| /epic | List EPIC images and fetch image URLs for a date |
| /gibs | Provide tile URL templates or layer metadata for GIBS |
Example: GET /apod?date=2023-01-01 returns APOD metadata with direct image URL.
MCP tool descriptor (example JSON returned at /mcp/tools):
Use Cases
- AI assistants: Expose precise NASA resources as callable tools in an LLM agent. An assistant can call the
apodtool to fetch today’s space image or useneoto check close approaches relevant to a user query. - Data exploration: Quickly retrieve EPIC images for a given date to build datasets (time-series of Earth views over a region).
- Visualization: Use GIBS layer descriptors and tile templates to overlay NASA imagery on web maps or GIS applications without manual configuration.
- Research/education: Provide students or researchers programmatic access to APOD for slides, or NEO metadata for orbital analysis and tracking demos.
Concrete examples
- Fetch today’s APOD via curl:
- Search NEOs that approached on a date range (example):
- Request EPIC images for a date (JSON list of images and URLs):
- Retrieve GIBS tile template for a layer:
Links and Resources
- GitHub: https://github.com/ProgramComputer/NASA-MCP-server
- NASA APIs and docs: https://api.nasa.gov
- GIBS documentation: https://earthdata.nasa.gov
- Model Context Protocol (MCP) reference (useful when integrating with LLM tool frameworks)
Notes: Always respect NASA API usage policies and throttle requests appropriately. Use a valid NASA API key for reliable access to endpoints.