Skip to content
StableGIS & Geospatial

MCP for QGIS — Connect AI Agents to QGIS

Geospatial work fails quietly. CRS mismatches, invalid geometries and wrong field types produce results that look plausible and are wrong — so every operation is validated.

Read-only by default8 typed toolsCheckpointed writes
Technical specification
Host software
QGIS 3.34 LTR, 3.40 and newer
Runtime
Python 3.11+ with the QGIS Python bindings
Transport
stdio (desktop) and streamable HTTP (server deployments)
Install
QGIS plugin + npx dccmcp-qgis
Engines
Processing framework, GDAL/OGR, GRASS, SAGA (when installed)
Platforms
Windows, macOS, Linux
Last reviewed
2026-09-20
Overview

What is MCP for QGIS?

MCP for QGIS is a local MCP server plus a QGIS plugin that connects AI agents to a real QGIS session. Agents discover 8 typed tools — including project.inspect, layer.load, layer.style_apply and crs.reproject — and call them to inspect, create, modify and validate work inside the live application.

Unlike generated QGIS scripts, every call is validated against your current document, classified as read, write or execute, and recorded in an audit log. QGIS stays open, the document stays live, and destructive operations are checkpointed so they can be rolled back.

It works with Claude Code, Codex, Cursor, GitHub Copilot, Claude Desktop, Gemini CLI, Trae, Doubao, Qwen Code, CodeBuddy, Custom MCP clients, Server-side automation over stdio or streamable HTTP.

  • Host software: QGIS 3.34 LTR, 3.40 and newer
  • Runtime: Python 3.11+ with the QGIS Python bindings
  • Transport: stdio (desktop) and streamable HTTP (server deployments)
Why it breaks

What goes wrong when agents drive QGIS without a contract

01

CRS mistakes produce confident nonsense

Reprojecting at the wrong moment, or mixing layers in different coordinate systems, yields measurements that are wrong by orders of magnitude and still render fine.

02

Invalid geometry breaks downstream tools

Self-intersections and sliver polygons propagate through overlay operations until a client delivers a broken dataset.

03

Analysis is not reproducible

When the algorithm, parameters and input versions are not recorded, nobody can re-run last quarter's analysis and get the same answer.

How it works

How MCP for QGIS keeps intent, structure and traceability intact

An MCP server and QGIS plugin that exposes PyQGIS, the processing framework and layout/atlas tooling as typed tools, so agents can analyze and publish geospatial data with full provenance.

CRS-aware by construction

Every geometric tool declares its working CRS, and the server reprojects deterministically rather than assuming layers agree.

Validation before analysis

Geometry validity, field types and topology checks run before overlay operations, with automatic repair reported rather than hidden.

Algorithm provenance

Processing calls record the algorithm ID, parameters, QGIS version and input layer fingerprints, so results can be reproduced exactly.

Publish-ready layouts

Agents update print layouts, map extents, legends and atlas coverage layer settings, then export print-ready PDFs.

Tool reference

MCP for QGIS tools — every tool and its risk class

Agents discover this list at connect time. You decide which entries are auto-approved, which need a human and which are denied in production files.
  • project.inspectProject CRS, layer tree, data sources, styles and layout inventory.read
  • layer.loadLoad vector or raster layers from files, databases or remote services.write
  • layer.style_applyApply categorized, graduated or rule-based symbology from a specification.write
  • crs.reprojectReproject layers or selections with explicit source and target CRS validation.write
  • geometry.validateDetect invalid geometry, report the failure type and optionally repair.write
  • processing.runExecute any registered processing algorithm with typed parameters and provenance capture.execute
  • sql.queryRun read-only SQL against vector layers through the QGIS expression engine.read
  • layout.exportUpdate layouts and atlases, then export PDF, PNG or SVG outputs.execute
Install

Install MCP for QGIS in four steps

Everything runs locally. The server binds to loopback by default and only exposes the tools you approve in QGIS.

Pre-release. These commands describe the interface we are shipping for MCP for QGIS — the packages are not published yet. Get notified when MCP for QGIS launches.

STEP 01

Install the QGIS plugin

Install the DCCMCP plugin from the QGIS Plugin Manager and enable it in the Plugins menu.

STEP 02

Start the server

The server attaches to the running QGIS instance and registers the processing algorithms available in your installation.

npx dccmcp-qgis@latest serve --project inbox.qgz
STEP 03

Register the client

Register the server with Claude Code, Codex, Cursor, OpenClaw or any other MCP client. For shared deployments, use the HTTP transport with token auth.

{
  "mcpServers": {
    "qgis": { "command": "npx", "args": ["dccmcp-qgis", "serve"] }
  }
}
STEP 04

Lock the working CRS

Define the project CRS an agent may write into so analysis cannot silently drift between coordinate systems.

dccmcp policy crs --project EPSG:3857 --allow-read-any

MCP for QGIS works with the agents you already use

  • Claude Code
  • Codex
  • Cursor
  • GitHub Copilot
  • Claude Desktop
  • Gemini CLI
  • Trae
  • Doubao
  • Qwen Code
  • CodeBuddy
  • Custom MCP clients
  • Server-side automation

Any other MCP-compatible client works too — one config entry, stdio by default.

Read the docs
FAQ

Questions teams ask before they install

If something is missing, ask us directly — we answer technical questions with technical answers.
  • Reprojection is its own explicit tool call and the source and target CRS are always reported. Read-only tools never modify the underlying data.

  • Yes. The processing framework is exposed generically, so any algorithm provider installed in your QGIS profile is discoverable by the agent.

  • Layouts and atlases can be updated and exported to PDF, PNG or SVG. Atlas coverage layers, filter expressions and map extents are all scriptable.

  • Every write and execute call is recorded with the project fingerprint, the tool arguments and the resulting outputs, so a project can be diffed across sessions.

  • No. It runs against your local or self-hosted QGIS installation. There is an optional HTTP transport for shared server deployments, which stays inside your infrastructure.

npx dccmcp-blender@latest serve

Put an agent inside your real tools — without putting your pipeline at risk

Install an integration, set a policy, and let your agent inspect, build and validate work in Blender, Maya, Houdini, 3ds Max, Rhino, ZBrush, Photoshop, FreeCAD, QGIS or OpenCV. Free to start, local by default.

macOS · Windows · Linux — no cloud dependency required