Skip to main content
Glama

QGIS MCP — GIS GEORGIA

KA · English below

ქართულად

Claude Code (ან სხვა MCP კლიენტი) მართავს QGIS-ს ავტომატურად. პროექტი ორი ნაწილისგან შედგება:

  1. QGIS ფლაგინი (plugin/qgis_mcp_ge) — პატარა GUI პანელი ღილაკებით. QGIS-ის შიგნით უშვებს ლოკალურ სერვისს, რომელიც ასრულებს ბრძანებებს ღია სესიაში.

  2. 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_status

კავშირის შემოწმება, QGIS-ის ვერსია

run_pyqgis

PyQGIS კოდის შესრულება (iface, project; შედეგი → result)

list_layers / layer_info

ფენების სია / ფენის დეტალები (ველები, ობიექტების რაოდენობა)

add_layer / remove_layer

ფენის დამატება / წაშლა

export_map

რუკის ექსპორტი სურათად

project_info / save_project / load_project

პროექტის ინფო, შენახვა, ჩატვირთვა

headless_command

იგივე ბრძანებები GUI-ს გარეშე (project=..., save=true)

headless_algorithm / headless_list_algorithms

Processing ალგორითმები (native:buffer და ა.შ.)

უსაფრთხოება

  • სერვისი უსმენს მხოლოდ 127.0.0.1-ს; გარედან მიუწვდომელია.

  • ყოველი მოთხოვნა საჭიროებს ტოკენს (პანელში გენერირდება, შედარება მუდმივ დროში). ტოკენი იწერება ~/.qgis-mcp-ge/session.json-ში, რომ MCP სერვერმა თავად იპოვოს.

  • run_pyqgis თვითნებური კოდის შესრულებაა — პანელში გამოსართავი ჩექბოქსია. გამოიყენე მხოლოდ სანდო კლიენტთან.

ინსტალაცია

  1. დააკოპირე plugin/qgis_mcp_ge QGIS-ის ფლაგინების საქაღალდეში (ან გაუშვი python scripts/install_plugin.py) და ჩართე Plugins → Manage ში. QGIS 3.28+ და QGIS 4 მხარდაჭერილია.

  2. QGIS-ში გახსენი პანელი QGIS MCP, ენა აირჩიე (ქართული/English), დააჭირე გაშვება.

  3. დააჭირე Claude Code ბრძანების კოპირება და გაუშვი ტერმინალში, ან ხელით:

claude mcp add qgis -- uvx --from git+https://github.com/GIS-GEORGIA/qgis-mcp qgis-mcp-ge
  1. Headless რეჟიმისთვის ფლაგინი არ არის საჭირო; თუ QGIS ავტომატურად ვერ მოიძებნა, დააყენე QGIS_PYTHON (მაგ. C:\Program Files\QGIS 3.44.5\bin\python-qgis.bat) და QGIS_PROCESS.

მსგავსი პროექტები და MCP სერვერები

ფლაგინის პანელში ღილაკი ინფო ამავე სიას აჩვენებს:

განვითარება და ტესტები

# Windows (PowerShell)
& "C:\Program Files\QGIS 3.44.5\bin\python-qgis.bat" tests\smoke_bridge.py

Related MCP server: QGIS MCP Server

English

Let Claude Code (or any MCP client) drive QGIS. Two parts:

  1. 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.

  2. 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.1 only.

  • Every request needs a token (generated in the panel, constant-time comparison); it is written to ~/.qgis-mcp-ge/session.json so the MCP server can find it.

  • run_pyqgis executes arbitrary code by design; it can be disabled with a checkbox in the panel. Only use it with clients you trust.

Install

  1. Copy plugin/qgis_mcp_ge into your QGIS plugins folder (or run python scripts/install_plugin.py) and enable it. QGIS 3.28+ and QGIS 4 supported.

  2. Open the QGIS MCP panel, pick your language, press Start.

  3. Register the MCP server:

claude mcp add qgis -- uvx --from git+https://github.com/GIS-GEORGIA/qgis-mcp qgis-mcp-ge
  1. Headless mode does not need the plugin; set QGIS_PYTHON / QGIS_PROCESS if auto-detection fails.

The plugin panel has an Info button showing the same list:

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 tools
add_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

    B3.1/5.0

    Scored across 13 tools

    Disambiguation3/5

    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.

    Naming Consistency3/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Lets 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.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects 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
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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