gdal
Model Context Protocol server that packages GDAL-style geospatial workflows through Python-native libraries (Rasterio, GeoPandas, PyProj, etc.) to give AI agents catalog discovery, metadata intelligence, and raster/vector processing with built-in reasoning guidance and reference resources.
claude mcp add --transport stdio jordangunn-gdal-mcp uvx --from gdal-mcp gdal --transport stdio \ --env GDAL_MCP_WORKSPACES="/path/to/your/geospatial/data"
How to use
GDAL MCP provides geospatial analysis capabilities with an emphasis on methodological reflection. The server exposes a suite of raster and vector tools (such as raster_info, raster_reproject, vector_info, vector_reproject, and more) along with a reflection middleware that requires the AI to justify its choices before executing operations. This creates an auditable, domain-spanning reasoning trail that improves reproducibility and transparency for geospatial workflows. When you issue a request, the system can consult cached justifications to speed up repeated steps across raster and vector domains, while ensuring that choices like CRS, resampling methods, and data formats are explicitly reasoned about and stored for future reuse. Tools are organized into Raster Operations, Vector Operations, and a dedicated Reflection System for caching and advisory prompts, enabling multi-step workflows with cross-domain coherence.
Typical use cases include: inspecting metadata, reprojecting datasets to common coordinate reference systems, performing format conversions with proper overviews, clipping or buffering vectors, and conducting quality assessments alongside justification storage. The reflection middleware will prompt and persist justification in a structured format (intent, alternatives, tradeoffs, confidence) before any potentially impactful operation, then proceed with the analysis while providing an auditable trail for review.
How to install
Prerequisites
- Python 3.11 or newer
- A working GDAL installation (for raster operations)
- uvx package (Python-based MCP client)
- Access to geospatial data workspace(s) you want to analyze
- Install uvx from PyPI
- Ensure Python and pip are installed on your system.
python -m pip install --upgrade pip
pip install uvx
- Install and configure the GDAL MCP server package
- The server is typically run via uvx from PyPI using the provided server name (gdal-mcp).
# Optional: install gdal-mcp package if available on PyPI or your internal index
# This step may vary depending on distribution; using uvx from the server name
- Prepare workspace and environment
- Ensure your GDAL datasets are accessible and set the workspace path via the GDAL_MCP_WORKSPACES environment variable (as shown in the example config).
export GDAL_MCP_WORKSPACES=/path/to/your/geospatial/data
- Run the MCP client against the GDAL MCP server
- This example uses uvx to load the server configuration and start the transport via stdio.
uvx --from gdal-mcp gdal --transport stdio
- Optional: Claude Desktop integration (example from documentation)
- Add the MCP server configuration to Claude's MCP config with the appropriate command, args, and environment.
{
"mcpServers": {
"gdal-mcp": {
"command": "uvx",
"args": ["--from", "gdal-mcp", "gdal", "--transport", "stdio"],
"env": {
"GDAL_MCP_WORKSPACES": "/path/to/your/geospatial/data"
}
}
}
}
Notes
- If you prefer Docker or local development, refer to QUICKSTART.md in the repository for alternative installation paths and setup instructions.
Additional notes
Tips and common issues:
- Ensure GDAL and Python bindings are correctly installed and accessible in your environment for raster tools.
- The reflection middleware relies on structured justifications; if you don’t see a justification, verify that the environment supports the memoization/cache layer.
- Configure GDAL_MCP_WORKSPACES to point to valid geospatial datasets; empty or inaccessible paths will cause tool calls to fail.
- When reusing a justification across raster and vector domains, the system leverages cross-domain cache sharing for efficiency; ensure consistent CRS naming and project settings to maximize cache hits.
- If you encounter transport issues, confirm that the uvx command and the from-parameter align with the installed server package naming conventions.
- Review Tools Reference (TOOLS.md) for exact tool capabilities, parameters, and expected input formats.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
ReActMCP
ReActMCP is a reactive MCP client that empowers AI assistants to instantly respond with real-time, Markdown-formatted web search insights powered by the Exa API.
Gitingest
mcp server for gitingest
teslamate
A Model Context Protocol (MCP) server that provides access to your TeslaMate database, allowing AI assistants to query Tesla vehicle data and analytics.
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian