
How to add QGIS MCP to Claude Desktop
Let Claude control QGIS Desktop — create projects, load layers, run processing algorithms, and execute PyQGIS code. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 · 994★ · stdio · no auth
Claude Desktop config for QGIS MCP
git clone git@github.com:jjsantos01/qgis_mcp.git{
"mcpServers": {
"qgis-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/REPO/FOLDER/qgis_mcp/src/qgis_mcp",
"run",
"qgis_mcp_server.py"
]
}
}
}Setup steps
- 1Open Claude Desktop → Settings → Developer → Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the QGIS MCP config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm QGIS MCP's tools appear under the 🔌 tools menu.
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
What QGIS MCP can do in Claude Desktop
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.
Security
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 + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the QGIS MCP config there under the "mcpServers" key and restart the client.
Is QGIS MCP safe to use with Claude Desktop?
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.
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.