Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
QGIS_MCP_HOSTNoHost address for the MCP bridge (default: 127.0.0.1). Set if you need a different host.127.0.0.1
QGIS_MCP_PORTNoPort for the MCP bridge (default: 9876). Set if you need a different port.9876

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

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_layer_summaryA

Summarize a layer in one call: feature count, geometry type, CRS, extent, and fields.

Replaces the usual five round-trips (layer_info + list_fields + samples) with a single response. For vector layers, each field comes with up to 3 example values pulled from the first features scanned - not a full distinct-value enumeration. Raster layers get the shared metadata (id/name/type/crs/extent) with geometry_type, feature_count, and fields set to null.

filter_layer_by_expressionA

Set a QGIS expression as the layer's subset filter (subset string).

Only features matching expression remain visible/queryable on the layer until the filter is changed or cleared. Pass an empty string to clear the filter. Returns the feature count remaining after the filter is applied.

select_features_by_expressionB

Select features on a layer matching a QGIS expression, e.g. "pop" > 1000.

mode controls how the match combines with any existing selection: "set" (replace, default), "add", "intersect", or "remove". Returns the total selected count and a preview of matched feature ids (capped; the count is always exact even when the id list is truncated).

get_layer_extent_wktA

Get a layer's extent as both a bbox and ready-to-use WKT polygon.

Useful as an input to a following step, e.g. clip_layer_to_extent or a Processing algorithm that takes a geometry parameter.

reproject_layerA

Reproject a vector layer to a new CRS, saving the result as a new layer.

The original layer is left untouched. The new in-memory layer is added to the project and validated: validated is true only if the output CRS matches target_crs and its feature count matches the source layer's.

clip_layer_to_extentA

Clip a layer to a bounding-box extent, saving the result as a new layer.

Provide exactly one of reference_layer_name (clip to that layer's extent) or bbox as [xmin, ymin, xmax, ymax] (crs defaults to the source layer's CRS if omitted). This clips to the rectangular extent, not the reference layer's actual feature geometries. The original layer is left untouched.

merge_layersA

Merge multiple vector layers of the same geometry type into one new layer.

Fails with GeometryTypeMismatch if the layers don't all share one geometry type. crs defaults to the first layer's CRS if omitted. Returns schema_conflicts: field names that aren't present on every input layer (missing values are left null on features from layers that lack that field).

get_field_statisticsA

Get min/max/mean/sum and distinct-value count for a numeric field.

Fails with UnsupportedFieldType if the field isn't numeric. Also includes a capped preview of distinct values seen on the field.

add_field_with_valuesB

Add a new field and populate every feature from a QGIS expression, in one step.

type is one of: integer, double, string, date, datetime, boolean. The add-and-populate happens inside a single edit session: if the expression fails to evaluate on any feature, the field addition is rolled back too.

export_layerA

Export a layer to GeoJSON, Shapefile, GPKG, or CSV.

format is one of: geojson, shapefile, gpkg, csv - inferred from path's extension if omitted. CSV exports include geometry as a WKT column automatically, since GDAL's CSV driver drops geometry by default.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/piatkowski/qgis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server