Skip to main content
Glama

QGIS MCP Server

An MCP (Model Context Protocol) server that exposes QGIS capabilities to AI agents. Supports both headless mode (stdio) and live QGIS desktop integration (SSE).

Features

  • 23 tools covering project management, layer inspection, spatial queries, styling, and map export

  • Headless mode — standalone process using qgis_process-style QGIS session

  • Desktop mode — live connection to a running QGIS instance via SSE/HTTP

  • Zero-friction setup — uses system QGIS Python bindings, no extra dependencies

Related MCP server: QGISMCP

Tools

Category

Tools

Project

get_project_info, load_project, save_project

Layers

list_layers, get_layer_info, get_layer_features, add_layer, export_layer

Selection

select_features, extract_selected, count_features

Attributes

get_layer_statistics, get_unique_values, run_expression

Styling

set_graduated_renderer, set_layer_labels

Layout

create_layout, export_layout, list_layouts, get_layout_info

Render

render_map

Processing

list_algorithms, run_processing

CRS

get_crs_info, set_layer_crs, reproject_layer, set_project_crs

Quick Start

# Install
pip install -e .

# Run headless
qgis-mcp

# Or use with opencode — add to .config/opencode/opencode.jsonc:
{
  "mcp": {
    "qgis": {
      "type": "local",
      "command": ["qgis-mcp"]
    }
  }
}

Desktop Plugin

Install the QGIS plugin from src/qgis_mcp_plugin/ to connect to a live QGIS session:

ln -s $(pwd)/src/qgis_mcp_plugin ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/

Then enable qgis_mcp_plugin in QGIS's Plugin Manager and add to your opencode config:

{
  "mcp": {
    "qgis-desktop": {
      "type": "remote",
      "url": "http://127.0.0.1:9876/sse"
    }
  }
}

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    A
    maintenance
    An MCP server that enables AI assistants to directly control QGIS for tasks like layer management, feature editing, and map rendering. It provides a suite of 50 tools to execute processing algorithms and manage GIS projects through natural language commands.
    118
    297
    GPL 2.0
  • F
    license
    B
    quality
    D
    maintenance
    QGISMCP connects QGIS to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control QGIS for project creation, layer loading, code execution, and more.
    15
    1
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Connects AI assistants (Claude, Cursor, etc.) to QGIS 4.x via MCP, enabling natural language-driven GIS workflows through 37+ tools, including data loading, processing, and spatial analysis.
    GPL 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Enables Claude Desktop to view and interact with the currently open QGIS project, including layers, styling, selections, Processing algorithms, attribute editing, and geocoding, all running locally.
    10
    GPL 2.0