home / mcp / qgis mcp modify1 server
An update version of qgis_mcp from jjsantos01/qgis_mcp repository
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.
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.
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"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"
]
}
}
}Within QGIS, open the QGIS MCP plugin and start the server to begin listening for commands from Claude.
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.
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.
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.
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.
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.
Check server connectivity to ensure the MCP channel is responsive.
Retrieve information about the current QGIS installation and environment.
Load a QGIS project from a specified file path.
Create a new QGIS project and save it to disk.
Obtain details about the currently loaded project.
Add a vector layer to the active project.
Add a raster layer to the active project.
List all layers currently loaded in the project.
Remove a layer by its identifier from the project.
Zoom the map view to the extent of a specified layer.
Fetch features from a vector layer, with an optional limit.
Run a Processing Toolbox algorithm with given parameters.
Save the current project to a file path.
Render the current map view to an image file.
Execute arbitrary PyQGIS code within the running QGIS instance.