From a prompt to geospatial analysis: NextGIS Toolbox MCP Server

Can we investigate seasonal changes in a lake, find suitable satellite imagery, process it, calculate water surface areas and visualize the results simply by describing the task to an AI agent?

With NextGIS Toolbox MCP Server, we can connect AI agents to a comprehensive geospatial processing infrastructure. In this article, we demonstrate how it works through a real-world remote sensing task.

NextGIS Toolbox: a geoprocessing engine for your workflows

NextGIS Toolbox is an ever-growing collection of over 150 tools for online geospatial data processing, covering a wide range of tasks:

  • Raster and vector data processing;
  • Geospatial data acquisition from external sources;
  • Satellite imagery search and processing;
  • Terrain and hydrological analysis;
  • Geocoding and spatial aggregation;
  • Data conversion and validation;
  • Integration with NextGIS Web and QGIS.

Traditionally, Toolbox tools can be launched through a web interface by filling out a form, or integrated into automated workflows using the API and the NextGIS Toolbox Python SDK.

Two ways to run a Toolbox tool

With the introduction of the Model Context Protocol (MCP) server, there is another way to access these capabilities: directly from your AI client, using natural language.You can now describe the task and let the AI agent organize the whole processing workflow.

Why connect AI to a dedicated geoprocessing engine?

Modern AI agents are already capable of writing and executing Python code, retrieving data from external sources and performing various analytical operations. So why would we need a dedicated geoprocessing service?

Geospatial data processing often requires a rather sophisticated technological environment. Even a relatively simple remote sensing task can involve satellite imagery catalogs, authentication mechanisms, coordinate reference systems, raster alignment, data format conversion and specialized computational libraries… When an AI agent attempts to handle everything independently, it may encounter limitations related to its execution environment, available libraries, memory, network access or execution time. In addition, token consumption could turn out to be enormous.

NextGIS Toolbox addresses many of these challenges by providing:

  • Established geoprocessing algorithms. Operations are performed using dedicated implementations based on technologies such as GDAL, GRASS GIS and QGIS.
  • Ready-to-use data integrations. Satellite imagery, elevation models, OpenStreetMap and biodiversity observations can be retrieved using specialized tools.
  • Server-side processing. Computationally intensive operations are executed on the Toolbox infrastructure rather than within the AI client’s environment.
  • Tool chaining. Intermediate results can be passed directly between processing tools without repeatedly downloading and uploading datasets.
  • Traceable operations. Individual processing tasks and their results are available through the Toolbox interface.
  • Reusable geospatial outputs. The results are actual geospatial datasets in standard formats that can be used in QGIS and other GIS software.

NextGIS Toolbox main page

The AI agent is responsible for understanding the task, selecting appropriate tools, organizing their execution and interpreting the results, and NextGIS Toolbox provides the underlying geoprocessing capabilities.

This combination allows both technologies to focus on what they do best.

Practical example: monitoring seasonal changes in a lake

For our experiment, we selected Laguna de Fuente de Piedra in Andalusia, southern Spain.

It is a shallow saline lake, internationally recognized as a wetland of importance under the Ramsar Convention and particularly well known for its flamingo breeding colonies.

Flamingoes in Fuente de Piedra Lagune, Málaga, Spain (CC BY-SA 2.0)

The lake has a pronounced seasonal hydrological regime. Its water surface expands during wetter periods and contracts considerably during the dry Mediterranean summer, often leaving large areas of exposed lakebed.

These characteristics make it an excellent candidate for satellite-based monitoring: changes are substantial, occur over relatively short periods and can be observed using freely available Sentinel-2 imagery.

Let’s say, we wanted to investigate how the water surface extent changed between February and August 2025.

Starting with a single prompt

Having connected NextGIS Toolbox MCP Server to ChatGPT, we entered the following prompt:

Using NextGIS Toolbox and Sentinel-2 imagery, investigate how the surface water extent of Laguna de Fuente de Piedra, Spain, changed between February and August 2025. Calculate NDWI for suitable cloud-free observations, estimate the water-covered area and produce a time-series chart and a series of maps.

Note, that no coordinates, satellite scene identifiers, geospatial files or processing scripts were provided!

ChatGPT source prompt

Finding and processing satellite imagery

The AI agent started by exploring the available Toolbox tools and their technical documentation. It then organized the following workflow:

Execution plan provided by ChatGPT

1. Identifying the area of interest

