MCP

Analyze Geospatial Data with GDAL

Provides AI agents with GDAL/Rasterio-powered geospatial analysis, featuring a reflection system for methodological justification and a persistent

Works with gdalrasteriopyprojpyogrio
Jordan Godau
Jordan Godau

90
Spark score
out of 100
Status Verified
Updated yesterday
Version 1.0.0

Add to Favorites

Why it matters

Empower AI agents with advanced geospatial analysis capabilities. This MCP server leverages GDAL and Rasterio to provide a suite of tools for raster and vector data manipulation, including format conversion, reprojection, and statistical analysis.

Outcomes

What it gets done

01

Perform metadata analysis on raster and vector datasets.

02

Convert geospatial data formats, including support for Cloud Optimized GeoTIFFs (COGs).

03

Reproject raster and vector data between different Coordinate Reference Systems (CRS).

04

Conduct spatial subsetting and proximity analysis on vector data.

Install

Add it to your toolbox

Capabilities

Tools your agent gets

Extract
extract
Query a database
query-db
RAG index
rag-index
Audit access
audit-access

Overview

What this is, in full

What it does

An MCP server that provides AI agents with geospatial analysis capabilities using GDAL/Rasterio. Includes a reflection system that requires agents to justify their methodological decisions before executing operations.

Installation

uvx (Recommended)

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

Testing

uv run pytest test/ -v

# With coverage
uv run pytest test/ --cov=src --cov-report=term-missing

Configuration

Claude Desktop

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

Available Tools

Tool Description
raster_info Check metadata (CRS, resolution, bands, nodata)
raster_convert Convert formats with compression and overviews (COG support)
raster_reproject Transform CRS (with reflection)
raster_stats Statistical analysis with histograms
vector_info Check metadata (CRS, geometry, attributes)
vector_reproject Transform CRS (with reflection)
vector_convert Format migration (SHP ↔ GPKG ↔ GeoJSON)
vector_clip Spatial subsetting
vector_buffer Proximity analysis
vector_simplify Geometry simplification
store_justification Cache epistemic reasoning (used internally)

Capabilities

  • Reflection middleware with pre-justification for CRS selection and resampling methods
  • Persistent cache with 75% hit rate in multi-operation workflows
  • Cross-domain cache sharing — CRS justification works for BOTH raster and vector data
  • Comprehensive toolset for raster and vector data
  • Full type safety with mypy strict mode
  • Workspace security with path validation middleware
  • Python-native stack using Rasterio/PyProj/pyogrio
  • Real-time feedback via FastMCP Context API
  • Workspace catalog for autonomous file discovery
  • Intelligent metadata for format determination

Environment Variables

Required

  • GDAL_MCP_WORKSPACES - Path to directory with geospatial data

Usage Examples

Reproject this DEM to Web Mercator for my web map
I need to reproject this DEM to UTM for accurate slope analysis, then reproject this vector layer to the same CRS for overlay

Notes

Built with a reflection system that requires AI agents to justify methodological decisions before execution, creating an audit trail for reproducible geospatial science. Includes 72 passing tests and comprehensive documentation, including Quick Start, Tools Reference, Vision, and Changelog.

Trust

How it checks out

Spark score
90/100
Updated
yesterday
Classification
90% confidence
Verification
Verified

Reviews

What people say after installing

4.0
1 ratings

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.