About
QGIS MCP Server connects Claude AI and other LLMs to QGIS Desktop through the Model Context Protocol, enabling AI-assisted geospatial workflows and desktop automation. The integration consists of a socket-based server and a QGIS plugin that together allow natural language control of the GIS environment. Key capabilities include: - Project manipulation: Create, load, and save QGIS projects via AI prompts - Layer management: Add and remove vector and raster layers to projects - Processing toolbox execution: Run QGIS geoprocessing and spatial analysis algorithms - Python code execution: Execute arbitrary Python scripts within the QGIS environment for advanced automation and custom analysis
README
QGISMCP - QGIS Model Context Protocol Integration
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.
This project is strongly based on the BlenderMCP project by Siddharth Ahuja
Features
Components
The system consists of two main components:
1. QGIS plugin: A QGIS plugin that creates a socket server within QGIS to receive and execute commands. 2. MCP Server: A Python server that implements the Model Context Protocol and connects to the QGIS plugin.
Installation
Prerequisites
If you're on Mac, please install uv as
brew install uv
On Windows Powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Otherwise installation instructions are on their website: Install uv
⚠️ Do not proceed before installing UV
Download code
Download this repo to your computer. You can clone it with:
git clone git@github.com:jjsantos01/qgis_mcp.git
QGIS plugin
You need to copy the folder qgis_mcp_plugin and its content on your QGIS profile plugins folder.
You can get your profile folder in QGIS going to menu Settings -> User profiles -> Open active profile folder Then, go to Python/plugins and paste the folder qgis_mcp_plugin.
> On a Windows machine the plugins folder is usually located at: C:\Users\USER\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
and on MacOS: ~/Library/Application\ Support/QGIS/QGIS3/profiles/default/python/plugins
Then close QGIS and open it again. Go to the menu option Plugins > Installing and Managing Plugins, select the All tab and search for "QGIS MCP", then mark the QGIS MCP checkbox.
Claude for Desktop Integration
Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following:
> If you can't find the "Developers tab" or the claude_desktop_config.json look at this documentation.
{
"mcpServers": {
"qgis": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/REPO/FOLDER/qgis_mcp/src/qgis_mcp",
"run",
"qgis_mcp_server.py"
]
} }
}
Usage
Starting the Connection
1. In QGIS, go to plugins > QGIS MCP > QGIS MCP
2. Click "Start Server"
Using with Claude
Once the config file has been set on Claude, and the server is running on QGIS, you will see a hammer icon with tools for the QGIS MCP.
#### Tools
ping - Simple ping command to check server connectivityget_qgis_info - Get QGIS information about the current installationload_project - Load a QGIS project from the specified pathcreate_new_project - Create a new project and save itget_project_info - Get current project informationadd_vector_layer - Add a vector layer to the projectadd_raster_layer - Add a raster layer to the projectget_layers - Retrieve all layers in the current projectremove_layer - Remove a layer from the project by its IDzoom_to_layer - Zoom to the extent of a specified layerget_layer_features - Retrieve features from a vector layer with an optional limitexecute_processing - Execute a processing algorithm with the given parameterssave_project - Save the current project to the given pathrender_map - Render the current map view to an image fileexecute_code - Execute arbitrary PyQGIS code provided as a stringExample Commands
This is the example I used for the demo:
```plain You
Related MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Linkup
LinkupPlatform
Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages
Math-MCP
EthanHenrickson
Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support