Logo di Earthdata MCP

Earthdata MCP

Organizzazione
nasa

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

Autorenasa
Repositoryearthdata-mcp
LinguaPython
Fork
14
Stelle
41
Strumenti disponibili
0
Tipo di trasportostdio
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Earthdata MCP mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    41 stelle e 14 fork nel repository collegato.

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.

Usa MCP Earthdata MCP con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Earthdata MCP, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Earthdata MCP come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Earthdata MCP.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "earthdata-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Earthdata MCP, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Earthdata MCP.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Earthdata MCP per aiutarmi con questa attività?
Earthdata MCP
Certo. Ho letto.
Ecco cosa ho trovato con Earthdata MCP.

Domande frequenti

A cosa serve il server MCP Earthdata MCP?

Earthdata MCP è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Earthdata MCP MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Earthdata MCP con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Earthdata MCP con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Earthdata MCP, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Earthdata MCP MCP a TypingMind?

Earthdata MCP funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Earthdata MCP MCP in TypingMind?

Earthdata MCP mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Earthdata MCP MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Earthdata MCP richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