LLM-enhanced Air Quality Monitoring Interface via Model Context Protocol
Yu-Erh Pan, Ayesha Siddika Nipu
TL;DR
The paper tackles making dense air quality data accessible to non-experts while mitigating LLM hallucinations in safety-critical contexts. It introduces the AMI, a Django-based system that grounds real-time sensor data in an LLM-driven conversational interface through the Model Context Protocol (MCP), enabling the model to act as an active operator via discoverable backend tools. Key contributions include the MCP-grounded integration architecture, a defense-in-depth security approach combining prompt and code-level controls, and an empirical evaluation showing high factual accuracy and minimal hallucinations. The work demonstrates a practical, secure, and extensible pathway for real-time environmental monitoring with trustworthy AI-assisted interfaces.
Abstract
Air quality monitoring is central to environmental sustainability and public health, yet traditional systems remain difficult for non-expert users to interpret due to complex visualizations, limited interactivity, and high deployment costs. Recent advances in Large Language Models (LLMs) offer new opportunities to make sensor data more accessible, but their tendency to produce hallucinations limits reliability in safety-critical domains. To address these challenges, we present an LLM-enhanced Air Monitoring Interface (AMI) that integrates real-time sensor data with a conversational interface via the Model Context Protocol (MCP). Our system grounds LLM outputs in live environmental data, enabling accurate, context-aware responses while reducing hallucination risk. The architecture combines a Django-based backend, a responsive user dashboard, and a secure MCP server that exposes system functions as discoverable tools, allowing the LLM to act as an active operator rather than a passive responder. Expert evaluation demonstrated high factual accuracy (4.78), completeness (4.82), and minimal hallucinations (4.84), on a scale of 5, supported by inter-rater reliability analysis. These results highlight the potential of combining LLMs with standardized tool protocols to create reliable, secure, and user-friendly interfaces for real-time environmental monitoring.
