Skip to content
AI Agent
QGIS
Guide

Claude for QGIS: 3 Ways to Use It, Compared

Published

Claude can work with QGIS in three ways: it writes PyQGIS code that you paste into the Python console, it drives QGIS itself from Claude Desktop or Claude Code through a QGIS MCP server, or you skip the outside app and use an agent that lives inside QGIS. The first costs nothing to set up, the second gives Claude real control of QGIS but needs four parts running together, and the third is one plugin.

This page puts the three side by side, with what each one installs and where each one breaks. We build a plugin of the third kind, AI Agent, so read the comparison knowing that.

The three routes at a glance

Chat windowQGIS MCPAgent inside QGIS
Where you typeclaude.ai or the Claude appClaude Desktop or Claude CodeA panel docked in QGIS
What you installNothingA QGIS plugin, uv, and a config entryOne plugin
Does it see your project?No, only what you typeThrough tool calls: it asks QGIS for layers, features or a picture of the mapYes, the project description goes with every request
Who runs the stepsYou, in the Python consoleClaude, through the MCP serverThe agent
Which modelClaude, on your planClaude, on your planIncluded with the plugin, not your Claude plan
Best forA script you'll keep and rereadPeople who already work in Claude Code or Claude DesktopA GIS task done in the open project

Route 1: Claude writes PyQGIS, you run it

This is the route everybody starts with. You describe the task in a Claude chat, it answers with PyQGIS, the Python interface to QGIS, and you paste the script into the Python console (Plugins > Python Console). Our PyQGIS guide shows where scripts run if the console is new to you.

QGIS with the Python console open under a map of central Denpasar, Bali. The editor on the right holds a script called school_zones.py that reprojects the schools, draws 100 metre zones around them and picks the buildings inside. The output on the left reads 864 of 7015 buildings are within 100 m of a school, then yes 818, school 19, commercial 15, college 5. The map shows the school zones as blue circles and the selected buildings in orange.
The QGIS Python console, where a script written in a chat gets pasted and run. This one comes from our PyQGIS guide.

It works better than its reputation. For that guide we gave Claude Sonnet six QGIS tasks, and all six scripts ran without an error. When the prompt described the layers, fields and file paths, all six results were right.

What goes wrong

Claude in a chat window doesn't see QGIS. Anthropic's help centre says local MCP servers set up in Claude Desktop "aren't available in Cowork or claude.ai", so on its own the browser tab has no way to reach the QGIS on your computer. It writes from your description, and it guesses whatever you left out.

In the same six-task test, with only the layer names in the prompt, one script of the six ran cleanly and was still wrong: it filled 396 of 936 pixels of an elevation map with a fake height of 0 m. Nothing in the console said so. Our ChatGPT for QGIS test hit the same kind of failure with a different chatbot, a print layout exported with an empty map because the script mixed degrees and metres.

Two habits fix most of it. Give Claude your QGIS version, your layer names, the field names and the project CRS, and check the result on the map and not only in the console. If you are on QGIS 4, say so: both print-layout scripts in our test used Qt names that stop halfway on QGIS 4.

Route 2: Claude drives QGIS through MCP

MCP, the Model Context Protocol, is an open standard that lets an AI app call outside tools. A QGIS MCP server turns QGIS actions into such tools, so Claude Desktop or Claude Code can load a layer, run a Processing algorithm or render the map by itself, with no code for you to paste.

Three projects come up when you search for this, and they are not equal. Here is what each one's own page says today, 11 November 2026:

ProjectWhat its page saysStatus
QGIS MCP by Nicolas KarasiakIn the official plugin repository, QGIS 3.28 to 4.x, 125 tools, works with any MCP clientVersion 0.15.2 of 17 October 2026
jjsantos01/qgis_mcpThe original, built for Claude Desktop, 15 tools, "QGIS 3.X (only tested on 3.22)", plugin folder copied by handLast commit 1 October 2025, no release
ClaudIA QGISDerived from the first one. Connects through the agrônomo10X community site, so it needs a free account there and a tokenVersion 0.4.6 of 31 October 2026, marked experimental

ClaudIA QGIS works differently: its listing has you add a custom MCP connector that points to the community's server, not a local one. Between the other two, the original has the most GitHub stars (1.2k against 429), which is why many tutorials still point to it. The one to install is Nicolas Karasiak's: it is the maintained one, it comes from the plugin manager, and its listing adds up to 78,881 downloads across its versions.

The GitHub page of the repository nkarasiak/qgis-mcp. The description reads Connect QGIS to AI agent through the Model Context Protocol (MCP). The page shows a GPL-2.0 license, 429 stars, 91 forks, 257 commits and a latest release v0.15.2 from last month.
The maintained project on GitHub: release 0.15.2, 429 stars, GPL-2.0. Screenshot of github.com, 11 November 2026.

Setting up QGIS MCP with Claude

These steps follow the README of the maintained project. Its plugin page is clear about the shape of the job: "This plugin is only one half of the setup. You also need the qgis-mcp MCP server, which your MCP client runs to talk to QGIS."

The QGIS MCP page on plugins.qgis.org, plugin ID 4831, with the line Connect QGIS to any LLM through the Model Context Protocol (MCP). The About tab says that any MCP client such as Claude, Codex, Gemini CLI, Cursor or VS Code can then drive QGIS, and that this plugin is only one half of the setup: you also need the qgis-mcp MCP server.
The plugin's own listing says it is half of the setup. Screenshot of plugins.qgis.org, 11 November 2026.
  1. Install the plugin in QGIS

    Plugins > Manage and Install Plugins, search QGIS MCP, then install. It needs QGIS 3.28 or later.

  2. Install uv

    The server is a Python program that Claude starts through uv, a tool that downloads and runs Python programs. Windows and macOS don't include it, and the uv install page has a one-line command for each system.

  3. Tell Claude where the server is

    In Claude Code, run this once in a terminal:

    claude mcp add -s user qgis -- uvx --from https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip qgis-mcp-server
    

    In Claude Desktop, open Settings > Developer > Edit Config and add the server to claude_desktop_config.json:

    {
      "mcpServers": {
        "qgis": {
          "command": "uvx",
          "args": ["--from", "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip", "qgis-mcp-server"]
        }
      }
    }
    

    Then quit Claude Desktop completely and open it again.

  4. Start the server in QGIS

    Click the plugin's toolbar button and start the server. The README calls the button Start Server. In the 0.15.0 build we installed for our QGIS MCP guide, it read Run MCP.

  5. Check the connection

    Ask Claude to call the ping tool. The README says it should return {"pong": true}. In Claude Code, claude mcp list or /mcp shows whether the server is connected.

You don't need a paid plan for this. The official guide to local MCP servers names none, and our QGIS MCP guide reports that Claude's free plan works, within its daily limits. That guide also times the whole setup and four real tasks.

What goes wrong

Four parts have to run together: Claude, uv with the server, the plugin with its server started, and QGIS. When nothing happens, the fault can sit in any of them. These are the ones the README and our own runs point to:

  • The server is off after a QGIS restart. In our runs Claude then only said "Error executing tool ping". Start the server again in QGIS.
  • Something else holds port 9876. The README notes that Blender's MCP add-on uses the same port by default. The port is set in the dropdown next to the plugin's toolbar button.
  • The plugin and the server drift apart. They update separately, and the README warns that a newer server sending a command the older plugin doesn't know returns an error.
  • It runs any Python, with no password by default. The README says it plainly: "By default the socket has no authentication", and any process on the machine that can reach the port can drive QGIS, "including execute_code, which runs arbitrary PyQGIS". On a shared machine, set the QGIS_MCP_TOKEN it documents.
  • It has no data of its own. Claude has to find and download data by writing Python. In our Lyon run that Python froze QGIS for about seven minutes while the download servers failed.

Route 3: an agent inside QGIS

We build one of these, AI Agent, so this section is about our own plugin. An agent inside QGIS is a chat panel docked next to the map. It reads the project (layer names, fields, CRS, extent, selection), runs the QGIS tools itself and checks the result, with no outside app, no uv and no config file. What an AI agent in QGIS is explains the idea.

One thing to be clear about on a page with Claude in the title: with AI Agent, the model comes with the plugin. You don't connect your Claude account or an API key, and you don't choose the model.

It installs from Plugins > Manage and Install Plugins, search AI Agent by TerraLab. On its default setting it stops to ask before a step that deletes or overwrites, and one click undoes a whole message.

What goes wrong

It needs an internet connection and an account. It sends your prompt and a description of the open project to a service hosted in the EU, never your raster or vector files. The free plan is for personal use, teaching and study, and paid work needs Pro.

It is also not always the faster one. In the four timed tasks of our QGIS MCP guide, it answered the Lyon question in 5 min 35 s against 9 min 28 s for Claude Code with QGIS MCP, but on a PDF layout QGIS MCP finished in 2 min 48 s against 5 min 26 s. Neither finished the York flood task in 15 minutes.

QGIS after the QGIS MCP run in Lyon: red points for the schools within 300 m of a tram stop, blue tram lines and grey tram stops on a white background with no basemap. The Layers panel lists schools_within_300m, tram_lines, tram_stops and a hidden schools_all layer.
QGIS MCP with Claude Code on the Lyon question: 9 min 28 s, 87 schools.
QGIS with the AI Agent panel on the right. The map shows the Lyon commune outline, the tram tracks and the schools within 300 m of a stop, labelled by name and coloured as primary schools, colleges and lycées. The agent's answer shows a stats card with 80 schools (52 primary, 14 colleges, 14 lycées) and nearest-stop distances of 14.6 to 297.2 m, then its sources: Métropole de Lyon schools, OpenStreetMap tram stops and tracks, the Lyon boundary and a GTFS extract.
AI Agent on the same question: 5 min 35 s, 80 schools.

Which one should you use?

Use Claude in a chat window when you want code you'll keep: a script to rerun on many files, a Processing script, an expression. Describe your project in the prompt and check the output.

Use QGIS MCP when you already live in Claude Code or Claude Desktop, you're comfortable with a terminal, and you want QGIS as one more tool there. It's free on top of the Claude plan you have, and you keep Claude as the model.

Use an agent inside QGIS, such as AI Agent, when you want the layer or the layout in your project and would rather not maintain a server. Our QGIS MCP alternatives page compares six tools of routes 2 and 3 on setup, model and price, and the QGIS AI hub covers the wider field.

Questions people ask

Do it in QGIS by asking for it

AI Agent carries out the task you describe, in your own QGIS project. Free, no card.

Try AI Agent for free

Keep reading

QGIS with an aerial photo of Angers and the AI Agent panel on the right holding a typed task, with the words +7%, US cartographer jobs, 2025 to 2035.
AI AgentQGISGuide

Will AI Replace GIS Jobs? What It Automates Today

AI now digitizes, scripts and runs whole QGIS tasks. US mapping jobs are still projected to grow to 2035. Here is what changes, task by task, and what to learn.

TerraLabTerraLab
·