GIS + AI

I finally sold out dipped my toe in the water of seeing what was possible with connecting QGIS to an AI agent. For starters (or to show how behind the game I am) I had to learn what any of them are; I ended up going with the one some of my colleagues had talked about, Claude. So I had to make a Claude account, and chose the most basic free tier. I installed Claude, and also this QGISMCP plugin (again among a few choices, check out that blog post about a few things I had to mod to get it working). Once I got it all connected, I got rolling.

Due to having the free tier, it runs out of time/requests available for the day/a certain time period. This was honestly fine for my purposes, as I got used to it and it stopped at a fairly reasonable place for me. For me so far, the biggest advantage of this has been as a super-powered search engine that also gets data flowing. It seems really good at finding datasets and “streaming” it into QGIS, whether via REST, looking for downloads or web scraping content into GeoJSON(👀). Related to web-scraping data, I was looking at a dataset that keeps being updated, so in kind, I was able to ask Claude to add the new record into the dataset it had already scraped and merged with another dataset. Claude scraped and incorporated the new record, commenting that it had fields in common with the scraped dataset but not the other merged dataset, as expected(🤯). Those types of operations have already saved me a nontrivial amount of time, in addition to some basic subsets and projections along the way.

The rest so far, I’d prefer to be hands on about (spatial operations, analyses etc.). Maybe eventually, I’ll learn how to move these processes to be more hands off, but I don’t fully trust the automation, or better yet have not come up with a monitoring/checking process I feel confident in. So, rather than learn how to monitor AI, I’d rather just keep doing these processes myself for now. Also, most importantly for me, given the high environmental cost, I don’t ideologically want to outsource too much of my workflow anyway. I will admit that the functionality to search deep for spatial data sources (and things like exposed endpoints…) outdoes my own searching, as well as the fast requests without downloading (and even web scraping, in some instances). For that, in the interest of efficiently getting data into QGIS, I might have to make a compromise.

QGISMCP

I decided to try my first foray into AI with QGIS on my work computer (i.e. Windows obligate) and trying to recreate a friend’s example I had to do the following things as a complete newbie:

  1. Install Claude (I did the most basic tier etc.)
  2. Install uv
  3. Install the QGIS MCP plugin of my choosing
  4. Then, as in the instructions there, you have to edit claude_desktop_config.json and here was what my entry looked like:
"mcpServers": {
    "qgis": {
      "command": "C:\\Users\\me\\.local\\bin\\uv.exe",
      "args": [
        "--directory",
        "C:\\Users\\me\\Documents\\qgis_mcp\\src\\qgis_mcp",
        "run",
        "--python",
        "3.13",
        "qgis_mcp_server.py"
      ]
   }
}

You can replace the entire file with this and save it, and Claude will just add all the default stuff back in. You need to have the json formatted exactly right, and some headaches I ran into were with the paths (have to remember “\\” instead of “/”) and also specifying a compatible version of python I had already installed on my computer. It doesn’t seem above 13 works with any of this.