QGIS MCP
Control a running QGIS session (or run QGIS headlessly) to inspect, edit, and export GIS projects and layers.
Check status:
qgis_statusverifies the plugin connection and returns QGIS version/project.Run arbitrary PyQGIS:
run_pyqgisexecutes code (withiface,project,QgsProject,qgis) and returns output orresult.Inspect layers:
list_layers(id, name, type, CRS, extent, visibility) andlayer_info(fields, feature count, geometry, raster size).Manage layers:
add_layer(vector/raster from file or URI) andremove_layerby id or name.Export maps:
export_maprenders to PNG/JPG with custom size and extent.Manage projects:
project_info,save_project(to a path or current file),load_project(.qgz/.qgs).Headless operation:
headless_commandruns any command without the GUI (optionally loading a project and saving changes),headless_algorithmruns Processing algorithms likenative:buffer, andheadless_list_algorithmslists/filters available algorithms.
Allows automating QGIS through a plugin or headless QGIS Python process, providing tools to run PyQGIS code, list and inspect layers, add or remove layers, export maps, manage projects, and execute Processing algorithms such as native:buffer.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@QGIS MCP add C:/data/roads.shp to the map and export it as a PNG"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
QGIS MCP — GIS GEORGIA
KA · English below
ქართულად
Claude Code (ან სხვა MCP კლიენტი) მართავს QGIS-ს ავტომატურად. პროექტი ორი ნაწილისგან შედგება:
QGIS ფლაგინი (
plugin/qgis_mcp_ge) — პატარა GUI პანელი ღილაკებით. QGIS-ის შიგნით უშვებს ლოკალურ სერვისს, რომელიც ასრულებს ბრძანებებს ღია სესიაში.MCP სერვერი (
src/qgis_mcp_ge_server) — Claude Code-ს აკავშირებს ფლაგინთან (GUI რეჟიმი) ან მუშაობს headless რეჟიმში (GUI-ს გარეშე, ცალკე QGIS Python პროცესით).
Claude Code ──stdio──> MCP სერვერი ──TCP 127.0.0.1 + ტოკენი──> QGIS ფლაგინი (GUI)
└────────── subprocess ──────────> QGIS Python (headless)ინსტრუმენტები (ეტაპი 1)
ინსტრუმენტი | რას აკეთებს |
| კავშირის შემოწმება, QGIS-ის ვერსია |
| PyQGIS კოდის შესრულება ( |
| ფენების სია / ფენის დეტალები (ველები, ობიექტების რაოდენობა) |
| ფენის დამატება / წაშლა |
| რუკის ექსპორტი სურათად |
| პროექტის ინფო, შენახვა, ჩატვირთვა |
| იგივე ბრძანებები GUI-ს გარეშე ( |
| Processing ალგორითმები ( |
უსაფრთხოება
სერვისი უსმენს მხოლოდ
127.0.0.1-ს; გარედან მიუწვდომელია.ყოველი მოთხოვნა საჭიროებს ტოკენს (პანელში გენერირდება, შედარება მუდმივ დროში). ტოკენი იწერება
~/.qgis-mcp-ge/session.json-ში, რომ MCP სერვერმა თავად იპოვოს.run_pyqgisთვითნებური კოდის შესრულებაა — პანელში გამოსართავი ჩექბოქსია. გამოიყენე მხოლოდ სანდო კლიენტთან.
ინსტალაცია
დააკოპირე
plugin/qgis_mcp_geQGIS-ის ფლაგინების საქაღალდეში (ან გაუშვიpython scripts/install_plugin.py) და ჩართე Plugins → Manage ში. QGIS 3.28+ და QGIS 4 მხარდაჭერილია.QGIS-ში გახსენი პანელი QGIS MCP, ენა აირჩიე (ქართული/English), დააჭირე გაშვება.
დააჭირე Claude Code ბრძანების კოპირება და გაუშვი ტერმინალში, ან ხელით:
claude mcp add qgis -- uvx --from git+https://github.com/GIS-GEORGIA/qgis-mcp qgis-mcp-geHeadless რეჟიმისთვის ფლაგინი არ არის საჭირო; თუ QGIS ავტომატურად ვერ მოიძებნა, დააყენე
QGIS_PYTHON(მაგ.C:\Program Files\QGIS 3.44.5\bin\python-qgis.bat) დაQGIS_PROCESS.
მსგავსი პროექტები და MCP სერვერები
ფლაგინის პანელში ღილაკი ინფო ამავე სიას აჩვენებს:
jjsantos01/qgis_mcp · nkarasiak/qgis-mcp · nic01asFr/QgisRemoteMCP
sparkgeo/geo-mcp-servers — გეოსივრცითი MCP სერვერების კატალოგი
განვითარება და ტესტები
# Windows (PowerShell)
& "C:\Program Files\QGIS 3.44.5\bin\python-qgis.bat" tests\smoke_bridge.pyRelated MCP server: QGIS MCP Server
English
Let Claude Code (or any MCP client) drive QGIS. Two parts:
QGIS plugin (
plugin/qgis_mcp_ge) — a small button-driven dock panel that runs a local service inside QGIS and executes commands in the open session.MCP server (
src/qgis_mcp_ge_server) — connects Claude Code to the plugin (GUI mode), or runs headless (no GUI, separate QGIS Python process).
Tools (stage 1)
qgis_status, run_pyqgis, list_layers, layer_info, add_layer, remove_layer, export_map, project_info, save_project, load_project, plus headless: headless_command, headless_algorithm, headless_list_algorithms.
Security
Listens on
127.0.0.1only.Every request needs a token (generated in the panel, constant-time comparison); it is written to
~/.qgis-mcp-ge/session.jsonso the MCP server can find it.run_pyqgisexecutes arbitrary code by design; it can be disabled with a checkbox in the panel. Only use it with clients you trust.
Install
Copy
plugin/qgis_mcp_geinto your QGIS plugins folder (or runpython scripts/install_plugin.py) and enable it. QGIS 3.28+ and QGIS 4 supported.Open the QGIS MCP panel, pick your language, press Start.
Register the MCP server:
claude mcp add qgis -- uvx --from git+https://github.com/GIS-GEORGIA/qgis-mcp qgis-mcp-geHeadless mode does not need the plugin; set
QGIS_PYTHON/QGIS_PROCESSif auto-detection fails.
Related projects and MCP servers
The plugin panel has an Info button showing the same list:
jjsantos01/qgis_mcp, nkarasiak/qgis-mcp, nic01asFr/QgisRemoteMCP
sparkgeo/geo-mcp-servers — catalog of geospatial MCP servers
Roadmap
Async long-running jobs, layer styling helpers, print layouts, recipes — ideas from the projects listed above. This codebase is written from scratch.
License
MIT — see LICENSE.
Available Tools
13 toolsadd_layerC
Add a layer from a file/URI. type: 'vector' or 'raster'. provider defaults to ogr/gdal. / ფენის დამატება.
Inputs: path (required), name, type, provider.
export_mapB
Render the map to an image (png/jpg). extent=[xmin,ymin,xmax,ymax] in project CRS; default = canvas. / რუკის ექსპორტი.
Inputs: path (required), width, extent, height.
headless_algorithmC
Run a QGIS Processing algorithm (e.g. 'native:buffer') headlessly with a parameters dict. / Processing ალგორითმი.
Inputs: algorithm (required), parameters (required).
headless_commandB
Run any command (list_layers, layer_info, add_layer, export_map, run_pyqgis, ...) WITHOUT the QGIS GUI.
Pass project to load a .qgz first; save=True writes changes back. / ბრძანება GUI-ს გარეშე.
Inputs: command (required), save, params, project.
headless_list_algorithmsC
List Processing algorithms via qgis_process, optionally filtered by text. / ალგორითმების სია.
Inputs: limit, filter.
layer_infoB
Details of one layer by id or name: fields, feature count, geometry, raster size. / ფენის ინფო.
Inputs: layer (required).
list_layersB
List layers of the open project (id, name, type, crs, extent, visibility). / ფენების სია.
Inputs: no named parameters.
load_projectC
Open a .qgz/.qgs project. / პროექტის ჩატვირთვა.
Inputs: path (required).
project_infoB
Current project file, title, CRS, layer count. / პროექტის ინფო.
Inputs: no named parameters.
qgis_statusB
Check the connection to the QGIS plugin, return QGIS version and project. / კავშირის შემოწმება.
Inputs: no named parameters.
remove_layerC
Remove a layer by id or name. / ფენის წაშლა პროექტიდან.
Inputs: layer (required).
run_pyqgisB
Execute PyQGIS code inside the running QGIS session. Variables: iface, project, QgsProject, qgis.
Print output is returned; assign to result to return a value. / PyQGIS კოდის შესრულება QGIS-ში.
Inputs: code (required).
save_projectB
Save the project (to path if given, else its current file). / პროექტის შენახვა.
Inputs: path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Several capabilities are duplicated across GUI and headless modes: headless_command can invoke list_layers, layer_info, add_layer, export_map, and run_pyqgis, so an agent must decide between equivalent entry points. qgis_status and project_info also overlap in project details. The descriptions do explain GUI vs. headless context, but the boundaries remain somewhat loose.
Most names use snake_case, and the headless_* family is consistent. However the set mixes verb_noun (list_layers, add_layer, export_map) with noun_phrase (qgis_status, layer_info, project_info) and a proper-noun verb (run_pyqgis), so the pattern is readable but not uniform.
13 tools is reasonable for a QGIS bridge covering project, layer, export, scripting, and headless-processing workflows. The only redundancy is the meta headless_command, but it does not push the count into bloat.
Core workflows are covered: project load/save/info/status, layer add/remove/list/info, map export, PyQGIS, and headless Processing algorithms. Explicit layer update, project creation, and styling operations are absent, but run_pyqgis/headless_command provide escape hatches for many gaps.
Maintenance
Related MCP Connectors
QuLab MCP remote server (Streamable HTTP) for computational science and lab tools.
Remote MCP for Dutch KLIC-melding utility data, maps, and dig-safe workflows.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceEnables interaction with QGIS (Quantum GIS) through an MCP plugin and server, allowing natural language commands to control QGIS.4100-
- FlicenseNot gradedqualityCmaintenanceLets MCP clients inspect and manipulate the project open in the desktop application, including layers, geoprocessing, styles, and map/layout exports, all through tools that run inside the live QGIS session.-
- AlicenseNot gradedqualityBmaintenanceConnects QGIS to any MCP-speaking AI agent, exposing 125 tools that let the agent manage layers, edit features, run processing algorithms, render and style maps, author layouts and atlases, query across layers with SQL, and administer the QGIS session. Works with any MCP client and QGIS 3.28–4.x.GPL 2.0
- AlicenseNot gradedqualityCmaintenanceEnables clients to create, query and edit QGIS projects and vector data in an isolated, new headless PyQGIS process, exporting GeoJSON/GeoPackage, saving and reopening editable QGZ bundles, and rendering PNG maps through typed MCP tools. All operations are workspace-relative with strict path and geometry validation, and never attach to or modify a running QGIS desktop session.MIT