Back to MCP Catalog

QGIS Desktop MCP Server

Location ServicesPython
Control QGIS Desktop GIS software through Claude AI
Available Tools

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

remove_layer

Remove a layer from the project by its ID

zoom_to_layer

Zoom to the extent of a specified layer

get_layer_features

Retrieve features from a vector layer with an optional limit

execute_processing

Execute a processing algorithm with the given parameters

save_project

Save the current project to the given path

render_map

Render the current map view to an image file

execute_code

Execute arbitrary PyQGIS code provided as a string

QGIS MCP connects QGIS Desktop to Claude AI through the Model Context Protocol, enabling AI-assisted GIS operations. This integration allows Claude to directly interact with and control QGIS, providing capabilities for project creation, layer management, processing algorithm execution, and custom Python code execution within the GIS environment.

Overview

QGIS MCP enables Claude AI to interact directly with QGIS Desktop, a powerful open-source Geographic Information System (GIS) software. This integration allows you to perform GIS operations through natural language prompts, including creating projects, managing layers, executing processing algorithms, and running custom Python code.

Installation

Prerequisites

Before installing QGIS MCP, ensure you have:

  • QGIS 3.X installed (tested on version 3.22)
  • Python 3.10 or newer
  • The uv package manager

To install uv:

  • Mac: brew install uv
  • Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  • Other platforms: Follow instructions at the uv website

Installation Steps

  1. Download the repository:

    git clone https://github.com/jjsantos01/qgis_mcp.git
    
  2. Install the QGIS plugin:

    • Locate your QGIS profile plugins folder:
      • Windows: C:\Users\USER\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
      • MacOS: ~/Library/Application\ Support/QGIS/QGIS3/profiles/default/python/plugins
    • Copy the qgis_mcp_plugin folder from the repository to your QGIS plugins folder
    • Restart QGIS
    • Enable the plugin: Go to PluginsInstalling and Managing Plugins, select the All tab, search for "QGIS MCP", and check the box
  3. Configure Claude Desktop:

    • Go to ClaudeSettingsDeveloperEdit Configclaude_desktop_config.json
    • Add the QGIS MCP configuration (see the Installation section below)

Usage

  1. Start the QGIS MCP server:

    • In QGIS, go to PluginsQGIS MCPQGIS MCP
    • Click "Start Server"
  2. Use with Claude:

    • Once the server is running in QGIS, Claude will display available QGIS tools
    • You can now ask Claude to perform GIS operations using natural language

Example Prompts

Here's an example prompt to get started:

You have access to the tools to work with QGIS. Please:
1. Create a new project and save it at: "/path/to/my_project.qgz"
2. Load the vector layer: "/path/to/boundaries.shp" and name it "Boundaries"
3. Load the raster layer: "/path/to/elevation.tif" and name it "Elevation"
4. Zoom to the "Boundaries" layer
5. Execute the centroid algorithm on the "Boundaries" layer and save the output
6. Create a choropleth map using the "Population" field in the "Boundaries" layer
7. Render the map to "/path/to/output_map.png"
8. Save the project

Tips and Best Practices

  • Always start by checking the connection with the ping tool
  • Provide absolute file paths when working with files
  • When using complex processing algorithms, specify all required parameters
  • Use the execute_code tool with caution as it runs arbitrary Python code in QGIS
  • Save your project frequently to avoid losing work

Related MCPs

Google Maps
Location ServicesTypeScript

Access Google Maps API functionality for geocoding, place search, directions, and more

GeoPy Geocoding
Location ServicesPython

Geocoding service for converting addresses to coordinates and vice versa

IP Geolocation
Location ServicesPython

Get detailed geolocation information about IP addresses

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.