NASA data for your AI assistant.

NASA MCP is an open-source Model Context Protocol server. Connect it to an MCP client to search public NASA archives, check space weather, or look up near-Earth objects from a conversation.

Set up NASA MCP
Earth rising above the lunar horizon, photographed from Apollo 8
Earthrise · Apollo 8 · NASA / Bill Anders

Quick start

Install and start Docker, then build the server on your computer. Your MCP client launches the container and communicates with it over standard input and output (stdio).

  1. Build the Docker image

    git clone https://github.com/RYASTRA/nasa-mcp.git
    cd nasa-mcp
    docker build -t nasa-mcp .
  2. Connect your client

    Claude Desktop

    Add the nasa entry to the mcpServers section of claude_desktop_config.json, then restart Claude Desktop.

    {
      "mcpServers": {
        "nasa": {
          "command": "docker",
          "args": ["run", "--rm", "-i", "-e", "NASA_API_KEY", "nasa-mcp"],
          "env": { "NASA_API_KEY": "your_key_here" }
        }
      }
    }

    Replace your_key_here with your key. For a first run using NASA’s demo key, omit the env entry and the two arguments "-e", "NASA_API_KEY".

    Claude Code

    With NASA_API_KEY exported in the shell that launches Claude Code, register the server.

    claude mcp add nasa -- docker run --rm -i -e NASA_API_KEY nasa-mcp
    Other MCP clients

    Choose a local stdio server, set the command to docker, and use the arguments from the Claude Desktop example. Set NASA_API_KEY through your client’s environment settings if you have a key.

    Some tools use a NASA API key. The server defaults to the rate-limited DEMO_KEY when the variable is unset. You can get a free NASA API key and store it in your local client configuration.

  3. Try a prompt

    • “Use NASA MCP to show me today’s Astronomy Picture of the Day.”
    • “Check DONKI for geomagnetic storms in the past week.”
    • “Find the closest asteroid approaches over the next seven days.”

Tool reference

Each tool exposes its parameter names and descriptions to your MCP client. Use the names below to ask your assistant for a specific source.

Earth & space weather

DONKI
donki — solar flares, coronal mass ejections, and geomagnetic storms
Natural events
eonet_events, eonet_categories
EPIC
epic — full-disk Earth images
Earth imagery layers
gibs_tile_url — build a WMTS tile URL

Asteroids & spacecraft

Near-Earth objects
neo_feed, neo_lookup, neo_browse
Small-body data
ssd_close_approaches, ssd_fireballs, ssd_sentry
Satellite orbits
tle_search, tle_get
Satellite Situation Center
ssc_observatories

Planetary science & media

Exoplanet Archive
exoplanet_query — query the archive using ADQL
Mars weather
mars_weather — Curiosity REMS data
Planetary maps
trek_tile_url — build a Solar System Treks tile URL
NASA media
apod, nivl_search, nivl_asset

Open science & technology

Open Science Data Repository
osdr_search, osdr_study_files, osdr_study_metadata
Technology projects
techport_projects, techport_project
Technology transfer
tech_transfer — find patents, software, and spinoffs

Troubleshooting

Docker reports that the image is missing
Run the build in step one, then confirm it exists with docker images nasa-mcp.
The container waits silently in a terminal
That is expected. The server waits for an MCP handshake. Use an MCP client, keep Docker’s -i flag, and omit -t.
A NASA endpoint is rate limited
Set a personal NASA_API_KEY in your client configuration and restart or reconnect the client.