MCP Directory

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

  1. 1Open Claude Desktop → Settings → Developer → Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the QGIS MCP config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 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

ping

Simple ping command to check server connectivity.

get_qgis_info

Get QGIS information about the current installation.

load_project

Load a QGIS project from the specified path.

create_new_project

Create a new project and save it.

get_project_info

Get current project information.

add_vector_layer

Add a vector layer to the project.

add_raster_layer

Add a raster layer to the project.

get_layers

Retrieve 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.

View repo Full QGIS MCP page