TAN Zhenyu, YANG Anping, MA Zhenyi, GAO Meiling, YU Chen
[Objectives] The rapid advancement of Large Language Models (LLMs) has created new opportunities for intelligent geospatial data processing. However, current integration approaches between LLMs and Geographic Information Systems (GIS) still face key challenges, such as data privacy risks associated with cloud-only architectures, incomplete integration with native GIS toolchains, and the lack of standardized communication protocols for cross-platform interoperability. To address these limitations, this study proposed Smart-QGIS, an agent prototype system for geospatial data processing and mapping built on the Model Context Protocol (MCP). The system supports localized deployment while maintaining open protocol compatibility, enabling flexible integration with both local and cloud-based LLMs. The primary objective is to establish a secure, extensible, and functionally complete intelligent GIS framework that bridges natural language interaction and professional spatial analysis workflows. [Methods] Smart-QGIS was developed on the QGIS platform and uses MCP as a standardized communication bridge between LLMs and native GIS functional interfaces. The system enables end-to-end task execution, allowing users to convert natural language instructions directly into executable spatial analysis operations. It adopted a multi-process modular architecture consisting of five coordinated layers: a user interaction layer, a plugin mediation layer, an MCP communication layer, a local execution layer, and a model inference layer. This architecture ensures system scalability, functional extensibility, and operational stability, while supporting integrated workflows including data loading, spatial analysis, and cartographic visualization. [Results] System performance was evaluated using the vector administrative boundary of Shaanxi Province and digital elevation model raster data. Two model deployment strategies were tested, including a locally deployed open-source OpenAI-compatible GPT model via Ollama and a cloud-based Alibaba Qwen LLM. Through Smart-QGIS, representative GIS tasks such as data loading, clipping, slope calculation, layer visualization, and automated map production were executed interactively. Results demonstrated that Smart-QGIS can accurately interpret complex, multi-step instructions while maintaining an efficient response time, typically below 75 seconds. For routine geospatial processing and visualization tasks, system performance is generally equivalent to or exceeds that of typical professional GIS users, while cloud-based models show higher efficiency in complex task execution. [Conclusions] Overall, the MCP-based localized LLM-GIS integration framework demonstrated advantages in privacy protection, functional coverage, and protocol universality. The system significantly lowers the technical barrier for geospatial data processing, enabling non-specialist users to perform complex spatial analysis tasks efficiently. The proposed architecture provides a practical technical pathway toward building open, collaborative, and intelligent GIS ecosystems, with strong potential for applications in intelligent spatial decision support, automated geospatial data services, and next-generation human-AI collaborative geospatial analysis environments.