Earthdata MCP logo

Earthdata MCP

Organization
nasa

An MCP (Model Context Protocol) server providing LLM agents with direct access to NASA's Common Metadata Repository (CMR).

Publishernasa
Repositoryearthdata-mcp
LanguagePython
Forks
14
Stars
41
Available tools
0
Transport typestdio
Links
  • Connect tools to AI workflows

    Earthdata MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    41 stars and 14 forks from the linked repository.

earthdata-mcp

An MCP (Model Context Protocol) server providing LLM agents with direct access to NASA's Earth science data APIs, currently the Common Metadata Repository (CMR). This integration enables users to agentically discover, verify, and access Earth science datasets through natural language interfaces.

To start querying Earthdata immediately, see Connecting to the Server below, or the user guide on the documentation site for client setup, example queries, and troubleshooting. The public consumer documentation is published at nasa.github.io/earthdata-mcp and maintained in docs/. For a detailed breakdown of how tool inputs and outputs map to the APIs and schemas behind them, see the Parameter Support Reference.

Available Tools

  • get_keywords: Discovers official Earthdata scientific vocabulary terms (from NASA KMS) to translate colloquial user inputs (e.g. "rain") into precise search labels (e.g. "PRECIPITATION AMOUNT").
  • get_collections: Searches for datasets (collections) using scientific keywords, instruments, platforms, or spatial/temporal constraints.
  • get_granules: Searches for specific data files (granules) within a collection. Used to verify actual data availability for a given time and location.
  • get_services: Discovers data access endpoints (OPeNDAP, Harmony) and visualization layers (WMS/WMTS) associated with a collection.
  • get_tools: Finds web portals (e.g., Giovanni, Worldview) and downloadable software (e.g., Panoply) associated with a collection, returning URLs and deep-linking templates.
  • get_citations: Discovers citation records (publications, DOIs) associated with a collection, or looks up citations directly by identifier.
  • get_variables: Discovers scientific variables and measurements associated with a collection, or looks up variables by keyword. Use this to understand specific data parameters (scale, offset, fill values) before downloading or analyzing data.

Agent Workflow Instructions

The server provides system instructions (prompts/instructions.py) that enforce a Discover → Verify → Access workflow for LLM clients:

  1. Discover: Find relevant collections using get_collections.
  2. Verify: Use get_granules to confirm data actually exists for the user's requested region/time, as collections often declare global coverage regardless of gaps.
  3. Access: Instruct users to use the earthaccess Python library for authentication and downloading, providing relevant code snippets.

Project Structure

The repository is structured around a few core domains:

  • server.py & loader.py: The FastMCP server entry point and dynamic tool registration logic.
  • prompts/: System prompts and instructions that define the LLM's workflow and persona.
  • tools/: Self-contained MCP tools wrapping NASA CMR APIs (get_collections, get_granules, get_keywords, get_services, get_tools, get_citations, get_variables).
  • models/: Pydantic models for tool input validation and standardized CMR API responses.
  • tests/: Comprehensive test suite (using pytest) covering server initialization, tool logic, and mocked CMR API responses.
  • docs/: Project documentation separated into consumers/ and developers/.

Note on Legacy Code: The ingestion and embedding pipelines (including the discover_data tool, lambdas/ directory, and associated infrastructure) are currently being deprecated. The architecture is transitioning to rely purely on direct, real-time CMR API integrations.

For Consumers: Connecting to the Server

The Earthdata MCP server is deployed remotely and communicates via the official Model Context Protocol Streamable HTTP transport. To use the server, configure your MCP-compatible client to point to our endpoint.

Connection URL

Configure your client to connect to the following HTTP endpoint. Most MCP clients require these standard parameters:

  • Transport Type: streamable-http
  • URL: https://cmr.earthdata.nasa.gov/mcp/v1
  • Timeout: 60000 (Recommended: 60 seconds to allow for complex spatial/temporal queries)

Works with:

  • Claude Code CLI
  • VS Code MCP extensions
  • LibreChat
  • Any MCP-compatible client that supports Streamable HTTP transport

For Developers: Local Environment

If you want to contribute to the server or run it locally, follow these steps.

