Gdal
FreeNot checkedExposes GDAL/Rasterio operations to AI agents with a reflection middleware that requires structured justification before executing operations whose methodology
About
Exposes GDAL/Rasterio operations to AI agents with a reflection middleware that requires structured justification before executing operations whose methodology matters.
README
MCP server exposing GDAL/Rasterio operations to AI agents, with a reflection middleware that requires structured justification before executing operations whose methodology matters (CRS choice, resampling method, query extent).
CI License: MIT Python 3.11+ FastMCP 2.0 PyPI Downloads
Install
Via uvx (recommended)
uvx --from gdal-mcp gdal --transport stdio
Via Docker
docker build -t gdal-mcp .
docker run -i gdal-mcp gdal --transport stdio
Local development
git clone https://github.com/Wayfinder-Foundry/gdal-mcp.git
cd gdal-mcp
uv sync
uv run gdal --transport stdio
Configure your MCP client
Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/,
Windows: %APPDATA%\Claude\, Linux: ~/.config/Claude/):
{
"mcpServers": {
"gdal-mcp": {
"command": "uvx",
"args": ["--from", "gdal-mcp", "gdal", "--transport", "stdio"],
"env": {
"GDAL_MCP_WORKSPACES": "/path/to/your/geospatial/data"
}
}
}
}
Restart Claude Desktop. The MCP server indicator should appear, and the
raster_* and vector_* tools become available.
Workspace scoping
GDAL_MCP_WORKSPACES is a colon-separated list of directories the server
is allowed to touch. If unset, all paths are allowed and a warning is logged.
Optional tool-surface flags: RASTER=true, VECTOR=true. See
docs/ENVIRONMENT_VARIABLES.md for the full set.
Tools
- Raster:
raster_info,raster_convert,raster_reproject,raster_stats,raster_query - Vector:
vector_info,vector_convert,vector_reproject,vector_clip,vector_buffer,vector_simplify,vector_query - Resources: catalog (
workspace://...), metadata (metadata://...), reference (reference://...), query results (query://result/{id}) - Prompts:
justify_crs_selection,justify_resampling_method,justify_query_extent(and more undersrc/prompts/)
See TOOLS.md for parameters, return shapes, and worked examples.
The reflection middleware
Tools whose methodology matters refuse to execute until the calling agent produces a structured justification. The flow is:
- Agent calls e.g.
raster_reproject(dst_crs="EPSG:3857", resampling="cubic", ...). - Middleware checks
.preflight/justifications/{domain}/for a matching hash. - On miss, the call raises
ToolErrorwith a hint pointing at the relevant prompt (e.g.justify_crs_selection). - Agent calls the prompt, fills out the
Justificationschema (intent, alternatives considered, choice, tradeoffs, confidence), and re-invokes the tool with a__reflectionpayload. - The justification is cached domain-keyed, so a CRS rationale for
EPSG:3857 satisfies both
raster_reprojectandvector_reprojecton subsequent calls.
See docs/REFLECTION.md for the schema and cache layout, and docs/PHILOSOPHY.md for why this exists.
Documentation
- TOOLS.md — tool reference
- docs/ENVIRONMENT_VARIABLES.md — runtime config
- docs/REFLECTION.md — reflection middleware internals
- docs/PHILOSOPHY.md — design philosophy and direction
- docs/ROADMAP.md — release history and direction
- CHANGELOG.md — versioned changelog
- CONTRIBUTING.md — contribution guide
Troubleshooting
Access denied: path outside allowed workspaces — set GDAL_MCP_WORKSPACES
to include the directory in question (see "Workspace scoping").
MCP client doesn't see the server — verify uvx --from gdal-mcp gdal --help
runs on its own, then restart the client after editing its config file.
License
MIT — see LICENSE.
Install Gdal in Claude Desktop, Claude Code & Cursor
unyly install gdal-mcpInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add gdal-mcp -- uvx gdal-mcpFAQ
Is Gdal MCP free?
Yes, Gdal MCP is free — one-click install via Unyly at no cost.
Does Gdal need an API key?
No, Gdal runs without API keys or environment variables.
Is Gdal hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Gdal in Claude Desktop, Claude Code or Cursor?
Open Gdal on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Gdal with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
