qgis-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| QGIS_MCP_HOST | No | Host for the QGIS MCP socket connection (optional). | |
| QGIS_MCP_MODE | No | Set to 'headless' to run without QGIS open, using PyQGIS directly. | |
| QGIS_MCP_PORT | No | Port for the QGIS MCP socket connection (default 9876). | 9876 |
| QGIS_MCP_TIMEOUT | No | Timeout in seconds for the MCP server (default 600). | 600 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| pingA | Check that QGIS answers and report its version. |
| list_layer_typesA | List the thematic layers this server can style (key, title, default fields). |
| inspect_datasetB | Describe a vector or raster file: CRS, extent, geometry, fields and sample values. |
| set_project_areaA | Set the project shape (polygon layer) every map is built on. In QGIS it is added on top as a red outline and the canvas zooms to it. Args: path: Polygon file (.shp, .gpkg, .geojson...). name: Project name shown on the map (defaults to the file name). crs: Output CRS such as "EPSG:32615"; defaults to the shape's CRS. subset: Optional attribute filter, e.g. ""CODIGO" = 'P-01'". |
| add_layerA | Add (or replace) a thematic layer, styled from the catalog. In QGIS it appears in the "Capas temáticas" group, in drawing order. Args: layer_type: Key from list_layer_types, e.g. "zonas_vida", "rios", "volcanes". path: Vector or raster file with the data. field: Attribute used to classify colors (auto-detected when omitted). label_field: Attribute used for labels (auto-detected when omitted). clip: "shape" cuts to the project polygon, "extent" to the map frame, "none" keeps the layer whole. Defaults depend on the layer type. title: Legend title (defaults to the catalog title). subset: Optional attribute filter in QGIS expression syntax. |
| remove_layerC | Remove a thematic layer from the map. |
| reset_mapB | Forget the project shape and every layer added so far. |
| get_map_stateB | Show the project shape, output CRS and the layers added so far. |
| generate_mapA | Render one map sheet (PDF/PNG/JPG/TIF chosen by extension) over the project shape. Includes title, legend, north arrow, scale bar, coordinate grid and notes. Clipped layers are saved to a GeoPackage next to the output. In QGIS the sheet is added to the Layout Manager (and opened when open_layout is true) so it can be edited there; headless, a .qgz project is saved next to it. Args: output_path: Where to write the map, e.g. "C:/salidas/mapa_general.pdf". layers: Layer types to include (all added layers when omitted). page_size: A4, A3, A2, LETTER, LEGAL or TABLOID. extent: "project" zooms to the project shape, "layers" to all layers. margin_percent: Space around the project shape, in % of its size. sources: Data sources credited in the notes box. basemap: Background under the layers: "satelite" (Esri World Imagery), "google" (Google Satellite) or "osm" (OpenStreetMap). Needs internet; credited in the notes. |
| generate_map_seriesB | Render one map per thematic layer (e.g. Mapa de Zonas de Vida, Mapa de Cuencas...). In QGIS each sheet is also added to the Layout Manager. Args: output_dir: Folder for the maps (numbered by drawing order). layers: Layer types to map (all added layers when omitted). context_layers: Layers repeated on every sheet for reference, e.g. ["rios", "vias_acceso"]. basemap: "satelite", "google" or "osm" background on every sheet (needs internet). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Most tools target clearly distinct actions (add, remove, inspect, generate). However, add_layer and set_project_area both add data layers to the project, and reset_map vs remove_layer could be confused by an agent skimming descriptions.
All tool names use snake_case and follow a predictable verb_noun pattern (e.g., list_layer_types, inspect_dataset, set_project_area, add_layer, generate_map). The only outlier is 'ping', which is a standard health-check name and does not break consistency.
10 tools is well-scoped for a QGIS map-generation server. Each tool serves a clear purpose, and the set avoids both bloat and missing essentials.
The surface covers the main lifecycle: inspect data, set project area, add/remove layers, check state, and generate single or series maps. Minor gaps include no dedicated tool to update an existing layer's style or reorder layers after creation, though add_layer can replace layers.