Prerequisites

  • Python 3.13+
  • uv package manager

Installation

bash
# Clone and enter directory
git clone <repo-url>
cd earthdata-mcp

# Install dependencies
uv sync

# Install dev dependencies (for testing)
uv sync --extra dev

Starting the Local Server

We recommend running the server in HTTP mode for local development and testing:

bash
uv run server.py http

The server will start and be available at http://127.0.0.1:5001/mcp/v1.

Development & Testing

See docs/developers/ for developer guides:

Running Tests

bash
# Run all tests
uv run pytest

# Run with verbose output
uv run pytest -v

# Run specific test file
uv run pytest tests/test_server.py

Regression Testing

The regression suite runs a golden dataset through a live Bedrock agentic loop and scores results in Langfuse. It requires a running MCP server, AWS credentials, and Langfuse env vars (see .env.example).

Commands

bash
# Push the golden dataset to Langfuse (run once, or after editing mcp_regression_dataset.json)
uv run python evals/regression_test.py publish

# Run experiments against the live dataset and print scores
uv run python evals/regression_test.py run

# Publish then run in one shot
uv run python evals/regression_test.py publish-and-run

Key files

FilePurpose
evals/mcp_regression_dataset.jsonGolden test cases (questions + expected tool calls / sequences)
evals/evaluators.pyLangfuse evaluator functions (tool coverage, argument quality, sequence, abstention, hallucination)
evals/sandbox_agent.pyBedrock + MCP agentic loop; results are cache-backed so evaluators reuse the same run

CI gate: set RUN_MCP_REGRESSION=1 to include the regression experiment in pytest.

bash
RUN_MCP_REGRESSION=1 uv run pytest tests/regression/test_regression.py -v

MCP Inspector (Interactive Testing)

  1. Start the server:

    bash
    uv run server.py http
  2. Launch inspector:

    bash
    npx @modelcontextprotocol/inspector
  3. Connect at http://localhost:6274:

    • Transport Type: Streamable HTTP
    • URL: http://localhost:5001/mcp/v1

Deployment

The application deploys to AWS via Bamboo CI/CD.

See the Developer Guides for detailed architectural breakdowns, deployment procedures, infrastructure definitions (terraform/), and troubleshooting steps for server startup issues.

Publishing to Model Context Protocol Registry

Pre-requisites:

  1. Download mcp-publisher from homebrew or make the source on https://github.com/modelcontextprotocol/registry

  2. Publishing is handled via GitHub Actions using OIDC authentication — see .github/workflows/publish-mcp.yml. Manual login via mcp-publisher login github currently fails for io.github.nasa/* due to a known registry bug (modelcontextprotocol/registry#1537) where org membership isn't picked up correctly. Use the workflow instead of logging in locally.

Publishing Steps:

  1. Since we are supporting multiple MCP servers, first bump the version in server.json — each release is immutable, so increment to a new version number, e.g. "version": "2.0.0", and add a new remote, e.g.
json
   {
     "type": "streamable-http",
     "url": "https://cmr.earthdata.nasa.gov/mcp/v2"
   }

Note: you cannot update the registry entry without bumping the version number, as the registry is immutable.

  1. Commit and get your changes for server.json merged into to main after the PR.

  2. Trigger the Publish to MCP Registry workflow from the Actions tab (or gh workflow run publish-mcp.yml). This authenticates via GitHub OIDC and runs mcp-publisher publish automatically — by default this publishes to the MCP registry at https://registry.modelcontextprotocol.io/servers and is publicly available to all MCP clients.

Use Earthdata MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Earthdata MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Earthdata MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Earthdata MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "earthdata-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Earthdata MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Earthdata MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Earthdata MCP to help me with this task?
Earthdata MCP
Sure. I read it.
Here is what I found using Earthdata MCP.

Frequently asked questions

What is the Earthdata MCP MCP server used for?

Earthdata MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Earthdata MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Earthdata MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Earthdata MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Earthdata MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Earthdata MCP MCP to TypingMind?

Earthdata MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Earthdata MCP MCP provide in TypingMind?

Earthdata MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Earthdata MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Earthdata MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