← Back to directory
Q

QGISMCP

Community
Connect Claude AI to QGIS Desktop via the Model Context Protocol.
GitHub source repository ↗
★ 1.1k Stars Category · Other Popular Source revision e37bf6f095e1
30FMRS · D
Reliability
4/20
Security and permissions
3/20
Maintenance
3/20
Documentation
10/20
Setup experience
10/20

A practical server for integrating QGIS with Claude AI via MCP, offering a wide range of tools for GIS automation. However, it requires direct access to QGIS desktop and arbitrary code execution, which poses security risks and is not suitable for novice users or insecure environments.

Read the FMRS scoring method →

QGISMCP connects QGIS to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control QGIS. This integration enables prompt-assisted project creation, layer loading, code execution and more. The project is strongly based on the BlenderMCP project. It consists of two main components: a QGIS plugin (creates a socket server within QGIS to receive and execute commands) and an MCP server (implements the MCP protocol and connects to the plugin).

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.

Setup

Prerequisites: QGIS 3.X (only tested on 3.22), Claude Desktop, Python 3.10 or newer, and the uv package manager. After installing uv, clone the repository, copy the qgis_mcp_plugin folder to your QGIS profile's plugins directory, then enable the QGIS MCP plugin via the QGIS plugin manager. For Claude Desktop, edit claude_desktop_config.json to add the MCP server configuration, specifying the uv command and the absolute path to src/qgis_mcp/qgis_mcp_server.py.

claude_desktop_config.json
{
  "mcpServers": {
    "qgis": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/REPO/FOLDER/qgis_mcp/src/qgis_mcp",
        "run",
        "qgis_mcp_server.py"
      ]
    }
  }
}

Fit and risk

Best for

  • GIS users and developers who want to leverage Claude AI for natural language interaction and automation of QGIS tasks.
  • Those familiar with QGIS and Python who want to streamline their workflows.
  • Users needing to automate complex GIS operations such as loading layers, running processing algorithms, and generating maps.

Not for

  • Users expecting a server that works without a local QGIS installation.
  • Beginners unfamiliar with QGIS and PyQGIS.
  • Users requiring production-grade or enterprise support.
  • Those who need remote or cloud-based GIS capabilities.

Required permissions

  • File system access: load and save projects, read layer files, render maps.
  • Network access: socket communication between the MCP server and the QGIS plugin.
  • Code execution: execute_code allows arbitrary Python code in the QGIS environment, subject to QGIS's permissions.

Risks and side effects

  • Arbitrary code execution poses security risks; malicious prompts could cause data loss or system damage.
  • Potential overwriting of projects or output files, especially when processing large datasets.
  • The communication between the QGIS plugin and MCP server is not encrypted and could be intercepted on a local network.
  • The plugin and server are not officially endorsed by QGIS or Claude; they may have bugs or lack maintenance.

Troubleshooting

  1. Ensure the QGIS plugin is correctly installed and enabled; restart QGIS if necessary.
  2. Ensure the MCP server is started in QGIS (Plugins menu → QGIS MCP → Start Server).
  3. Check the command and path in the Claude Desktop configuration, especially absolute paths.
  4. Ensure uv is installed and in your PATH, or use the full path.
  5. Check firewall or security software that might block local socket communication between QGIS and Python.

Use cases

Prompt-assisted GIS project creation and layer management.
Running spatial analysis processing algorithms.
Executing PyQGIS code through natural language commands.
Rendering maps for visualization.

Supported clients

Claude DesktopFull support