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, allowing you to search for datasets and data granules on NASA Earthdata for geospatial research and analysis.
The easiest way to use the Earthdata MCP Server is through Docker. You can either pull the pre-built image or build it yourself.
docker pull datalayer/earthdata-mcp-server:latest
docker build -t datalayer/earthdata-mcp-server .
To use Earthdata MCP Server with Claude Desktop, add the following configuration to your claude_desktop_config.json
file:
{
"mcpServers": {
"earthdata": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"datalayer/earthdata-mcp-server:latest"
]
}
}
}
If you're using Linux, you can start Claude with:
make claude-linux
The Earthdata MCP Server provides two main tools for interacting with NASA Earth Data.
The search_earth_datasets
tool lets you search for datasets on NASA Earthdata.
Parameters:
search_keywords
(str): Keywords to search for in the dataset titlescount
(int): Number of datasets to returntemporal
(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
The search_earth_datagranules
tool lets you search for specific data granules on NASA Earthdata.
Parameters:
short_name
(str): Short name of the datasetcount
(int): Number of data granules to returntemporal
(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
The server includes pre-defined prompts to simplify common queries:
Search for datasets related to sea level rise worldwide.
Parameters:
start_year
(int): Start year to considerend_year
(int): End year to considerUse this prompt to ask about the format of the datasets.
Here's a simple example of how you might use the tools in a Claude session:
I need to find NASA datasets related to sea level rise between 2010 and 2023
Please search for data granules from the SEA_SURFACE_HEIGHT_ALT dataset with a count of 5
What formats are available for the datasets you found?
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "earthdata" '{"command":"docker","args":["run","-i","--rm","datalayer/earthdata-mcp-server:latest"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"earthdata": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"datalayer/earthdata-mcp-server:latest"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"earthdata": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"datalayer/earthdata-mcp-server:latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect