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.

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 427), 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.

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

Install the plugin in QGIS

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

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.

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.

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.

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.

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

Can Claude use QGIS?

Yes, in two ways. In a chat it writes PyQGIS code that you run in the QGIS Python console. With a QGIS MCP server installed, Claude Desktop or Claude Code controls QGIS itself: it loads layers, runs Processing algorithms and renders the map. On its own, Claude in a browser tab can't reach the QGIS on your computer.

How do I connect Claude to QGIS with MCP?

Install the QGIS MCP plugin from the QGIS plugin manager, install uv, then register the server: one claude mcp add command in Claude Code, or an entry in claude_desktop_config.json for Claude Desktop, followed by a full restart of the app. Start the server from the plugin's toolbar button in QGIS and ask Claude to call ping.

Is there a Claude plugin for QGIS?

There are community ones. QGIS MCP by Nicolas Karasiak and ClaudIA QGIS are both in the official QGIS plugin repository, and both let Claude drive QGIS from outside. Neither listing names Anthropic as its author. Agent plugins such as AI Agent put the chat inside QGIS with their own model.

Do I need a paid Claude plan to use QGIS MCP?

No. The official guide to local MCP servers in Claude Desktop names no plan, and our QGIS MCP guide reports that the free plan works within its daily limits. The plugin and the server are free and open source.

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