- Home
- MCP servers
- NASA
NASA
- typescript
80
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"programcomputer-nasa-mcp-server": {
"command": "npx",
"args": [
"-y",
"@programcomputer/nasa-mcp-server@latest"
],
"env": {
"NASA_API_KEY": "YOUR_API_KEY"
}
}
}
}You can access a wide range of NASA data through a single MCP server that standardizes responses for AI models. By using this MCP server, you gain a consistent interface to pull imagery, events, weather data, and other NASA data sources, with built-in validation, rate-limiting handling, and formatting tailored for AI consumption.
How to use
Connect an MCP client to the NASA MCP Server to query multiple NASA APIs from a single endpoint. You can request data such as daily astronomy pictures, Mars rover imagery, near-Earth objects data, and global imagery through standardized endpoints. The server handles input validation, error reporting, and data formatting so your AI workflows receive predictable results.
How to install
Prerequisites: you need Node.js installed on your system. Verify installation with node -v and npm -v.
Option 1: Run with npx for a quick start. Replace YOUR_API_KEY with your actual NASA API key.
env NASA_API_KEY=YOUR_API_KEY npx -y @programcomputer/nasa-mcp-server@latest
Alternatively, you can pass the API key as a flag.
npx -y @programcomputer/nasa-mcp-server@latest --nasa-api-key=YOUR_API_KEY
Option 2: Manual installation using a local setup. This brings the server into your environment for development or extensive testing.
git clone https://github.com/ProgramComputer/NASA-MCP-server.git
cd NASA-MCP-server
npm install
NASA_API_KEY=YOUR_API_KEY npm start
Option 3: Cursor-based configuration for Cursor users. Create or edit an mcp.json with the nasa-mcp configuration and restart Cursor to enable NASA tools.
mcp.json example (Cursor) content shows an mcpServers object with a nasa-mcp entry that runs via npx and passes the NASA_API_KEY through the environment.
Additional configuration and notes
Environment variables you should be aware of include NASA_API_KEY, which is required to access NASA data sources.
The server integrates APIs from NASA Open API, JPL Solar System Dynamics, and Earth Data APIs, exposing each as a standardized MCP method.
Configuration examples
{
"mcpServers": [
{
"type": "stdio",
"name": "nasa_mcp_npx",
"command": "npx",
"args": ["-y", "@programcomputer/nasa-mcp-server@latest"],
"env": [{"name": "NASA_API_KEY", "value": "YOUR_API_KEY"}]
},
{
"type": "stdio",
"name": "nasa_mcp_npx_keyflag",
"command": "npx",
"args": ["-y", "@programcomputer/nasa-mcp-server@latest", "--nasa-api-key", "YOUR_API_KEY"],
"env": [{"name": "NASA_API_KEY", "value": "YOUR_API_KEY"}]
}
]
}
Security considerations
The server validates inputs, prevents arbitrary code execution, and includes rate limiting and timeout controls to protect both client workloads and NASA data usage policies.
Testing and usage tips
To verify functionality, you can run the provided test flow that builds the project, starts the MCP server, and exercises several NASA APIs. Ensure your API key is active and permissions align with the data you request.
MCP client usage overview
When using an MCP client, you create a client instance and issue requests with the methods exposed by the NASA MCP Server, such as apod, mars-rover, neo, gibs, and power. The client handles transport to the MCP server URL and returns structured results suitable for downstream AI processing.
Available tools
apod
Astronomy Picture of the Day endpoint that returns the image or video for a given date, with optional thumbnail and random fetch options.
mars_rover
Endpoint for Mars Rover Photos, supporting rover selection, sol or earth date, and optional camera filter.
neo
Near-Earth Object data retrieval over a specified date range, returning close-approach information.
gibs
Global Imagery Browse Services endpoint for satellite imagery layers with date and format options.
power
POWER endpoint that provides climate and energy resource data for a given location and date range.