QGIS MCP Server
by awheeler262
Quantum GIS (QGIS) MCP
This project explores ways to interact with QGIS using the QGIS MCP Plugin and an MCP Server.
Install QGIS MCP Plugin.
Plugins > Manage and install plugins
Source code at github.com/nkarasiak/qgis-mcp
Set configuration to start MCP server on start-up.
Configure Claude as directed, mostly. Best to add
-s userto the bash command.claude mcp add qgis -s user -- uvx --from https://github.com/nkarasiak/qgis-mcp/archive/refs/tags/v0.11.0.zip qgis-mcp-serverAsk Claude to ping QGIS.
Architecture
The architecture described through key files and classes.
app/main.py
|-- app/domain/claude_mcp/service.py
ClaudeMCP -- Chat loop
|-- app/clients/claude.py
Claude <-------------------Claude API------------------> LLM
|-- app/clients/qgis_mcp.py
QgisMcpClient <-stdio-> subprocess qgis_mcp.server <---> QGIS MCP Plugin ServerTest with:
uv run pytest -vRun with:
uv run python -m app.mainFuture
Consider running the entire application on an AWS EC2.
Easily see use cases with times that exceed maximum Lambda timeout.
Consider FastAPI for REST endpoints.