Earthdata MCPのロゴ

Earthdata MCP

組織
nasa

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

公開者nasa
リポジトリearthdata-mcp
言語Python
フォーク
14
スター
41
利用可能なツール
0
通信方式stdio
リンク
  • ツールをAIワークフローに接続

    Earthdata MCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには41件のスターと14件のフォークがあります。

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.

Earthdata MCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Earthdata MCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Earthdata MCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Earthdata MCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "earthdata-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてEarthdata MCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Earthdata MCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Earthdata MCPを使ってこのタスクを手伝ってもらえますか?
Earthdata MCP
はい、読みました。
Earthdata MCPで調べた結果をお伝えします。

よくある質問

Earthdata MCP MCPサーバーは何に使いますか?

Earthdata MCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでEarthdata MCP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでEarthdata MCPを利用できます。

TypingMindでEarthdata MCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Earthdata MCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Earthdata MCP MCPをTypingMindに接続するにはどうすればよいですか?

Earthdata MCPはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでEarthdata MCP MCPのどのようなツールを利用できますか?

Earthdata MCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Earthdata MCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Earthdata MCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