GDAL MCP

v1.0.0Data Science & MLstable

An MCP server providing geospatial analysis tools for raster and vector data, integrated with a reflection system that requires AI agents to justify their methodological decisions. It enables accurate mapping and spatial operations by ensuring reason

earth-observationgdalgeospatialgismcp
Share:
72
Stars
0
Downloads
0
Weekly
0/5

What is GDAL MCP?

GDAL MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server providing geospatial analysis tools for raster and vector data, integrated with a reflection system that requires ai agents to justify their methodological decisions. it enables accurate ma...

An MCP server providing geospatial analysis tools for raster and vector data, integrated with a reflection system that requires AI agents to justify their methodological decisions. It enables accurate mapping and spatial operations by ensuring reason

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP server providing geospatial analysis tools for raster

Use Cases

Perform geospatial analysis on raster and vector data.
Ensure methodological transparency in spatial operations via reflection system.
JordanGunn

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gdal-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use GDAL MCP

GDAL MCP is a Python-based MCP server that exposes the full power of GDAL and OGR as AI-callable tools for raster and vector geospatial analysis, including reprojection, clipping, buffering, simplification, format conversion, and spatial querying. It includes a built-in reflection middleware that requires the AI agent to provide a structured justification for key methodological decisions — such as coordinate reference system choice or resampling method — before executing operations, preventing silent errors in spatial workflows. GIS analysts, remote sensing engineers, and data scientists use it to process satellite imagery, shapefiles, GeoTIFFs, and other geospatial formats through conversational prompts.

Prerequisites

  • Python 3.10 or later with pip or uv package manager installed
  • GDAL system libraries installed (e.g. `brew install gdal` on macOS or `apt install gdal-bin` on Ubuntu)
  • uvx available (install with `pip install uv`) for the recommended install method
  • Geospatial data files accessible from the server's working directory
  • An MCP client such as Claude Desktop
1

Install GDAL system libraries

GDAL MCP depends on system-level GDAL binaries and Python bindings. Install them before running the server.

# macOS:
brew install gdal

# Ubuntu/Debian:
sudo apt update && sudo apt install -y gdal-bin python3-gdal
2

Install uv for running the server

The recommended way to run gdal-mcp is via uvx, which handles the Python virtual environment automatically.

pip install uv
3

Test the server locally

Run the server once from the command line to confirm GDAL bindings and the gdal-mcp package are working correctly.

uvx --from gdal-mcp gdal --transport stdio
4

Configure Claude Desktop

Add gdal-mcp to your claude_desktop_config.json. Set GDAL_MCP_WORKSPACES to the directory containing your geospatial data files to restrict file access to safe paths.

{
  "mcpServers": {
    "gdal-mcp": {
      "command": "uvx",
      "args": ["--from", "gdal-mcp", "gdal", "--transport", "stdio"],
      "env": {
        "GDAL_MCP_WORKSPACES": "/path/to/your/geospatial/data"
      }
    }
  }
}
5

Restart Claude Desktop and load a geospatial file

After restarting, ask the assistant to inspect a raster or vector file in your workspace directory. The server will describe its CRS, bands, extent, and format.

GDAL MCP Examples

Client configuration

Connect Claude Desktop to gdal-mcp using uvx, restricting workspace access to a specific data directory.

{
  "mcpServers": {
    "gdal-mcp": {
      "command": "uvx",
      "args": ["--from", "gdal-mcp", "gdal", "--transport", "stdio"],
      "env": {
        "GDAL_MCP_WORKSPACES": "/Users/me/geodata",
        "RASTER": "true",
        "VECTOR": "true"
      }
    }
  }
}

Prompts to try

Geospatial analysis prompts to use once connected with data files in your workspace directory.

- "Inspect the file landsat_scene.tif and tell me its coordinate reference system, resolution, and band count"
- "Reproject roads.shp from EPSG:4326 to EPSG:32633 and save the output as roads_utm.shp"
- "Clip the raster elevation.tif to the bounding box of the polygon in study_area.geojson"
- "Create a 500-meter buffer around all features in rivers.geojson and save as rivers_buffer.geojson"
- "Simplify the polygon boundaries in admin_boundaries.shp with a tolerance of 0.001 degrees"
- "Convert land_use.shp to GeoJSON format"

Troubleshooting GDAL MCP

ImportError: No module named 'osgeo' when starting the server

The GDAL Python bindings are not installed. Run `pip install gdal==$(gdal-config --version)` or install via conda: `conda install -c conda-forge gdal`. The version must match your system GDAL installation.

Server refuses to run a reprojection operation without justification

This is intentional behavior from the reflection middleware. When prompted, provide a brief methodological justification for your CRS choice or resampling method. The server caches your justification so you only need to provide it once per domain.

File not found errors even though the file exists

Check that the file's directory is listed in GDAL_MCP_WORKSPACES. If the variable is set, only files under those paths are accessible. Use a colon-separated list for multiple directories: GDAL_MCP_WORKSPACES=/data/raster:/data/vector

Frequently Asked Questions about GDAL MCP

What is GDAL MCP?

GDAL MCP is a Model Context Protocol (MCP) server that mcp server providing geospatial analysis tools for raster and vector data, integrated with a reflection system that requires ai agents to justify their methodological decisions. it enables accurate mapping and spatial operations by ensuring reason It connects AI assistants to external tools and data sources through a standardized interface.

How do I install GDAL MCP?

Follow the installation instructions on the GDAL MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with GDAL MCP?

GDAL MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is GDAL MCP free to use?

Yes, GDAL MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "gdal-mcp": { "command": "npx", "args": ["-y", "gdal-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use GDAL MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides