home / mcp / gis mcp server

GIS MCP Server

A Model Context Protocol (MCP) server implementation that connects Large Language Models (LLMs) to GIS operations using GIS libraries, enabling AI assistants to perform geospatial operations and transformations.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mahdin75-gis-mcp": {
      "url": "http://localhost:9010/mcp"
    }
  }
}

GIS MCP Server lets you connect large language models to geospatial libraries, enabling AI assistants to perform GIS operations like geometry creation, coordinate transforms, raster processing, and spatial analyses. It supports HTTP/SSE transport for remote access and STDIO transport for local development, making spatial reasoning an integrated part of your AI workflows.

How to use

You connect an MCP-compatible client (such as Claude Desktop or Cursor IDE) to the GIS MCP Server to perform geospatial tasks in your AI conversations. Choose HTTP transport for network deployments or STDIO transport for local development.

In HTTP mode, you send requests to the MCP endpoint at http://host:port/mcp and use the serverโ€™s storage endpoints to upload and download files. In STDIO mode, you start a local process that listens for MCP messages on standard input/output. You can perform operations like calculating distances, transforming coordinates, clipping data, generating buffers, and creating static or interactive maps by issuing tool calls from your assistant.

Practical usage patterns include: setting up a local development session, starting the server in STDIO mode, and then issuing geospatial tool calls from your AI agent. When running remotely, ensure network access to the serverโ€™s HTTP endpoint and use the provided storage endpoints for any file transfers.

How to install

Prerequisites you need before installing the GIS MCP Server: Python 3.10 or higher, an MCP-compatible client, and an internet connection for package installation.

Docker Installation. Build and run the server in an isolated container environment.

1) Build the Docker image using the provided Dockerfile.

docker build -t gis-mcp .

2) Run the container with HTTP transport enabled by default on port 9010.

docker run -p 9010:9010 gis-mcp

Dockerfile.local option lets you install from local source files for development or custom builds.

1) Build the local image.

docker build -f Dockerfile.local -t gis-mcp:local .

2) Run the container in HTTP mode.

docker run -p 9010:9010 gis-mcp:local

pip Installation. Install via Pythonโ€™s package manager and run the server in STDIO or HTTP mode.

1) Install the UV package manager.

pip install uv

2) Create a Python virtual environment (Python 3.10+).

uv venv --python=3.10

3) Activate the environment.

Windows PowerShell: . venv\Scripts\Activate.ps1

Linux/macOS: source .venv/bin/activate

4) Install the GIS MCP package.

uv pip install gis-mcp

Install with visualization features (optional). Adds interactive map support.

uv pip install gis-mcp[visualize]

5) Start the server in STDIO transport mode by default.

gis-mcp

To run in HTTP transport mode, set environment variables and start the server.

export GIS_MCP_TRANSPORT=http
export GIS_MCP_PORT=8080
gis-mcp

If you want to start the server directly using Python for development, you can also run it as a module.

python -m gis_mcp

Client configuration hints. When using Claude Desktop or Cursor IDE, configure the MCP server endpoints to point at the running server. Use the HTTP URL for remote deployments or the STDIO command for local development.

Available content and endpoints

HTTP transport endpoints (example). MCP URL for the HTTP transport is http://host:port/mcp. Storage endpoints allow uploading and downloading files.

Security and notes

Ensure your HTTP endpoint is secured if exposed publicly. When using local development, prefer STDIO transport to avoid network exposure. Manage storage access carefully and use least-privilege permissions for any uploaded data.

Examples and tips

Start in STDIO mode during development with python -m gis_mcp or gis-mcp if installed via pip. Switch to HTTP transport by exporting GIS_MCP_TRANSPORT and GIS_MCP_PORT before launching in production.

Available tools

buffer

Create a buffer around a geometry with configurable distance and resolution.

intersection

Compute the geometric intersection of two geometries.

union

Combine two geometries into their union.

transform_coordinates

Transform coordinates between coordinate reference systems.

get_crs_info

Retrieve detailed CRS information.

read_file_gpd

Read a geospatial file into a GeoDataFrame with a preview.

clip_vector

Clip geometries using a polygon or other geometry.

compute_ndvi

Calculate NDVI from raster data.

download_boundaries

Download GADM boundaries as GeoJSON.

download_climate_data

Download climate data sets such as ERA5.

get_species_info

Retrieve taxonomic information for a species.

download_street_network

Download a street network for a place and save as GraphML.

create_map

Generate a static map from multiple layers with legend and grid options.

create_web_map

Create an interactive web map with layers and controls.

read_file_raster

Read raster data and extract band information or statistics.

clip_raster_with_shapefile

Clip a raster using a vector shapefile.

calculate_geodetic_distance

Compute distance on the ellipsoid between two points.

moran_local

Compute local Moran's I for spatial autocorrelation.

weights_from_shapefile

Create spatial weights from a shapefile.