Using the Geocode with Nominatim tool, the agent located Laguna de Fuente de Piedra and obtained its geographical bounding box.

2. Finding and downloading satellite imagery

Using the Search & Download Planetary Computer tool, the agent retrieved Sentinel-2 Level-2A imagery for each month of the study period.

To ensure temporal coverage, searches were performed separately for each month, resulting in 14 candidate observations.

The agent identified and downloaded the spectral bands required for the analysis:

  • B03: Green, 10 m resolution;
  • B08: Near-infrared, 10 m resolution;
  • SCL: Scene Classification Layer, 20 m resolution.

Only raster data covering the area of interest was downloaded, rather than entire satellite scenes.

3. Calculating the water index

The agent used the Compute Spectral Index tool to calculate the Normalized Difference Water Index (NDWI):

NDWI = (Green − NIR) / (Green + NIR)

This index exploits differences in the spectral reflectance of water and terrestrial surfaces and is widely used for identifying open water.

4. Estimating water surface area

For each month, the agent selected a suitable observation based on the proportion of usable pixels within the study area.

The Sentinel-2 Scene Classification Layer was used to exclude potentially unreliable pixels, including clouds and cloud shadows.

The agent then applied an NDWI threshold of zero and calculated the area of pixels classified as water.

5. Visualizing the results

Finally, the agent generated a time-series chart, a series of water extent maps and a table containing the calculated statistics.

Behind the scenes, the agent launched several dozen Toolbox tools, passing the results from one to the next.

Results: from spring flooding to summer desiccation

The agentic analysis revealed a pronounced seasonal transformation of the lake.

Observation dateEstimated water surface area
19 February 2025428.58 ha
30 March 20251038.92 ha
27 April 2025973.73 ha
25 May 2025769.99 ha
29 June 20253.81 ha
31 July 20250.06 ha
30 August 20250.35 ha

The maximum water extent among the selected observations was recorded at the end of March, when approximately 10.4 km² was classified as open water.

The water surface gradually contracted during April and May, followed by a particularly dramatic reduction in June. By July and August, almost no open water was detectable using the selected classification method.

Plot generated by ChatGPT during task execution

The spatial distribution of these changes is very clear when comparing the water extent maps for individual months.

Plot generated by ChatGPT during task execution

This experiment represents a preliminary remote sensing assessment rather than a validated hydrological study. The analysis was performed within a geographical bounding box, using a fixed NDWI threshold without independent validation or verification of radiometric offsets. A more detailed investigation could refine the classification methodology and incorporate additional environmental data.

Still, the experiment demonstrates how an AI agent connected to dedicated geoprocessing tools can turn a relatively simple research question into a complete exploratory analytical workflow.

How to connect NextGIS Toolbox to your AI agent

Getting started with NextGIS Toolbox MCP Server is straightforward.

1. Obtain your personal MCP server URL

Visit NextGIS Toolbox, sign in with your NextGIS ID, open any tool and click “🪄 AI” button. Copy your personal MCP server link.

2. Add the MCP server to your AI client

NextGIS Toolbox MCP Server can be connected to compatible AI clients, including ChatGPT, Claude, Claude Code and Cursor.

For example, in ChatGPT:

  • Open Settings → Plugins → Browse plugins;
  • Enable Developer mode;
  • Create a new custom app;
  • Enter a name, such as NextGIS Toolbox;
  • Paste your personal MCP server URL into the connection field;
  • Select No auth as the authentication method and complete the setup.

The access key is already included in your personal MCP server URL.

Detailed configuration instructions for different AI clients are available in the NextGIS documentation. Custom MCP connections may require a compatible subscription plan.

3. Describe your geospatial task

Once the connection is established and enabled, start a conversation and describe the task you would like to solve. You can ask the agent to use NextGIS Toolbox, provide your own data files, specify particular algorithms or let the agent discover the most appropriate tools independently.

A new way to interact with geospatial tools

We see MCP as an additional interface to geospatial processing infrastructure, complementing desktop GIS, web interfaces, APIs and scripting environments.

It does not remove the need for geospatial expertise! Understanding the data, selecting appropriate methodologies and critically evaluating results remain essential parts of any analytical workflow.

What it does change is the amount of manual work required to move from a question to a first meaningful result, and with the growing collection of NextGIS Toolbox tools, the range of possible workflows continues to expand.

Explore NextGIS Toolbox, connect it to your preferred AI client and try solving your own geospatial tasks!

Comments are closed.