No project description provided
Project description
🪐 ✨ Earthdata MCP Server
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.
Use with Claude Desktop
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
Tools
The server offers 15 tools total: 3 Earthdata-specific tools plus 12 Jupyter notebook manipulation tools (prefixed with jupyter_).
Earthdata Tools
search_earth_datasets
- 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_earth_datagranules
- 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 🆕
- 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.
Jupyter Tools (Composed)
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.
Architecture: Server Composition
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
Implementation Details
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.
Prompts
-
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.
Building
# or run `docker build -t datalayer/earthdata-mcp-server .`
make build-docker
If you prefer, you can pull the prebuilt images.
make pull-docker
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file earthdata_mcp_server-0.2.0-py3-none-any.whl.
File metadata
- Download URL: earthdata_mcp_server-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc77a25c2a78030d0a2e9a77d94cec4579f702ab2c1b5381404355661f3b2d79
|
|
| MD5 |
f2535db370545541a0ed8dd5cff22db9
|
|
| BLAKE2b-256 |
8aa79b5951fcd7f4f425fcfb4d91fe1b31476fc7a5632bd5c902513ff53c9a34
|