Skip to content

MCP server

monitoreo-ugr edited this page Nov 5, 2026 · 1 revision

Versión en español

MCP server: MonitorEO in Claude and other language models

The Model Context Protocol (MCP) lets an AI assistant use external tools. With the MonitorEO MCP server, you ask Claude (or another compatible assistant) in plain language, for example "Has the summer NDVI of Doñana National Park changed in the last 20 years?", and the assistant looks for the area, chooses the variable, starts the computation in Earth Engine (with the shared account of MonitorEO or with yours) and explains the result to you, with the table, the chart and the files.

The functions are the same as those of Python: the assistant does not invent the data, it computes them with MonitorEO. It is advisable to check which tool it called and with which options (the clients show it).

Without Claude or another AI service? The assistant for managers uses this server from a chat in its own window, with an open language model on your computer (Ollama). It shows the results and the maps without interpreting them and gathers them into a report to print or save as PDF.

Installation

Never used Python or a terminal? Follow the step-by-step installation, for Windows and macOS, from the Earth Engine account to the first question to Claude.

  1. Install the MonitorEO Python environment and, to use your Earth Engine account, authenticate (Getting started).

  2. Find the path of the monitoreo command of the environment:

    conda activate monitoreo
    which monitoreo        # macOS and Linux: e.g. /Users/ana/miniforge3/envs/monitoreo/bin/monitoreo
    where monitoreo        # Windows: e.g. C:\Users\ana\miniforge3\envs\monitoreo\Scripts\monitoreo.exe
  3. Add the server to your assistant (below).

Claude Desktop

In Claude Desktop: Settings > Developer > Edit Config, from the menu of the application (macOS: Claude menu; Windows: ☰ menu > File), which opens the folder of claude_desktop_config.json (on macOS, ~/Library/Application Support/Claude/; on Windows, %APPDATA%\Claude\). Add monitoreo inside mcpServers, with your path and your project, without deleting what the file already has (e.g. "preferences"):

{
  "mcpServers": {
    "monitoreo": {
      "command": "/Users/ana/miniforge3/envs/monitoreo/bin/monitoreo",
      "args": ["mcp"],
      "env": {
        "EE_PROJECT": "mi-proyecto-ee",
        "MONITOREO_OUTPUT": "/Users/ana/MonitorEO",
        "PYTHONNOUSERSITE": "1"
      }
    }
  }
}

On Windows, the backslashes of the path are doubled: "C:\\Users\\ana\\miniforge3\\envs\\monitoreo\\Scripts\\monitoreo.exe".

Close Claude Desktop completely (macOS: Cmd+Q; Windows: ☰ > File > Exit, closing the window is not enough) and open it again. MonitorEO appears under the + button of the text box > Connectors.

Claude Code

claude mcp add monitoreo -e EE_PROJECT=mi-proyecto-ee -e PYTHONNOUSERSITE=1 -- /ruta/a/envs/monitoreo/bin/monitoreo mcp

Other clients

Any MCP client that launches local servers (stdio) works, with the monitoreo command, the mcp argument and the environment variables above.

Environment variables

Variable What for
EE_PROJECT Google Cloud project registered in Earth Engine, to compute with your account (the one of earthengine authenticate). Without it, the server computes with the shared account of MonitorEO, which does not export to Google Drive. It can also be given in the conversation ("connect to the project ..."), with the connect tool.
MONITOREO_OUTPUT Folder for the CSV, PNG and GeoTIFF files it generates (default ~/MonitorEO)
MONITOREO_EECU_LIMIT Monthly EECU quota of your project: Community (default, 150 EECU-h), Contributor, Partner or a number of EECU-h (Concepts)
PYTHONNOUSERSITE 1 prevents packages installed with pip install --user from replacing those of the environment

Always the latest version

At start, monitoreo mcp checks whether there is a newer version on GitHub and, if there is, installs it in its environment and starts with it. Without a connection, it starts with the installed one. monitoreo mcp --no-update skips the check. A development copy (pip install -e) is not updated.

Examples

Example requests. In square brackets, the tool the assistant uses and with which options. The data are real MonitorEO results; the wording of the answers will vary with the assistant. The requests can be written in Spanish too.

Finding the area

Which protected areas are called Doñana?

[find_protected_areas, text Doñana] There are several designations with different boundaries: the SAC (WDPA 555588792, 1139 km²), the National Park (389012, 534 km²), the Natural Park (349268, 682 km²), the Ramsar site...

Time series

