QGISMCP
Integrate QGIS with Claude AI via Model Context Protocol
Key Features
Use Cases
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
- Two-way communication: Connect Claude AI to QGIS through a socket-based server.
- Project manipulation: Create, load and save projects in QGIS.
- Layer manipulation: Add and remove vector or raster layers to a project.
- Execute processing: Execute processing algorithms (Processing Toolbox).
- Code execution: Run arbitrary Python code in QGIS from Claude. Very powerful, but also be very cautious using this tool.
Components
The system consists of two main components:
- QGIS plugin: A QGIS plugin that creates a socket server within QGIS to receive and execute commands.
- MCP Server: A Python server that implements the Model Context Protocol and connects to the QGIS plugin.
Installation
Prerequisites
- QGIS 3.X (only tested on 3.22)
- Claude desktop
- Python 3.10 or newer
- uv package manager:
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.jsonlook 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
- In QGIS, go to
plugins>QGIS MCP>QGIS MCP - 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 string
Example Commands
This is the example I used for the demo:
You have access to the tools to work with QGIS. You will do the following:
1. Ping to check the connection. If it works, continue with the following steps.
2. Create a new project and save it at: "C:/Users/USER/GitHub/qgis_mcp/data/cdmx.qgz"
3. Load the vector layer: ""C:/Users/USER/GitHub/qgis_mcp/data/cdmx/mgpc_2019.shp" and name it "Colonias".
4. Load the raster layer: "C:/Users/USER/GitHub/qgis_mcp/data/09014.tif" and name it "BJ"
5. Zoom to the "BJ" layer.
6. Execute the centroid algorithm on the "Colonias" layer. Skip the geometry check. Save the output to "colonias_centroids.geojson".
7. Execute code to create a choropleth map using the "POB2010" field in the "Colonias" layer. Use the quantile classification method with 5 classes and the Spectral color ramp.
8. Render the map to "C:/Users/USER/GitHub/qgis_mcp/data/cdmx.png"
9. Save the project.
Star History
Repository Owner
User
Repository Details
Programming Languages
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
OpenAI MCP Server
Bridge between Claude and OpenAI models using the MCP protocol.
OpenAI MCP Server enables direct querying of OpenAI language models from Claude via the Model Context Protocol (MCP). It provides a configurable Python server that exposes OpenAI APIs as MCP endpoints. The server is designed for seamless integration, requiring simple configuration updates and environment variable setup. Automated testing is supported to verify connectivity and response from the OpenAI API.
- ⭐ 77
- MCP
- pierrebrunelle/mcp-server-openai
Lucidity MCP
Intelligent prompt-based code quality analysis for AI coding assistants.
Lucidity MCP is a Model Context Protocol (MCP) server that empowers AI coding assistants to deliver high-quality code through intelligent, prompt-driven analysis. It offers comprehensive detection of code issues across multiple quality dimensions, providing structured and actionable feedback. With language-agnostic capabilities, extensible framework, and flexible transport options, Lucidity MCP seamlessly integrates into developer workflows and AI systems.
- ⭐ 72
- MCP
- hyperb1iss/lucidity-mcp
gqai
Expose GraphQL operations as Model Context Protocol (MCP) tools for AI models.
gqai is a lightweight proxy that converts GraphQL operations into MCP-compatible tools, enabling integration with AI systems such as ChatGPT, Claude, and Cursor. It automatically discovers and exposes GraphQL queries and mutations as callable tools via an MCP server, powered by your existing GraphQL backend. Configuration is managed via standard .graphqlrc.yml and .graphql files, with support for dynamic endpoints and environment variables.
- ⭐ 21
- MCP
- fotoetienne/gqai
GitHub GraphQL MCP Server
A Model Context Protocol server for executing arbitrary GraphQL queries on GitHub's API.
GitHub GraphQL MCP Server is a Model Context Protocol (MCP) server that enables interaction with GitHub's GraphQL API. It allows users to execute any GraphQL queries and mutations against GitHub, supporting variable injection and error handling. The server is designed to integrate with Claude for Desktop, providing tooling for AI environments to access or manipulate GitHub data. Detailed documentation and configuration examples are provided for rapid setup and use.
- ⭐ 9
- MCP
- QuentinCody/github-graphql-mcp-server
Google Workspace MCP Server
A secure MCP server bridging Google Workspace and AI clients.
Google Workspace MCP Server implements the Model Context Protocol to enable secure integration between Google Workspace services—such as Gmail, Calendar, and Drive—and any MCP-compatible AI client. It allows users to read, search, create, update, and delete Google Calendar events, emails, and Drive files directly through an AI agent interface. The tool ensures authentication via Google OAuth and provides a seamless setup process for both server and client sides. This makes it easier for AI-powered workflows to interact with Google Workspace data securely and contextually.
- ⭐ 20
- MCP
- giuseppe-coco/Google-Workspace-MCP-Server
AtomGit MCP Server
AI-powered management and automation of AtomGit repositories via the Model Context Protocol.
AtomGit MCP Server implements the Model Context Protocol to enable AI-driven management and automation of AtomGit open collaboration platform repositories. It offers methods for managing repositories, issues, pull requests, branches, and labels, allowing seamless AI interaction with AtomGit. The server supports integration with platforms like Claude and VSCode, providing a standardized interface for AI to orchestrate complex collaboration workflows. Built with Node.js and easily deployable via npx or from source, it focuses on expanding collaborative capabilities using AI agents.
- ⭐ 7
- MCP
- kaiyuanxiaobing/atomgit-mcp-server
Didn't find tool you were looking for?