Table of Contents
Fetching ...

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.

LLM-enhanced Air Quality Monitoring Interface via Model Context Protocol

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.

Paper Structure

This paper contains 14 sections, 6 figures, 1 table.

Figures (6)

  • Figure 1: A smart air quality monitoring system
  • Figure 2: System architecture of the AMI platform, illustrating interactions from sensor data acquisition to the LLM-driven interface.
  • Figure 3: Sequence diagram of the MCP interaction flow, showing how user requests translate into LLM tool calls executed via the MCP server.
  • Figure 4: An example of a real-time data query. The user asks a question in natural language, and the LLM invokes the appropriate tool to fetch and summarize live sensor data.
  • Figure 5: Demonstration of a system operation task. LLM interprets a user's issue report and calls the 'report_issue' tool to create a ticket in the backend system.
  • ...and 1 more figures