
QGIS MCP
Let Claude control QGIS Desktop — create projects, load layers, run processing algorithms, and execute PyQGIS code.
Add to your client
Copy the config for your MCP client and paste it into its config file.
git clone git@github.com:jjsantos01/qgis_mcp.gitPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"qgis-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/REPO/FOLDER/qgis_mcp/src/qgis_mcp",
"run",
"qgis_mcp_server.py"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- QGIS 3.x (only tested on 3.22)
- Claude Desktop
- Python 3.10 or newer
- uv package manager
- Copy the qgis_mcp_plugin folder into your QGIS profile plugins folder and enable the 'QGIS MCP' plugin
About QGIS MCP
QGIS MCP gives Claude two-way control over the QGIS Desktop GIS application. A QGIS plugin exposes a socket server inside QGIS, and a Python MCP server bridges Claude to it, so you can create and save projects, add or remove vector and raster layers, zoom to layers, inspect features, run Processing Toolbox algorithms, render maps to images, and run arbitrary PyQGIS code — all through natural-language prompts.
Tools & capabilities (15)
pingSimple ping command to check server connectivity.
get_qgis_infoGet QGIS information about the current installation.
load_projectLoad a QGIS project from the specified path.
create_new_projectCreate a new project and save it.
get_project_infoGet current project information.
add_vector_layerAdd a vector layer to the project.
add_raster_layerAdd a raster layer to the project.
get_layersRetrieve all layers in the current project.
remove_layerRemove a layer from the project by its ID.
zoom_to_layerZoom to the extent of a specified layer.
get_layer_featuresRetrieve features from a vector layer with an optional limit.
execute_processingExecute a processing algorithm with the given parameters.
save_projectSave the current project to the given path.
render_mapRender the current map view to an image file.
execute_codeExecute arbitrary PyQGIS code provided as a string. Very powerful — use with caution.
When to use it
- Create a new QGIS project and load vector/raster layers from prompts.
- Run Processing Toolbox algorithms (e.g. centroids, buffers) and save outputs.
- Build thematic maps such as choropleths via PyQGIS code, then render to an image.
- Inspect project structure and layer features conversationally.
Security notes
The execute_code tool runs arbitrary PyQGIS Python code inside QGIS from Claude. This is very powerful but also dangerous — review any code before allowing execution. The QGIS plugin opens a local socket server that must be started manually from the QGIS plugin menu.
QGIS MCP FAQ
Which QGIS versions are supported?
QGIS 3.x. The author notes it has only been tested on QGIS 3.22.
How does Claude connect to QGIS?
You install the QGIS MCP plugin, start its socket server from the QGIS Plugins menu, and configure the MCP server in claude_desktop_config.json. Claude then talks to QGIS through the MCP server.
Is the execute_code tool safe?
It runs arbitrary PyQGIS Python code inside QGIS. It is very powerful but should be used with caution; review code before allowing it to run.
Alternatives to QGIS MCP
Compare all alternatives →Control Blender from Claude and other LLMs for prompt-assisted 3D modeling, scene creation, and asset generation.
Popular community server that feeds Figma layout data to coding agents via a Figma API token.
Generate beautiful, modern UI components from natural-language descriptions inside your IDE.