QGIS-MCP-Spatial-Analysis-Agent

Read full text
Authors: Tzu-Cheng Chang, Tzai‐Hung Wen
Cited by: 0

Abstract

Recent advancements in autonomous GIS have primarily focused on task-level automation, often failing to address the reasoning required for high-level research questions. Conversely, generic AI research agents typically lack the rigorous, data-centric capabilities necessary for spatial science. To bridge this gap, we propose an MCP-driven spatial analysis agent designed for problem-aware geospatial deep research. Adopting a distinct "User-Agent Contract," the framework requires researchers to provide a natural language goal and curated datasets, while the agent autonomously manages the analytical design, execution, and interpretation. The system utilizes a cognitive layer to map queries to standardized operating procedures (SOPs), such as spatial inequality diagnostics or hotspot detection and executes them via the Model Context Protocol (MCP) connected to a local QGIS and PySAL backend. We demonstrate the system's cross-domain transferability through case studies on educational resource inequality and epidemic hotspot detection. Crucially, a comparative evaluation reveals that the agent’s statistical outputs, including global Moran’s I and spatial regression coefficients, align closely matched the results generated in Esri ArcGIS Pro 3.5. This work demonstrates that standardized, agentic workflows can effectively democratize rigorous spatial statistics while maintaining scientific reproducibility and transparency.

Publication details

Journal / source
Figshare
Publication date
1 January 2026