GDAL MCP Server: Metadata, Raster & Vector Processing
Enable GDAL-style geospatial workflows with MCP server for AI agent catalog discovery, metadata insights, and raster/vector processing with guided reasoning.
npx -y @Wayfinder-Foundry/gdal-mcpOverview
The GDAL MCP Server implements a Model Context Protocol (MCP) adapter for GDAL-style geospatial workflows. It exposes a catalog of raster and vector data together with metadata extraction and common processing operations as MCP “tools” that LLM-based agents can discover and call. This makes geospatial data accessible to AI agents for catalog discovery, guided reasoning, and automated processing without embedding heavy geospatial logic inside the agent itself.
By wrapping GDAL/OGR operations behind a small HTTP MCP server, the project separates data processing from model reasoning. Agents can query the server to enumerate datasets, inspect metadata (CRS, extent, bands), request summaries or thumbnails for rasters, and ask for vector operations like reprojection, clipping, or attribute summaries. Responses include structured metadata and links to generated artifacts so an agent can chain operations reliably.
Features
- Exposes geospatial datasets and operations as MCP-discoverable tools for AI agents
- Catalog discovery for raster and vector layers (local files, directories, or object storage)
- Metadata extraction: CRS, bounds, resolution, band statistics, feature counts
- Raster processing: overview generation, reprojection, resampling, statistics, quicklook/thumbnail creation
- Vector processing: reproject, clip, dissolve, attribute summaries, GeoJSON export
- Guided reasoning: structured responses that include steps taken and links to outputs
- Lightweight HTTP server with REST endpoints and MCP manifest for discovery
- Docker-friendly and configurable via environment variables
Installation / Configuration
Clone and install the server locally:
# clone repository
# create virtualenv and install
# run the server
Run with Docker:
# build
# run (exposes MCP endpoint on port 8080)
Common environment variables:
- PORT — HTTP port (default: 8080)
- STORAGE_PATH — path to dataset root for catalog discovery
- GDAL_DATA — path to GDAL data files if customization needed
- MAX_UPLOAD_SIZE — maximum upload size for user-provided datasets
Example Docker Compose snippet:
version: '3.8'
services:
gdal-mcp:
image: wayfinder/gdal-mcp:latest
ports:
- "8080:8080"
volumes:
- ./data:/data
environment:
- STORAGE_PATH=/data
- PORT=8080
Available Tools
The server exposes an MCP manifest and multiple REST endpoints. Typical tools/endpoints include:
| Endpoint | Purpose |
|---|---|
| GET /mcp/manifest | MCP manifest for tool discovery |
| GET /catalog | List datasets (rasters and vectors) with basic metadata |
| GET /metadata?path=… | Detailed metadata for a dataset (CRS, bounds, bands) |
| POST /raster/process | Request raster operations (reproject, overview, thumbnail) |
| POST /vector/process | Request vector operations (clip, simplify, summary) |
| GET /artifact/{id} | Download generated artifact (GeoTIFF, GeoJSON, PNG) |
| POST /upload | Upload a dataset into the catalog |
Example: request metadata with curl
|
Python client example (requests):
=
Responses are JSON and include a human-readable explanation plus structured fields (e.g., crs, bounds, bands, statistics) suitable for model consumption.
Use Cases
Catalog discovery for agents: An LLM agent can query the MCP manifest, list available datasets, and choose the appropriate raster or vector file to answer a geospatial question.
- Example: “Which Sentinel-2 tiles cover bounding box X?” The agent calls /catalog and filters by bounds.
Metadata-driven decision making: Before processing, agents can fetch metadata to decide whether reprojection, resampling, or clipping is needed.
- Example: Agent fetches raster metadata and finds mismatched CRS; it requests /raster/process to reproject to a target CRS.
Automated raster analytics: Generate overviews, compute band statistics, and create thumbnails for quick model inspection.
- Example: Create a 512x512 thumbnail for rapid visual grounding in a multimodal agent.
Vector manipulation and summarization: Clip an administrative boundary from a large vector, summarize attribute distributions, or perform spatial joins.
- Example: Clip landcover polygons to a project AOI and return a GeoJSON summary of area by class.
Explainable processing: Each operation returns a step-by-step explanation and artifact links, so agents can narrate processing choices or reproduce results.
For full details and examples, see the project repository: https://github.com/Wayfinder-Foundry/gdal-mcp.
Common Issues & Solutions
The project Wayfinder-Foundry/gdal-mcp is listed on Spark but not yet claimed by the maintainers.
I ran into this too! Claiming the listing on Spark allows you to manage your project’s visibility and gain access to useful features like analytics and badges. This not only enhances your project's credibility but also helps you engage with the community better. To resolve this, simply follow the claim process outlined in the issue. Here's the command you'll need to get started: @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcp