Skip to main content
Glama

QGIS MCP

Connect QGIS to Claude AI through the Model Context Protocol (MCP), enabling Claude to directly control QGIS — manage layers, edit features, run processing algorithms, render maps, and more.

102 MCP tools covering layer management, feature editing, processing, rendering, styling, layout & atlas authoring, cross-layer SQL, plugin development, and system management. Compatible with QGIS 3.28–4.x. Works with Claude Code, Codex CLI, Gemini CLI, opencode, Claude Desktop, Cursor, VS Code, Windsurf, Zed, and more.

Architecture

Claude ←→ MCP Server (FastMCP) ←→ TCP socket ←→ QGIS Plugin (QTimer) ←→ PyQGIS API
  1. QGIS Plugin (qgis_mcp_plugin/) — Runs inside QGIS. Non-blocking TCP socket server that processes JSON commands within QGIS's event loop.

  2. MCP Server (src/qgis_mcp/server.py) — Runs outside QGIS. Exposes QGIS operations as MCP tools via FastMCP.

Related MCP server: QGISMCP

Installation

No clone needed. Requires QGIS 3.28+ and uv.

1. Install the QGIS plugin

In QGIS: Plugins > Manage and Install Plugins > search QGIS MCP > Install.

Restart QGIS and click Start Server in the QGIS MCP dock widget.

2. Connect your coding agent

claude mcp add -s user qgis -- uvx --from https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip qgis-mcp-server

Scope reference:

Flag

Stored in

Visible to

-s local (default)

.mcp.json (gitignored)

You, this project

-s project

.mcp.json (committed)

Whole team, this project

-s user

~/.claude.json

You, every project

codex mcp add qgis -- uvx --from https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip qgis-mcp-server

Or edit ~/.codex/config.toml directly:

[mcp_servers.qgis]
command = "uvx"
args = ["--from", "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip", "qgis-mcp-server"]

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "qgis": {
      "command": "uvx",
      "args": ["--from", "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip", "qgis-mcp-server"]
    }
  }
}

Add to opencode.json at your project root:

{
  "mcp": {
    "qgis": {
      "type": "local",
      "command": ["uvx", "--from", "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip", "qgis-mcp-server"],
      "enabled": true
    }
  }
}

Add to your client's MCP config file:

{
  "mcpServers": {
    "qgis": {
      "command": "uvx",
      "args": [
        "--from", "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip",
        "qgis-mcp-server"
      ]
    }
  }
}

Usage

  1. Start the plugin — In QGIS, click the MCP toolbar button (or Plugins > QGIS MCP) and click "Start Server"

  2. Talk to Claude — The MCP tools will appear automatically. Ask Claude to work with your QGIS project.

Example prompt

You have access to QGIS tools. Do the following:
1. Ping to check the connection
2. Create a new project and save it at "/tmp/my_project.qgz"
3. Load the vector layer "world_map.gpkg" available in Qgis ("resources/data/world_map.gpkg")
4. Filter "USA" from the field "adm0_a3"
6. Render the map and show me the result
7. Save the project

Updating

The plugin (inside QGIS) and the MCP server (outside QGIS) must stay in sync — a newer server sending a command the older plugin doesn't know will return an error. Run diagnose after any update to verify both sides match.

Component

Remote install

Local install (git clone)

QGIS plugin

Plugins > Manage and Install Plugins > Update

Same — Plugin Manager picks up the new version from QGIS Hub

MCP server

uvx caches the downloaded archive — force an update with uvx --refresh-package qgis-mcp --from https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip qgis-mcp-server, then restart your MCP client

git pull then restart the MCP server process

To auto-update instead, add --refresh-package qgis-mcp before --from in the configs above: uvx then re-resolves this package from GitHub on every launch. Warning: this requires network at launch — the MCP server fails to start when offline — and adds ~1–3s to startup. The plain configs above use the cached version and work offline.

After updating the plugin, click Stop / Start in the QGIS MCP dock widget (or reload via Plugins > QGIS MCP > Reload Plugin) to load the new code without restarting QGIS.

Tools (102)

Category

Tools

Project

load_project, create_new_project, save_project, get_project_info

Layers

get_layers, add_vector_layer, add_raster_layer, remove_layer, find_layer, create_memory_layer, set_layer_visibility, zoom_to_layer, get_layer_extent, set_layer_property

Features

get_layer_features, add_features, update_features, delete_features, select_features, get_selection, clear_selection, get_field_statistics

Styling

set_layer_style (single, categorized, graduated)

Rendering

render_map, get_canvas_screenshot, get_canvas_extent, set_canvas_extent

Processing

execute_processing, list_processing_algorithms, get_algorithm_help, create_processing_model

Layouts

list_layouts, export_layout, create_layout, add_layout_map, add_layout_label, add_layout_legend, add_layout_scalebar, add_layout_picture, add_layout_table, get_layout_info, remove_layout

Atlas

configure_atlas, export_atlas

Query

execute_sql, evaluate_expression, identify_features

Layer tree

get_layer_tree, create_layer_group, move_layer_to_group, duplicate_layer, set_layer_order

Plugins

list_plugins, get_plugin_info, reload_plugin

System

ping, diagnose, get_qgis_info, get_raster_info, get_message_log, execute_code, batch_commands, validate_expression, get_project_variables, set_project_variable, get_setting, set_setting, transform_coordinates

All tools are async with human-readable titles and annotations (readOnly, destructive, idempotent). Destructive tools ask for confirmation via MCP elicitation when supported; clients without elicitation proceed normally (fail-open) since tools are already gated by ToolAnnotations. Long-running tools report progress via MCP logging.

Compound tool mode

Set QGIS_MCP_TOOL_MODE=compound to reduce the granular tools to ~23 grouped tools, cutting schema overhead per LLM turn. Each compound tool takes an action parameter:

QGIS_MCP_TOOL_MODE=compound uv run --no-sync src/qgis_mcp/server.py

Groups: system, project, layer, features, selection, style, canvas, render, processing, code, batch, layer_tree, plugins, variables, settings, expression, transform, message_log, layer_property.

Configuration

Environment variable

Default

Description

QGIS_MCP_HOST

localhost

Host for socket connection

QGIS_MCP_PORT

9876

Port for socket connection

QGIS_MCP_TOKEN

(unset)

Optional shared secret. When set, the plugin rejects any command without a matching token. See Authentication.

QGIS_MCP_TRANSPORT

stdio

MCP transport: stdio or streamable-http

QGIS_MCP_LOG_FILE

~/.local/share/qgis-mcp/server.log

Log file path (empty to disable)

QGIS_MCP_LOG_LEVEL

INFO

File log level

QGIS_MCP_TOOL_MODE

granular

granular (102 tools) or compound (~23 grouped)

Authentication

By default the socket has no authentication — it binds to localhost only, but any process on the machine that can reach the port can drive QGIS (including execute_code, which runs arbitrary PyQGIS). For shared or multi-user machines, set a shared secret so only callers that know it can connect:

  1. Set QGIS_MCP_TOKEN in the environment QGIS runs in (so the plugin enforces it), then Stop/Start the server in the dock. The QGIS log shows Token authentication ENABLED.

  2. Set the same value in the MCP server's environment — add it to the env block of your MCP client config:

    {
      "mcpServers": {
        "qgis": {
          "command": "uvx",
          "args": ["--from", "https://github.com/nkarasiak/qgis-mcp/archive/refs/heads/main.zip", "qgis-mcp-server"],
          "env": { "QGIS_MCP_TOKEN": "your-long-random-secret" }
        }
      }
    }

The token is compared in constant time. When QGIS_MCP_TOKEN is unset (the default), behaviour is unchanged. This raises the bar against other local users/processes; a process running as the same user can still read the token from your config, so it is not a sandbox.

Contributing

git clone https://github.com/nkarasiak/qgis-mcp.git
cd qgis-mcp
python install.py   # symlinks plugin + configures your MCP client

install.py options: --clients claude-desktop,cursor, --remote (uvx instead of uv run), --profile myprofile, --uninstall.

Windows (Microsoft Store / MSIX Claude Desktop): install.py uses --directory instead of cwd in generated configs. This is required for Store-installed Claude Desktop, which runs MCP servers in an MSIX sandbox that silently drops cwd. If you configure manually, use uv --directory "/path/to/qgis-mcp" run --no-sync src/qgis_mcp/server.py — this works on both MSIX and standalone installs. You can identify a Store install when the config file is under %LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude\ instead of %APPDATA%\Claude\.

# Unit tests (no QGIS needed — mocked socket)
uv run --no-sync pytest tests/test_mcp_tools.py -v

# Integration tests (requires QGIS plugin running)
uv run --no-sync pytest tests/test_qgis_live.py -v

License

This project is licensed under the GNU GPL v2 or later.

Available Tools

102 tools
add_bookmarkAdd BookmarkA

Add a spatial bookmark to the project for quick navigation. Provide a name and extent (xmin/ymin/xmax/ymax) with CRS.

Inputs: name (required), xmax (required), xmin (required), ymax (required), +3 more.

add_featuresAdd FeaturesA
Destructive

Add features to a vector layer. Each feature: {attributes: {field: value}, geometry_wkt: 'POINT(1 2)'}. Returns count of added features.

Inputs: features (required), layer_id (required).

add_fieldAdd FieldC

Add a new field to a vector layer. field_type: 'string', 'int', 'double', 'bool', 'date', 'datetime'.

Inputs: layer_id (required), field_name (required), field_type (required), length, +1 more.

add_layout_labelAdd Layout LabelC

Add a text label to a print layout (mm). text may contain [% expression %] for dynamic content. color is hex (e.g. '#000000').

Inputs: text (required), layout_name (required), x, y, +4 more.

add_layout_legendAdd Layout LegendA

Add a legend to a print layout, linked to a map item (defaults to the first map item). Position/size in mm.

Inputs: layout_name (required), x, y, title, +3 more.

add_layout_mapAdd Layout MapB

Add a map item to a print layout at specified position and size (in millimeters).

Inputs: x (required), y (required), width (required), height (required), +1 more.

add_layout_pictureAdd Layout PictureB

Add a picture or SVG (logo, north arrow) to a print layout. path is an image or SVG file path. Position/size in mm.

Inputs: path (required), layout_name (required), x, y, +2 more.

add_layout_scalebarAdd Layout Scale BarC

Add a scale bar to a print layout, linked to a map item. style e.g. 'Single Box', 'Double Box', 'Line Ticks Up', 'Numeric'.

Inputs: layout_name (required), x, y, style, +3 more.

add_layout_tableAdd Layout TableC

Add an attribute table for a vector layer to a print layout. max_rows caps the number of features shown. Position/size in mm.

Inputs: layer_id (required), layout_name (required), x, y, +3 more.

add_map_themeAdd Map ThemeA

Create a map theme from the current layer visibility state. If a theme with this name exists, it will be updated.

Inputs: name (required).

add_raster_layerAdd Raster LayerC

Add a raster layer (GeoTIFF, etc.) to the project.

Inputs: path (required), name, provider.

add_table_joinAdd Table JoinC

Add a table join to a vector layer.

Inputs: join_field (required), target_field (required), join_layer_id (required), target_layer_id (required), +1 more.

add_vector_layerAdd Vector LayerC

Add a vector layer (shapefile, GeoJSON, GeoPackage, etc.) to the project.

Inputs: path (required), name, provider.

add_web_layerAdd Web LayerC

Add a web layer (XYZ, WMS, WFS) to the project. service: 'xyz', 'wms', 'wfs'.

Inputs: url (required), service (required), crs, name.

apply_map_themeApply Map ThemeA
Idempotent

Apply a map theme — restores the layer visibility state saved in the theme.

Inputs: name (required).

apply_style_qmlApply Style QMLC

Apply a QGIS QML style file to a layer.

Inputs: path (required), layer_id (required).

batch_commandsBatch CommandsB

Execute multiple commands in a single round-trip. Each command is {"type": "<command_name>", "params": {...}}. Destructive commands (execute_code, remove_layer, delete_features, set_setting, reload_plugin) are not allowed in batch — use them individually.

Inputs: commands (required).

clear_selectionClear SelectionC
Idempotent

Clear the selection on a layer.

Inputs: layer_id (required).

configure_atlasConfigure AtlasA

Configure a print layout's atlas: coverage_layer (vector layer id) drives one page per feature. Optional page_name_expression, filter_expression, sort_expression.

Inputs: layout_name (required), coverage_layer (required), enabled, sort_expression, +2 more.

create_layer_groupCreate Layer GroupC

Create a new layer group in the layer tree. Optionally specify a parent group name.

Inputs: name (required), parent.

create_layoutCreate LayoutD

Create a new print layout.

Inputs: name (required).

create_memory_layerCreate Memory LayerA

Create a new in-memory vector layer. geometry_type: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon. fields: [{name, type}] where type is integer, double, string, date, datetime.

Inputs: name (required), geometry_type (required), crs, fields.

create_new_projectCreate New ProjectB

Create a new empty QGIS project and save it to the given path.

Inputs: path (required).

create_processing_modelCreate Processing ModelA

Build QGIS Processing Model (.model3) from structured spec; save to user models folder, register in Processing Toolbox. Only call needed: algorithm discovery + param validation run in the plugin against the live registry, so do NOT call list_processing_algorithms or get_algorithm_help first. Pass keyword ('buffer') or full id ('native:buffer'); handler resolves it. Ambiguous hint returns candidate list to refine and retry. Bad param/output names reported with the valid set.

Spec: inputs: [{name, type, description?, default?, optional?, parent_layer? (for field/distance), options? (for enum)}]. Types: vector, feature_source, raster, field, number, integer, distance, string, boolean, extent, crs, point, file, folder, enum, multiple_layers. steps: [{id, algorithm, description?, parameters: {ALG_PARAM: value}}]. algorithm = keyword or full id. Param values: '@input_name' = model input value '$step_id.OUTPUT' = earlier step output '=expression' = QGIS expression at run time else = static literal (number/bool/string/list) outputs: [{name, from_step, from_output, description?}] = exposed outputs; omit to expose the last step OUTPUT as 'Result'.

Name collision appends a suffix (name_2.model3, ...). Response returns the actual 'name', the 'requested_name', and 'resolved_steps' (which algorithm each hint mapped to).

Inputs: name (required), steps (required), group, inputs, +2 more. Returns: object

delete_featuresDelete FeaturesA
Destructive

Delete features by feature IDs or expression filter. Provide either fids (list of ints) or expression (string), not both.

Inputs: layer_id (required), fids, expression.

delete_fieldDelete FieldC
Destructive

Delete a field from a vector layer.

Inputs: layer_id (required), field_name (required).

diagnoseDiagnoseA
Read-only

Run diagnostic checks on the QGIS MCP stack. Reports QGIS version, plugin/server version match, processing providers, connected clients, and project status.

Inputs: no named parameters. Returns: object

duplicate_layerDuplicate LayerC

Duplicate a layer (including its style) under a new name.

Inputs: layer_id (required), new_name.

evaluate_expressionEvaluate ExpressionA
Read-only

Evaluate a standalone QGIS expression to a scalar value (e.g. aggregate('layer','sum','field'), @project_var, now()). Optional layer_id adds layer scope. Distinct from validate_expression (validate only) and field_calculator (per-feature).

Inputs: expression (required), layer_id.

execute_codeExecute CodeA
Destructive

Execute arbitrary PyQGIS code. Use for operations not covered by other tools. Has access to QgsProject, iface, and core QGIS classes. Returns stdout/stderr.

Inputs: code (required).

execute_processingExecute ProcessingB

Execute a QGIS Processing algorithm. Use get_algorithm_help to discover parameters. Layer params accept layer IDs or file paths. Set OUTPUT to 'memory:' for temp layers.

Inputs: algorithm (required), parameters (required).

execute_processing_batchExecute Processing BatchA

Run one algorithm once per parameter dict in 'parameters_list'. Returns a per-run result with index and success/error status. Use for applying the same operation over many inputs in a single round-trip.

Inputs: algorithm (required), parameters_list (required).

execute_sqlExecute SQLB

SQL across loaded layers via a virtual layer; reference layers by name in FROM/JOIN. as_layer=True registers the result as a new layer (set geometry_field for spatial output); else returns rows inline (max 1000). layers limits sources by layer id.

Inputs: query (required), layers, as_layer, uid_field, +2 more.

export_atlasExport AtlasA
Idempotent

Export a configured atlas. format 'pdf' writes a single multi-page file at output_path; image formats ('png','jpg','tif') write one file per feature into the output_path directory. Call configure_atlas first.

Inputs: layout_name (required), output_path (required), dpi, format.

export_layerExport LayerA
Idempotent

Export vector/raster to disk; format from output_path extension (.gpkg, .shp, .geojson, .tif, ...). target_crs (e.g. 'EPSG:4326') reprojects on export. filter_expression (vector only) exports a subset matching a QGIS expression.

Inputs: layer_id (required), output_path (required), target_crs, filter_expression.

export_layoutExport LayoutA
Idempotent

Export a print layout to file. format: 'pdf', 'png', 'jpg', 'svg'. dpi: resolution (default 300).

Inputs: path (required), layout_name (required), dpi, format.

field_calculatorField CalculatorB

Add (if missing) + populate a field from a QGIS expression, per feature, in-place. field_type: string|int|double|bool|date|datetime (default double). Example: expression='$area', field_name='area_m2'. Returns updated feature count.

Inputs: layer_id (required), expression (required), field_name (required), length, +2 more.

find_layerFind LayerA
Read-only

Find layers by name pattern. Supports fnmatch wildcards (e.g. 'roads*') and substring matching.

Inputs: name_pattern (required). Returns: object

get_active_layerGet Active LayerA
Read-only

Get the currently active (selected) layer in the QGIS layer panel.

Inputs: no named parameters. Returns: object

get_algorithm_helpGet Algorithm HelpA
Read-only

Get detailed help for a processing algorithm: parameters (name, type, optional, default), outputs, and description.

Inputs: algorithm_id (required). Returns: object

get_bookmarksGet BookmarksA
Read-only

Get spatial bookmarks from the project. Each bookmark has a name, group, extent (xmin/ymin/xmax/ymax), and CRS.

Inputs: no named parameters. Returns: object

get_canvas_extentGet Canvas ExtentA
Read-only

Get the current map canvas extent and CRS.

Inputs: no named parameters. Returns: object

get_canvas_scaleGet Canvas ScaleA
Read-only

Get the current map canvas scale, rotation, and magnification factor.

Inputs: no named parameters. Returns: object

get_canvas_screenshotGet Canvas ScreenshotA
Read-only

Grab a fast screenshot of the current map canvas widget (no re-render). Returns the image inline. Much faster than render_map.

Inputs: no named parameters.

get_field_statisticsGet Field StatisticsA
Read-only

Compute aggregate statistics (count, sum, mean, min, max, stdev) for a numeric field. For non-numeric fields returns count and distinct values.

Inputs: layer_id (required), field_name (required). Returns: object

get_layer_crsGet Layer CRSA
Read-only

Get the coordinate reference system (CRS) of a layer: EPSG code, description, whether geographic, and PROJ4 string.

Inputs: layer_id (required). Returns: object

get_layer_extentGet Layer ExtentA
Read-only

Get the spatial extent (bounding box) and CRS of a layer.

Inputs: layer_id (required). Returns: object

get_layer_featuresGet Layer FeaturesA
Read-only

Get features from a vector layer. Flat dicts: _fid + attributes at top level. expression filter (QGIS, e.g. "name = 'Berlin'", "population > 1000000"), limit (max 50, default 10), offset for paging, optional geometry in _geometry key.

Inputs: layer_id (required), limit, offset, expression, +1 more. Returns: object

get_layer_labelingGet Layer LabelingA
Read-only

Get the labeling configuration of a vector layer: enabled state, field, font size, color.

Inputs: layer_id (required). Returns: object

get_layersGet LayersA
Read-only

List layers in the current project with IDs, names, types, visibility, and type-specific info. Use limit/offset for pagination. Response includes total_count.

Inputs: limit, offset. Returns: object

get_layer_treeGet Layer TreeA
Read-only

Get the full layer tree structure with groups and layers. Returns recursive tree with type, name, visibility, and children.

Inputs: no named parameters. Returns: object

get_layout_infoGet Layout InfoB
Read-only

List items in a print layout (type, id, uuid, position, size) and page count.

Inputs: layout_name (required). Returns: object

get_map_themesGet Map ThemesA
Read-only

Get map themes (visibility presets). Each theme stores which layers are visible.

Inputs: no named parameters. Returns: object

get_message_logGet Message LogA
Read-only

Get QGIS message log entries. Filter by level ('info', 'warning', 'critical') and/or tag (e.g. 'QGIS MCP'). Returns newest first.

Inputs: tag, level, limit. Returns: object

get_plugin_infoGet Plugin InfoA
Read-only

Get detailed info for a specific plugin: name, enabled, version, description, author, path.

Inputs: plugin_name (required). Returns: object

get_processing_providersGet Processing ProvidersA
Read-only

List Processing providers (native, gdal, grass, saga, model, ...) with algorithm counts and active status. Use to diagnose missing algorithms.

Inputs: no named parameters. Returns: object

get_project_infoGet Project InfoA
Read-only

Get current project metadata: filename, title, CRS, layer count, and summary of layers.

Inputs: no named parameters. Returns: object

get_project_variablesGet Project VariablesA
Read-only

Get all project-level variables (key-value pairs set in Project Properties).

Inputs: no named parameters. Returns: object

get_qgis_infoGet QGIS InfoA
Read-only

Get QGIS version, profile path, and plugin count.

Inputs: no named parameters. Returns: object

get_raster_infoGet Raster InfoA
Read-only

Get raster layer info: band count, dimensions, CRS, extent, per-band statistics, nodata values.

Inputs: layer_id (required). Returns: object

get_selectionGet SelectionA
Read-only

Get the current selection for a layer. Returns feature IDs and count.

Inputs: layer_id (required). Returns: object

get_settingGet SettingA
Read-only

Read a QGIS setting by key path (e.g. 'qgis/sketching/sketching_enabled').

Inputs: key (required). Returns: object

get_unique_valuesGet Unique ValuesA
Read-only

Return the distinct values of a field. Use 'limit' to cap results (-1 for all). Useful before building categorized symbology or filters.

Inputs: field (required), layer_id (required), limit. Returns: object

identify_featuresIdentify FeaturesA
Read-only

Identify features at a point [x, y] in project CRS across layers (map-click analogue). tolerance (map units) expands the search; 0 = exact hit. layer_ids limits the search (default: visible vector layers). limit caps features per layer.

Inputs: point (required), limit, layer_ids, tolerance.

list_layoutsList LayoutsA
Read-only

List all print layouts in the current project with names and page counts.

Inputs: no named parameters. Returns: object

list_pluginsList PluginsA
Read-only

List installed QGIS plugins with name, enabled status, and version. Set enabled_only=true to list only active plugins.

Inputs: enabled_only. Returns: object

list_processing_algorithmsList Processing AlgorithmsA
Read-only

Search for processing algorithms by keyword and/or provider. Returns id, name, provider for each match.

Inputs: search, provider. Returns: object

list_processing_modelsList Processing ModelsA
Read-only

List registered Processing models (the 'model' provider). Returns id, name, group for each. Use run_model to execute one.

Inputs: no named parameters. Returns: object

load_projectLoad ProjectC

Load a QGIS project from a .qgs/.qgz file path.

Inputs: path (required).

move_layer_to_groupMove Layer to GroupB

Move a layer into a layer group by group name.

Inputs: layer_id (required), group_name (required).

pingPingA
Read-only

Check connectivity to the QGIS plugin server. Returns pong if connected.

Inputs: no named parameters. Returns: object

raster_calculatorRaster CalculatorA

Band math via the QGIS raster calculator. Reference loaded raster layers in the expression as 'LayerName@band' (e.g. '("dem@1" > 1000) * 1'). Writes a GeoTIFF to output_path. Output grid/extent taken from reference_layer (layer id or name), defaulting to the first loaded raster.

Inputs: expression (required), output_path (required), reference_layer.

reload_pluginReload PluginA
Destructive

Reload a QGIS plugin by name. Cannot reload the MCP plugin itself. Useful during plugin development.

Inputs: plugin_name (required).

remove_bookmarkRemove BookmarkA
Destructive

Remove a spatial bookmark by its ID.

Inputs: bookmark_id (required).

remove_layerRemove LayerA
Destructive

Remove a layer from the project by its layer ID. This is irreversible.

Inputs: layer_id (required).

remove_layoutRemove LayoutB
Destructive

Remove a print layout from the project.

Inputs: layout_name (required).

remove_map_themeRemove Map ThemeB
Destructive

Remove a map theme by name.

Inputs: name (required).

rename_fieldRename FieldC

Rename a field in a vector layer.

Inputs: layer_id (required), new_name (required), old_name (required).

render_mapRender MapB
Idempotent

Render the current map canvas to an image. Returns the image inline so you can see it. Optionally saves to a file path on disk.

Inputs: path, width, height.

run_modelRun ModelA

Run a Processing model by registered id (e.g. 'model:myflow') or by a .model3 file path. 'parameters' maps the model's input names to values (layer ids/paths, numbers, etc.).

Inputs: model (required), parameters.

sample_raster_valuesSample Raster ValuesA
Read-only

Sample raster pixel values at points. 'points' is a list of [x, y] in the raster's CRS. Omit 'band' to sample all bands. Use transform_coordinates first if your points are in a different CRS.

Inputs: points (required), raster_layer (required), band. Returns: object

save_projectSave ProjectB
Idempotent

Save the current project. Optionally specify a new path.

Inputs: path.

save_style_qmlSave Style QMLC

Save a layer's style to a QGIS QML file.

Inputs: path (required), layer_id (required).

select_featuresSelect FeaturesB
Idempotent

Select features in a layer by expression or feature IDs.

Inputs: layer_id (required), fids, expression.

set_active_layerSet Active LayerB
Idempotent

Set the active layer in the QGIS layer panel by layer ID.

Inputs: layer_id (required).

set_canvas_extentSet Canvas ExtentA
Idempotent

Set the map canvas extent. Coordinates should be in the specified CRS (default: project CRS).

Inputs: xmax (required), xmin (required), ymax (required), ymin (required), +1 more.

set_canvas_scaleSet Canvas ScaleA
Idempotent

Set the map canvas scale and/or rotation. Provide scale as denominator (e.g. 50000 for 1:50000). Rotation in degrees (0-360).

Inputs: scale, rotation.

set_layer_crsSet Layer CRSA

Set the CRS of a layer (e.g. 'EPSG:4326'). This does NOT reproject data — it only changes how the layer's coordinates are interpreted.

Inputs: crs (required), layer_id (required).

set_layer_labelingSet Layer LabelingA

Configure labeling for a vector layer. Set enabled=false to disable labels. Set field_name to the attribute field to label with. Optional: font_size (float), color (hex like '#000000').

Inputs: layer_id (required), color, enabled, font_size, +1 more.

set_layer_orderSet Layer OrderA
Idempotent

Set the explicit layer draw order in the tree. layer_ids is the ordered list of layer ids from top (drawn last) to bottom.

Inputs: layer_ids (required).

set_layer_propertySet Layer PropertyA
Idempotent

Set a layer property. Supported properties: opacity (0.0-1.0), name (string), min_scale, max_scale (float), scale_visibility (bool).

Inputs: value (required), layer_id (required), property (required).

set_layer_styleSet Layer StyleA

Set symbology. style_type: 'single' (one symbol), 'categorized' (unique values), 'graduated' (numeric ranges). field required for categorized/graduated. color_ramp: QGIS ramp name (e.g. 'Spectral', 'Viridis', 'Blues'). classes: graduated class count (default 5).

Inputs: layer_id (required), style_type (required), field, classes, +1 more.

set_layer_visibilitySet Layer VisibilityB
Idempotent

Set a layer's visibility in the layer tree (show/hide on map).

