Back to MCP Catalog

NASA APIs MCP Server

Space & AstronomyTypeScript
Access NASA's vast array of space and astronomy data through a standardized interface
Available Tools

nasa/apod

Retrieves the Astronomy Picture of the Day with optional date filtering and thumbnail options

datecountthumbs

nasa/mars-rover

Fetches photos from Mars rovers (Curiosity, Opportunity, Spirit) with filtering by sol, date, and camera

roversolearth_datecamera

nasa/neo

Provides data on Near Earth Objects within a specified date range

start_dateend_date

nasa/gibs

Accesses Global Imagery Browse Services for Earth observation imagery

layerdateformat

nasa/power

Retrieves Prediction Of Worldwide Energy Resources data for specified parameters and location

parameterscommunitylatitudelongitudestart

The NASA APIs MCP provides a standardized interface for AI models to interact with NASA's extensive collection of data sources. It integrates over 20 NASA APIs including APOD (Astronomy Picture of the Day), Mars Rover photos, Near Earth Objects tracking, Earth observation imagery, and more. This server implements the official Model Context Protocol specification to make NASA's wealth of space and astronomical data easily accessible to AI systems.

Overview

The NASA APIs MCP server provides a standardized interface for accessing NASA's vast array of data sources through the Model Context Protocol. This integration allows AI models to easily query and retrieve space and astronomy data from over 20 NASA APIs.

Installation

Option 1: Using npx (Recommended)

The simplest way to run the NASA MCP server is using npx:

env NASA_API_KEY=YOUR_API_KEY npx -y @programcomputer/nasa-mcp-server@latest

Alternatively, you can pass the API key as a command line argument:

npx -y @programcomputer/nasa-mcp-server@latest --nasa-api-key=YOUR_API_KEY

Option 2: Manual Installation

If you prefer to install the server manually:

# Clone the repository
git clone https://github.com/ProgramComputer/NASA-MCP-server.git

# Install dependencies
cd NASA-MCP-server
npm install

# Run with your API key
NASA_API_KEY=YOUR_API_KEY npm start

Configuration

NASA API Key

You'll need a NASA API key to use this MCP server. You can obtain one for free at https://api.nasa.gov/.

Environment Variables

The server can be configured with the following environment variable:

  • NASA_API_KEY: Your NASA API key

Configuring in Cursor

To configure the NASA MCP Server in Cursor (requires version 0.45.6+):

  1. Create or edit an mcp.json file in your Cursor configuration directory
  2. Add the following configuration:
{
  "mcpServers": {
    "nasa-mcp": {
      "command": "npx",
      "args": ["-y", "@programcomputer/nasa-mcp-server@latest"],
      "env": {
        "NASA_API_KEY": "your-api-key"
      }
    }
  }
}
  1. Replace your-api-key with your NASA API key
  2. Restart Cursor to see the new NASA tools

Available Data Sources

This MCP server integrates the following NASA APIs:

  1. NASA Open API:

    • APOD (Astronomy Picture of the Day)
    • EPIC (Earth Polychromatic Imaging Camera)
    • DONKI (Space Weather Database)
    • Insight (Mars Weather Service)
    • Mars Rover Photos
    • NEO (Near Earth Object Web Service)
    • EONET (Earth Observatory Natural Event Tracker)
    • TLE (Two-Line Element)
    • NASA Image and Video Library
    • Exoplanet Archive
    • NASA Sounds API
    • POWER (Prediction Of Worldwide Energy Resources)
  2. JPL Solar System Dynamics API:

    • SBDB (Small-Body DataBase)
    • SBDB Close-Approach Data
    • Fireball Data
    • Scout API
  3. Earth Data APIs:

    • GIBS (Global Imagery Browse Services)
    • CMR (Common Metadata Repository)
    • EPIC (Earth Polychromatic Imaging Camera)
    • FIRMS (Fire Information for Resource Management System)

Usage Examples

Each NASA API is exposed through standardized MCP methods. Here are some examples:

Astronomy Picture of the Day

{
  "method": "nasa/apod",
  "params": {
    "date": "2023-01-01",
    "thumbs": true
  }
}

Mars Rover Photos

{
  "method": "nasa/mars-rover",
  "params": {
    "rover": "curiosity",
    "sol": 1000,
    "camera": "FHAZ"
  }
}

Near Earth Objects

{
  "method": "nasa/neo",
  "params": {
    "start_date": "2023-01-01",
    "end_date": "2023-01-07"
  }
}

Disclaimer

This project is not affiliated with, endorsed by, or related to NASA (National Aeronautics and Space Administration) or any of its subsidiaries or affiliates. It is an independent implementation that accesses NASA's publicly available APIs. All NASA data used is publicly available and subject to NASA's data usage policies.

Related MCPs

No related MCPs found

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.