nkarasiak/qgis-mcp

Connect QGIS to AI agent through the Model Context Protocol (MCP)

What it solves

This project enables AI agents to directly control and interact with QGIS, the open-source geographic information system. It bridges the gap between LLM-based coding agents and complex GIS workflows, allowing users to automate map rendering, layer management, feature editing, and spatial analysis through natural language prompts.

How it works

The project uses a two-part architecture based on the Model Context Protocol (MCP). A QGIS plugin runs inside the software as a TCP server, while an external MCP server translates agent commands into PyQGIS API calls. This setup allows any MCP-compatible AI agent (like Claude Code, Cursor, or GitHub Copilot) to execute over 125 specific GIS operations, ranging from simple layer toggles to complex processing algorithms.

Who it’s for

It is designed for GIS professionals, data scientists, and developers who use QGIS and want to leverage AI agents to automate repetitive mapping tasks, perform batch spatial processing, or streamline project management.

Highlights

  • Extensive Toolset: Provides 125 tools covering the full QGIS lifecycle, including layer management, feature editing, styling, and layout authoring.
  • Model Agnostic: Compatible with any MCP-compliant client, including Claude Desktop, Cursor, VS Code, and various CLI-based coding agents.
  • Flexible Configuration: Supports both granular and compound tool modes to optimize how the LLM interacts with the QGIS API.
  • Multi-Instance Support: Capable of controlling multiple running QGIS windows simultaneously from a single agent session.
  • Secure Integration: Includes optional token-based authentication for environments where controlling QGIS via local network sockets requires restricted access.

Related

  • Project
  • Project
  • Project
  • Project
  • Project