Inputs: visible (required), layer_id (required).

set_project_crsSet Project CRSA

Set the project coordinate reference system (e.g. 'EPSG:4326', 'EPSG:3857'). This changes how layers are projected on the map canvas.

Inputs: crs (required).

set_project_variableSet Project VariableB
Idempotent

Set a project-level variable. Variables are accessible in expressions as @key.

Inputs: key (required), value (required).

set_settingSet SettingA
Destructive

Write a QGIS setting. Use with care — incorrect settings can affect QGIS behavior.

Inputs: key (required), value (required).

spatial_joinSpatial JoinA

Join attributes by location (native:joinattributesbylocation). predicates int list: 0=intersects 1=contains 2=equals 3=touches 4=overlaps 5=within 6=crosses (default [0]). method: 0=one-to-many 1=first match (default) 2=largest overlap. join_fields = copied columns (default all). No output_path = in-memory layer.

Inputs: join_layer (required), target_layer (required), method, prefix, +3 more.

transform_coordinatesTransform CoordinatesA
Read-only

Transform coordinates between CRS. Accepts a point {x, y}, a point list [{x, y}, ...], or a bbox {xmin, ymin, xmax, ymax}. Returns the same format.

Inputs: source_crs (required), target_crs (required), bbox, point, +1 more. Returns: object

update_featuresUpdate FeaturesA
Destructive

Update feature attributes. updates: [{fid: 1, attributes: {field: value}}]. Returns count of updated features.

Inputs: updates (required), layer_id (required).

validate_expressionValidate ExpressionA
Read-only

Validate a QGIS expression. Returns whether it's valid, any parse errors, and referenced column names. Optionally test against a layer's fields.

Inputs: expression (required), layer_id. Returns: object

zonal_statisticsZonal StatisticsB

Per-polygon stats from a raster (native:zonalstatisticsfb). stats int codes: 0=count 1=sum 2=mean 3=median 4=stdev 5=min 6=max 7=range 8=minority 9=majority 10=variety 11=variance (default [0,1,2]). New columns prefixed by 'prefix'. No output_path = in-memory layer.

Inputs: raster_layer (required), polygon_layer (required), band, stats, +2 more.

zoom_to_layerZoom to LayerA
Idempotent

Zoom the map canvas to the full extent of the specified layer.

Inputs: layer_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 102 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but some overlap exists, e.g., get_canvas_screenshot vs render_map (both capture canvas, one faster no re-render), and get_layers vs get_layer_tree vs get_active_layer (hierarchical vs flat vs single). Descriptions generally clarify, but the large set introduces minor ambiguity.

    Naming Consistency5/5

    Tool names overwhelmingly follow a consistent verb_noun pattern (e.g., add_bookmark, get_layers, set_canvas_extent). Minor exceptions like field_calculator or batch_commands are still descriptive and do not break the overall predictability.

    Tool Count3/5

    102 tools is very high for a typical MCP server. While QGIS is a complex GIS platform that can justify many tools, the count may overwhelm agents. A more focused set (e.g., 50-60) might balance completeness and usability.

    Completeness5/5

    The tool surface covers nearly all core GIS workflows: layer management, styling, print layouts, processing algorithms, expressions, spatial analysis, and more. Obvious gaps (e.g., advanced geoprocessing) are addressed by the execute_processing tool that wraps all Processing algorithms.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      Connects Claude AI to QGIS through the Model Context Protocol, allowing Claude to directly interact with and control QGIS for tasks like project creation, layer manipulation, and code execution.
      15
      1,157
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Connects QGIS to Claude AI through the Model Context Protocol, enabling AI-assisted project creation, layer manipulation, processing algorithm execution, and Python code running within QGIS.
      7
      -
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that connects Claude AI to QGIS, enabling direct interaction with the GIS software for project creation, layer manipulation, code execution, and processing algorithms through natural language prompts.
      15
      10
      Creative Commons Zero v1.0 Universal
    • F
      license
      B
      quality
      D
      maintenance
      QGISMCP connects QGIS to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control QGIS for project creation, layer loading, code execution, and more.
      15
      1
      -