QGIS

v1.0.0Developer Toolsstable

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 c

qgis-mcpmcpai-integration
Share:
97
Stars
0
Downloads
0
Weekly
0/5

What is QGIS?

QGIS is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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...

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 c

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP server that enables AI assistants to directly control

Use Cases

Control QGIS GIS software with 50+ tools for layer management and map rendering. Perform geospatial tasks through natural language.
nkarasiak

Maintainer

LicenseGPL 2.0
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx qgis-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use QGIS

QGIS MCP enables AI assistants to directly control the QGIS geographic information system through a suite of over 100 tools for layer management, feature editing, map rendering, processing algorithm execution, and project management — all through natural language commands. A QGIS plugin runs a local socket server that receives commands from an MCP server on the AI client side, creating a seamless bridge between conversational AI and professional GIS workflows. Geospatial analysts, urban planners, and data scientists can load shapefiles, run spatial queries, apply symbology, generate map exports, and execute QGIS processing algorithms without manually clicking through the QGIS interface.

Prerequisites

  • QGIS 3.x installed on your system (available free from qgis.org)
  • Python 3.9 or later with uv or uvx package manager for the MCP server side
  • Claude Desktop, Claude Code, Cursor, VS Code, or another MCP-compatible AI client
  • No external API keys required — QGIS MCP runs entirely locally
  • GIS data files (shapefiles, GeoPackages, rasters) you want to analyze
1

Install the QGIS MCP plugin inside QGIS

Open QGIS and go to Plugins > Manage and Install Plugins. Search for 'QGIS MCP' in the All tab and click Install Plugin. Restart QGIS after installation. The plugin adds a dock widget with a 'Start Server' button.

2

Start the QGIS MCP socket server

In QGIS, open the MCP dock widget (usually in the side panel after installation) and click 'Start Server'. The server listens on localhost:9876 by default. The dock widget confirms when the server is running.

3

Configure your AI client's MCP server connection

Add the qgis-mcp-server to your AI client configuration. The MCP server connects to the QGIS socket server on port 9876. Use uvx for zero-installation execution or install from the GitHub zip.

{
  "mcpServers": {
    "qgis": {
      "command": "uvx",
      "args": [
        "--from",
        "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip",
        "qgis-mcp-server"
      ]
    }
  }
}
4

For Claude Code, add via the mcp add command

If you are using Claude Code (the CLI), add the QGIS MCP server with a single command that handles registration automatically.

claude mcp add -s user qgis -- uvx --from https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip qgis-mcp-server
5

Verify the connection with a ping

In your AI client, ask Claude to ping the QGIS connection. A successful pong response confirms the three-way connection (AI client → MCP server → QGIS plugin) is working.

6

(Optional) Switch to granular vs compound tool mode

QGIS MCP supports two tool modes. Granular mode exposes 102 individual tools for fine-grained control. Compound mode provides ~23 higher-level tools that combine multiple operations. Switch modes via the QGIS_MCP_TOOL_MODE environment variable.

{
  "mcpServers": {
    "qgis": {
      "command": "uvx",
      "args": [
        "--from",
        "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip",
        "qgis-mcp-server"
      ],
      "env": {
        "QGIS_MCP_TOOL_MODE": "granular"
      }
    }
  }
}

QGIS Examples

Client configuration

Full Claude Desktop configuration for QGIS MCP in granular mode (102 tools). Replace uvx with the full path if uvx is not on your PATH.

{
  "mcpServers": {
    "qgis": {
      "command": "uvx",
      "args": [
        "--from",
        "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip",
        "qgis-mcp-server"
      ],
      "env": {
        "QGIS_MCP_HOST": "localhost",
        "QGIS_MCP_PORT": "9876",
        "QGIS_MCP_TOOL_MODE": "granular"
      }
    }
  }
}

Prompts to try

These prompts show how to use QGIS MCP for real geospatial analysis and map production tasks.

- "Ping QGIS to verify the connection, then tell me which layers are currently loaded in my project."
- "Load the shapefile at /data/world_countries.gpkg and zoom to the full extent."
- "Filter the countries layer to show only countries where population > 50000000 and render the map."
- "Run the QGIS 'Buffer' processing algorithm on the roads layer with a 500-meter buffer distance."
- "Create a new project, load my vector layers, apply graduated symbology to the population density field, and export a PNG map at 300 DPI."
- "Execute this SQL spatial query on the loaded PostGIS layer: SELECT * FROM parcels WHERE ST_Area(geom) > 10000."
- "Find all layers that contain the word 'elevation' in their name and report their CRS and feature count."

Troubleshooting QGIS

Connection refused — the MCP server cannot reach QGIS on port 9876

Verify the QGIS MCP plugin is installed and the server is started inside QGIS (look for the dock widget and click 'Start Server'). QGIS must be open and running. If you changed the port in QGIS, set QGIS_MCP_PORT to match in your MCP client environment variables.

uvx command not found when starting the MCP server

Install uv which includes uvx: 'curl -LsSf https://astral.sh/uv/install.sh | sh' on macOS/Linux. After installation, reload your shell. Alternatively, install the server manually with 'pip install git+https://github.com/nkarasiak/qgis-mcp.git' and change the command to 'qgis-mcp-server' with empty args.

Processing algorithms fail or return errors about missing parameters

Use the 'list processing algorithms' tool first to get the exact algorithm name and required parameters. QGIS algorithm names are case-sensitive and version-specific (e.g., 'native:buffer' not 'Buffer'). The QGIS MCP server provides a tool to retrieve algorithm help text with the exact parameter names needed.

Frequently Asked Questions about QGIS

What is QGIS?

QGIS is a Model Context Protocol (MCP) server that 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 c It connects AI assistants to external tools and data sources through a standardized interface.

How do I install QGIS?

Follow the installation instructions on the QGIS GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with QGIS?

QGIS works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is QGIS free to use?

Yes, QGIS is open source and available under the GPL 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "qgis-mcp": { "command": "npx", "args": ["-y", "qgis-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use QGIS?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides