
How to add QGIS MCP to Windsurf
Let Claude control QGIS Desktop — create projects, load layers, run processing algorithms, and execute PyQGIS code. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 994★ · stdio · no auth
Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the QGIS MCP config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5QGIS MCP's tools become available to Cascade.
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 Windsurf
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 + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the QGIS MCP config there under the "mcpServers" key and restart the client.
Is QGIS MCP safe to use with Windsurf?
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.