NASA Earthdata MCP server

Provides a bridge to NASA's Earthdata platform for searching and retrieving Earth science datasets and data granules based on keywords, temporal ranges, and geographic boundaries.
Back to servers
Setup instructions
Provider
Datalayer
Release date
Feb 28, 2025
Language
Python
Package
Stats
12 stars

Earthdata MCP Server is a Model Context Protocol (MCP) server implementation that provides tools to interact with NASA Earth Data. It enables efficient dataset discovery and retrieval for Geospatial analysis, allowing you to search for datasets and data granules on NASA Earthdata for geospatial research and analysis.

Installation

Using Docker

The easiest way to use the Earthdata MCP Server is through Docker. You can either pull the pre-built image or build it yourself.

Pull the pre-built Docker image

docker pull datalayer/earthdata-mcp-server:latest

Build the Docker image yourself

docker build -t datalayer/earthdata-mcp-server .

Integration with Claude Desktop

To use Earthdata MCP Server with Claude Desktop, add the following configuration to your claude_desktop_config.json file:

{
  "mcpServers": {
    "earthdata": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "datalayer/earthdata-mcp-server:latest"
      ]
    }
  }
}

If you're using Linux, you can start Claude with:

make claude-linux

Available Tools

The Earthdata MCP Server provides two main tools for interacting with NASA Earth Data.

Search Earth Datasets

The search_earth_datasets tool lets you search for datasets on NASA Earthdata.

Parameters:

  • search_keywords (str): Keywords to search for in the dataset titles
  • count (int): Number of datasets to return
  • temporal (tuple, optional): Temporal range in the format (date_from, date_to)
  • bounding_box (tuple, optional): Bounding box in the format (lower_left_lon, lower_left_lat, upper_right_lon, upper_right_lat)

Returns: List of dataset abstracts

Search Earth Data Granules

The search_earth_datagranules tool lets you search for specific data granules on NASA Earthdata.

Parameters:

  • short_name (str): Short name of the dataset
  • count (int): Number of data granules to return
  • temporal (tuple, optional): Temporal range in the format (date_from, date_to)
  • bounding_box (tuple, optional): Bounding box in the format (lower_left_lon, lower_left_lat, upper_right_lon, upper_right_lat)

Returns: List of data granules

Prompts

The server includes pre-defined prompts to simplify common queries:

Sea Level Rise Dataset Prompt

Search for datasets related to sea level rise worldwide.

Parameters:

  • start_year (int): Start year to consider
  • end_year (int): End year to consider

Datasets Format Prompt

Use this prompt to ask about the format of the datasets.

Usage Examples

Here's a simple example of how you might use the tools in a Claude session:

  1. Search for sea level datasets:
I need to find NASA datasets related to sea level rise between 2010 and 2023
  1. After getting dataset results, search for specific data granules:
Please search for data granules from the SEA_SURFACE_HEIGHT_ALT dataset with a count of 5
  1. Ask about dataset formats:
What formats are available for the datasets you found?

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "earthdata" '{"command":"docker","args":["run","-i","--rm","datalayer/earthdata-mcp-server:latest"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "earthdata": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "datalayer/earthdata-mcp-server:latest"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "earthdata": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "datalayer/earthdata-mcp-server:latest"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later