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.
π NEW: This server now includes all Jupyter MCP Server tools through composition, providing a unified interface for both Earth data discovery and Jupyter notebook manipulation.
The following demo uses this MCP server to search for datasets and data granules on NASA Earthdata, the jupyter-earth-mcp-server to download the data in Jupyter and the jupyter-mcp-server to run further analysis.
To use this with Claude Desktop, add the following to your claude_desktop_config.json
.
{
"mcpServers": {
"earthdata": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"datalayer/earthdata-mcp-server:latest"
]
}
}
}
If you are using Linux, start Claude with the following command.
make claude-linux
The server offers 15 tools total: 3 Earthdata-specific tools plus 12 Jupyter notebook manipulation tools (prefixed with jupyter_
).
- Search for datasets on NASA Earthdata.
- Input:
- 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 for data granules on NASA Earthdata.
- Input:
- 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.
- Download Earth data granules from NASA Earth Data and integrate with Jupyter notebooks.
- This tool combines earthdata search capabilities with jupyter notebook manipulation to create a seamless download workflow.
- Input:
- folder_name (str): Local folder name to save the data.
- short_name (str): Short name of the Earth dataset to download.
- count (int): Number of data granules to download.
- 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: Success message with download code preparation details.
- Integration: Uses composed jupyter tools to add download code to notebooks for interactive execution.
The following Jupyter notebook manipulation tools are available with the jupyter_
prefix:
jupyter_append_markdown_cell
: Add markdown cells to notebooksjupyter_insert_markdown_cell
: Insert markdown cells at specific positionsjupyter_overwrite_cell_source
: Modify existing cell contentjupyter_append_execute_code_cell
: Add and execute code cellsjupyter_insert_execute_code_cell
: Insert and execute code cells at specific positionsjupyter_execute_cell_with_progress
: Execute cells with progress monitoringjupyter_execute_cell_simple_timeout
: Execute cells with timeoutjupyter_execute_cell_streaming
: Execute cells with streaming outputjupyter_read_all_cells
: Read all notebook cellsjupyter_read_cell
: Read specific notebook cellsjupyter_get_notebook_info
: Get notebook metadatajupyter_delete_cell
: Delete notebook cells
For detailed documentation of the Jupyter tools, see the Jupyter MCP Server documentation.
This server uses a composition pattern to combine tools from multiple MCP servers into a single unified interface. The implementation:
- Imports the Jupyter MCP Server at runtime
- Merges tool definitions from the Jupyter server into the Earthdata server
- Prefixes Jupyter tools with
jupyter_
to avoid naming conflicts - Preserves all functionality from both servers
This approach provides several benefits:
- β Unified Interface: Single MCP server for both Earth data and Jupyter operations
- β No Duplication: Reuses existing Jupyter MCP Server code without copying
- β Namespace Safety: Prefixed tools prevent naming conflicts
- β Graceful Degradation: Falls back to Earthdata-only if Jupyter server unavailable
- β Maintainability: Changes to Jupyter MCP Server are automatically included
The composition is implemented in the _compose_jupyter_tools()
function, which:
# Simplified version of the composition logic
def _compose_jupyter_tools():
jupyter_mcp_module = importlib.import_module("jupyter_mcp_server.server")
jupyter_mcp_instance = jupyter_mcp_module.mcp
# Add jupyter tools with prefixed names
for tool_name, tool in jupyter_mcp_instance._tool_manager._tools.items():
prefixed_name = f"jupyter_{tool_name}"
mcp._tool_manager._tools[prefixed_name] = tool
This pattern can be extended to compose additional MCP servers as needed.
-
download_analyze_global_sea_level
π- Generate a comprehensive workflow for downloading and analyzing Global Mean Sea Level Trend dataset.
- Uses both earthdata download tools and jupyter analysis capabilities.
- Returns: Detailed prompt for complete sea level analysis workflow.
-
sealevel_rise_dataset
- Search for datasets related to sea level rise worldwide.
- Input:
start_year
(int): Start year to consider.end_year
(int): End year to consider.
- Returns: Prompt correctly formatted.
-
ask_datasets_format
- To ask about the format of the datasets.
- Returns: Prompt correctly formatted.
# or run `docker build -t datalayer/earthdata-mcp-server .`
make build-docker
If you prefer, you can pull the prebuilt images.
make pull-docker