- Home
- MCP servers
- QGIS MCP Modify1 Server
QGIS MCP Modify1 Server
- python
8
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"syauqi-uqi-qgis_mcp_modify1": {
"command": "uv",
"args": [
"--directory",
"#change this line to your directory#",
"run",
"qgis_mcp_server.py"
]
}
}
}QGISMCP provides a Model Context Protocol bridge that lets Claude AI interact with QGIS through a socket-based MCP server. You can create and load projects, manage layers, run processing, and execute Python code within QGIS from Claude, enabling prompt-driven workflows and automation.
How to use
You will connect Claude to the QGIS MCP server and perform actions through clearly exposed commands. Start by ensuring the MCP server is running inside QGIS, then use Claude to issue commands for project and layer management, processing execution, and code runs. The server is designed for two-way communication, so you can query status, manipulate projects, and visualize results directly from Claude’s interface.
How to install
Prerequisites you need on your machine before starting:
Install UV according to your operating system:
# macOS
brew install uv
# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Configuration and running the MCP server
Place the following MCP configuration into Claude’s desktop integration settings to connect to the local QGIS MCP server. This config starts UV to run the QGIS MCP server script from your chosen directory.
{
"mcpServers": {
"qgis": {
"command": "uv",
"args": [
"--directory",
"#change this line to your directory#",
"run",
"qgis_mcp_server.py"
]
}
}
}
Starting the connection in QGIS
Within QGIS, open the QGIS MCP plugin and start the server to begin listening for commands from Claude.
Tools and commands you can use
The MCP server exposes a set of practical tools to control QGIS from Claude. Each tool corresponds to a specific action you may want to perform on your project.
Troubleshooting and notes
If the connection fails, ensure UV is installed and the directory path in the config is correct. Make sure the QGIS MCP plugin is active and that QGIS can access the script qgis_mcp_server.py. Check for permission issues and verify that the QGIS instance is running when you attempt to start the MCP server.
Example usage workflow
A typical sequence involves starting the server, creating a new project, loading layers, and optionally executing a Python snippet or a Processing Tool to generate results.
Notes on security and best practices
Only run trusted code inside the MCP environment. Limit the scope of arbitrary Python execution to prevent unintended modifications or data loss. Regularly save your QGIS project and back up important data before performing batch operations.
Available tools and endpoints
The MCP integration exposes a set of endpoints for common tasks such as pinging the server, loading and saving projects, managing layers, and executing processing or code. Use these endpoints to automate repetitive tasks and integrate QGIS workflows with Claude.
Available tools
ping
Check server connectivity to ensure the MCP channel is responsive.
get_qgis_info
Retrieve information about the current QGIS installation and environment.
load_project
Load a QGIS project from a specified file path.
create_new_project
Create a new QGIS project and save it to disk.
get_project_info
Obtain details about the currently loaded project.
add_vector_layer
Add a vector layer to the active project.
add_raster_layer
Add a raster layer to the active project.
get_layers
List all layers currently loaded in the project.
remove_layer
Remove a layer by its identifier from the project.
zoom_to_layer
Zoom the map view to the extent of a specified layer.
get_layer_features
Fetch features from a vector layer, with an optional limit.
execute_processing
Run a Processing Toolbox algorithm with given parameters.
save_project
Save the current project to a file path.
render_map
Render the current map view to an image file.
execute_code
Execute arbitrary PyQGIS code within the running QGIS instance.