
How to add QGIS MCP to Cursor
Let Claude control QGIS Desktop — create projects, load layers, run processing algorithms, and execute PyQGIS code. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 994★ · stdio · no auth
Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the QGIS MCP config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of QGIS MCP's tools to confirm it's connected.
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 Cursor
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 + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the QGIS MCP config there under the "mcpServers" key and restart the client.
Is QGIS MCP safe to use with Cursor?
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.