NASA API integration with MCP (Model Context Protocol)
Project description
NASA-MCP. Integration via MCP with NASA APIs
NASA is the National Aeronautics and Space Administration of the United States.
NASA-MCP allows you to retrieve astronomical data, space weather information, Earth imagery, and more from NASA's APIs directly from Claude AI and other MCP compatible clients, using the Model Context Protocol (MCP).
NASA-MCP is an MCP server that exposes tools enabling LLMs to query data from various NASA APIs, including APOD (Astronomy Picture of the Day), Asteroids NeoWs, DONKI (Space Weather Database), Earth imagery, EPIC (Earth Polychromatic Imaging Camera), and Exoplanet data.
It includes secure handling of API keys and proper error management for all API requests.
Key Features
- Access to Astronomy Picture of the Day (APOD) with explanations and imagery
- Query Near Earth Objects data and asteroid information
- Retrieve Space Weather data from DONKI, including solar flares, geomagnetic storms, and more
- Get Earth imagery from Landsat 8 satellite for specific coordinates
- Access EPIC camera images showing the full Earth disk
- Query the Exoplanet Archive database for information about planets outside our solar system
Installation
Prerequisites
- Python 3.10 or higher
- uv package manager
Installing uv
The first step is to install uv, a package manager for Python.
It can be installed from the command line.
On macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
On Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
You can also install it with pip:
pip install uv
For more information about installing uv, visit the uv documentation.
Integration with clients like Claude for Desktop
Once uv is installed, you can use the MCP server from any compatible client such as Claude for Desktop, in which case the steps to follow are:
- Go to Claude > Settings > Developer > Edit Config >
claude_desktop_config.json - Add the following block inside
"mcpServers":
"nasa-mcp": {
"command": "uvx",
"args": [
"nasa_mcp"
],
"env": {
"NASA_API_KEY": "YOUR_NASA_API_KEY"
}
}
- Get a free API key from NASA at: https://api.nasa.gov/
- Replace
YOUR_NASA_API_KEYwith your actual API key (leave the quotes). You can also use "DEMO_KEY" for limited testing. - If you already have another MCP server configured, separate each with a comma
,.
In general, to integrate it into any other MCP-compatible client such as Cursor, CODEGPT, or Roo Code, simply go to the MCP server configuration of your client and add the same code block.
Usage Examples
Once properly configured, you can ask things like:
- "Show me today's astronomy picture of the day"
- "Find asteroids that will pass near Earth in the next week"
- "Get information about solar flares from January 2023"
- "Show me Earth imagery for coordinates 29.78, -95.33"
- "Find exoplanets in the habitable zone"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nasa_mcp-0.1.0.tar.gz.
File metadata
- Download URL: nasa_mcp-0.1.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
535f7b18367439a6a0cfac4125039fbea53b10878362824d823a01e0e88988df
|
|
| MD5 |
389f7e88fbb297fd15b05653f31b60ca
|
|
| BLAKE2b-256 |
324067db0587014c20ce87fae3e222404c89ae87b605d6d6dce7ab72a39056e7
|
Provenance
The following attestation bundles were made for nasa_mcp-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on AnCode666/nasa-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nasa_mcp-0.1.0.tar.gz -
Subject digest:
535f7b18367439a6a0cfac4125039fbea53b10878362824d823a01e0e88988df - Sigstore transparency entry: 204588777
- Sigstore integration time:
-
Permalink:
AnCode666/nasa-mcp@9202d64f3d534b0b1e1b323f5ccec8b48bfd3e66 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/AnCode666
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@9202d64f3d534b0b1e1b323f5ccec8b48bfd3e66 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nasa_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nasa_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a026ac15cd90d2e43b7bdc4146f5a6c2f4257a89b9cbabe7753ef770eefa72ed
|
|
| MD5 |
7f081f302c576dff94a130af827dbc22
|
|
| BLAKE2b-256 |
e509baf9280252b94fbc9e400f7ec8de3613d0362b6c924a4063d94c71006529
|
Provenance
The following attestation bundles were made for nasa_mcp-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on AnCode666/nasa-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nasa_mcp-0.1.0-py3-none-any.whl -
Subject digest:
a026ac15cd90d2e43b7bdc4146f5a6c2f4257a89b9cbabe7753ef770eefa72ed - Sigstore transparency entry: 204588778
- Sigstore integration time:
-
Permalink:
AnCode666/nasa-mcp@9202d64f3d534b0b1e1b323f5ccec8b48bfd3e66 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/AnCode666
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@9202d64f3d534b0b1e1b323f5ccec8b48bfd3e66 -
Trigger Event:
release
-
Statement type: