LLM-powered intelligent assistant for QGIS. Natural language control of QGIS tools, plus an optional local MCP server so external AI agents (Claude Desktop, Cursor, etc.) can drive QGIS.
QGIS Agent is an AI-powered assistant that runs inside QGIS desktop. It allows you to control QGIS through natural language conversations, including: viewing project info, adding/removing layers, executing Processing algorithms, running PyQGIS code, setting layer labels, rendering maps, and more.
Features:
- Natural language interface for QGIS operations
- 23 built-in QGIS tools driven by natural language (PyQGIS / Processing)
- Bundled reference catalog: 679 Processing algorithm/tool entries, one TOML per algorithm (tool_docs/)
- RAG-enhanced API documentation retrieval
- Cookbook self-evolution mechanism
- Long-term memory support
- Multiple LLM providers (DeepSeek, Mimo, GLM, Gemini, etc.)
- Safety: PyQGIS AST static scan, confirmation for dangerous ops, untrusted data sanitization
- Skills system: load/run user or bundled skill recipes (run_skill tool)
- Workflow recording & replay: record a QGIS operation sequence and replay it later
- Proactive clarification: agent asks when intent is ambiguous before acting
- Task graph: decompose complex goals into a trackable plan
- Optional MCP server: expose the same tools to external AI agents over the Model Context Protocol
MCP server security model (disabled by default; you start it explicitly from the settings page):
- listens on 127.0.0.1 only; binding to any other address is not supported
- requires an access token; requests without a valid token are rejected
- privileged tools (execute_pyqgis, execute_processing, remove_layer, load_project,
save_project, run_skill) are hidden from external agents unless you enable them,
and each execution still requires an on-screen confirmation
- port and token are recorded in ~/.qgis_agent/mcp_session.json (mode 0600) so the
bundled stdio MCP server can discover them; the file is deleted when the service stops
External dependencies (install via pip before use):
langchain_core, langchain_openai, langchain_deepseek, httpx
Optional (only for the "browser-compatible TLS" option in settings; not required by default):
curl_cffi # sends API requests with a browser TLS stack, for gateways that interrupt non-browser clients
The bundled MCP server (mcp_server/) requires no third-party packages.
Plugin Tags