Skip to main content
Glama
awheeler262
by awheeler262
README.md
# Quantum GIS (QGIS) MCP

This project explores ways to interact with QGIS using the QGIS MCP Plugin and an MCP Server.

1. Install QGIS MCP Plugin.
    * Plugins > Manage and install plugins
    * Source code at [github.com/nkarasiak/qgis-mcp](https://github.com/nkarasiak/qgis-mcp)
1. Set configuration to start MCP server on start-up.
1. Configure Claude as directed, mostly. Best to add `-s user` to the bash command.
    ```bash
    claude mcp add qgis -s user -- uvx --from https://github.com/nkarasiak/qgis-mcp/archive/refs/tags/v0.11.0.zip qgis-mcp-server
    ```
1. Ask Claude to ping QGIS.

## Architecture

The architecture described through key files and classes.

```text
app/main.py
  |-- app/domain/claude_mcp/service.py
      ClaudeMCP -- Chat loop 
     |-- app/clients/claude.py
         Claude <-------------------Claude API------------------> LLM
     |-- app/clients/qgis_mcp.py
         QgisMcpClient <-stdio-> subprocess qgis_mcp.server <---> QGIS MCP Plugin Server
```

Test with:
```bash
uv run pytest -v
```
Run with:
```bash
uv run python -m app.main
```

## Future

* Consider running the entire application on an AWS EC2.
    - Easily see use cases with times that exceed maximum Lambda timeout.
    - Consider FastAPI for REST endpoints.

TDQS

B3/5.0

Scored across 103 tools

Disambiguation4/5

Most tools have clearly distinct purposes, but with 103 tools there is some potential for confusion, e.g., between screenshot tools (get_canvas_screenshot, get_3d_screenshot, render_map) and between execution commands (execute_processing, execute_processing_batch, execute_code, batch_commands). Descriptions help differentiate, but the sheer volume may cause an agent to misselect.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern (e.g., set_canvas_extent, get_canvas_screenshot, list_processing_algorithms). Even utility tools like 'ping' and 'diagnose' are acceptable standalone verbs. No mixing of conventions.

Tool Count1/5

With 103 tools, the count is extremely high. While QGIS is a complex platform, this granularity far exceeds the typical well-scoped range of 3-15 tools. The surface feels bloated and could be consolidated (e.g., multiple layout addition tools, many field operations).

Completeness5/5

The tool set covers virtually all major QGIS functionalities: project management, layer CRUD, canvas control, processing algorithms, print layouts, atlas, expressions, SQL, and more. Missing features (e.g., direct geometry editing) can be achieved via execute_processing or execute_code, so no critical gaps.

Maintenance

ActivitySlowing
ResponsivenessNo issues