Give me the monthly MODIS NDVI of 2023 in Doñana National Park, with the chart and the CSV.

[time_series, region {"wdpa_id": 389012}, NDVI, Modis, 2023-01-01 to 2023-12-31, monthly step] The mean NDVI falls from 0.51 in January to 0.28 in July and August, and recovers to 0.48 in December. October has only one valid image. The CSV and the chart are in ~/MonitorEO.

Trends

Has the land surface temperature of Doñana risen between 2005 and 2024?

[trend_table, LST, Modis, 2005-01-01 to 2024-12-31, annual step] The tool returns:

{
 "title": "LST Modis | 2005-01-01 / 2024-12-31 | trends of the annual mean, spatial mean",
 "unit": "[ºC]",
 "scale": 1000.0,
 "csv": "/Users/ana/MonitorEO/trend_LST_Modis_annual_2005-01-01_2024-12-31_20261028-224359.csv",
 "chart": "/Users/ana/MonitorEO/trend_LST_Modis_annual_2005-01-01_2024-12-31_20261028-224359.png",
 "slope_unit": "[ºC] / year",
 "trends": [
  {"region": "Doñana", "key": "all", "label": "year", "n": 20, "tau": 0.063, "z": 0.389, "p_value": 0.697,
   "significant": false, "slope": 0.0252, "intercept": 32.92, "first_year": 2005, "last_year": 2024}
 ]
}

and the assistant summarizes it: the mean daytime land surface temperature rises by about 0.025 ºC per year (0.5 ºC in 20 years), but the trend is not significant (p = 0.70): with that variability between years, it cannot be said that it has risen. It can go on: "And by month?" (monthly step) or "Make me the map of the August trend" (download_trend).

More requests that work well

  • "Compare the NDVI of each month of 2020-2024 with that of 2005-2009 in Sierra Nevada National Park." (compare_series)
  • "Download as GeoTIFF the median Sentinel-2 NDVI of summer 2023 in a 2 km circle around 37.13, -3.42." (download_image)
  • "Statistics of the land surface temperature of July 2023 in the national parks of Sierra Nevada and Doñana." (region_stats, region {"wdpa_id": [389011, 389012]})
  • "Compute the burn severity of the August 2023 fire in Teide National Park with the Sentinel-2 dNBR." (burn_severity)
  • "Export to my Drive the Sentinel-2 NDVI of 2023 of Sierra Nevada Natural Park at 10 m" and then "Has it finished?" (export_image_to_drive, task_status)
  • "Prepare the input variables of a model: NDVI p5 and p95 of Sentinel-2 and annual maximum LST of MODIS from 2021 to 2023 over Sierra Nevada National Park; first tell me how much space they would take." (download_variables, with dry_run)

Tips

  • The more specific the request, the better: variable, sensor, region (better with its WDPA ID), period and step.
  • Long series over large areas take minutes: ask for a monthly or annual step, or for the export to Google Drive.
  • Ask for the CSV to check the data and to use them in other programs.
  • If a value stands out, ask how many valid images and pixels it has (n_images, n_pixels).
  • The per-pixel filters are on by default. For the NDSI ask it not to remove snow, and for the NDWI, not to remove water (see Concepts).
  • Ask "how many EECUs do I have left this month?" to see which part of your computing EECUs you have spent. With the shared account they are your research EECUs (25 EECU-h a month, for research only): if less than 10 % is left, the answers say so, and when they run out you have to switch to your account and your project.

Tools

Tool What it does
about What MonitorEO-OBSNEV is and who funds it
connect Connects to another Earth Engine project
eecu_usage Your EECUs spent this month (with the shared account, your research EECUs; with your account, the quota of your project)
list_variables, describe_variable Variables of the catalog and their details
find_protected_areas WDPA protected areas by name, with their ID
time_series Time series (table, CSV and chart)
map_layer Map: tile URL and preview
region_stats Statistics of a map in each polygon
download_image Map as GeoTIFF on the computer
download_variables Recipe of several variables as GeoTIFF (aligned grids)
trend_table, trend_map, download_trend Seasonal trends: table, tile map and GeoTIFF
compare_series, compare_map, download_comparison Comparison of two periods: table, map and GeoTIFF
burn_severity Burn severity of a fire: dNBR with the USGS classes, hectares per class and GeoTIFF; or the RBR (index: "RBR"), continuous
export_image_to_drive, export_time_series_to_drive, task_status Exports to Google Drive and their status

The options of each tool are those of the Python function of the same name (Python); the regions are JSON objects (Concepts).

Clone this wiki locally