Air Quality Analytics

v1.0.0Data Science & MLstable

Full-stack air quality analytics platform built with FastAPI, React, and MySQL. Aggregates multi-source PM2.5/PM10 data, performs multi-city comparison and time-series forecasting (SARIMAX), and integrates an LLM-based planning agent with tiered acce

academic-projectagentic-aiair-qualityapi-developmentdata-engineering
Share:
26
Stars
0
Downloads
0
Weekly
0/5

What is Air Quality Analytics?

Air Quality Analytics is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to full-stack air quality analytics platform built with fastapi, react, and mysql. aggregates multi-source pm2.5/pm10 data, performs multi-city comparison and time-series forecasting (sarimax), and integ...

Full-stack air quality analytics platform built with FastAPI, React, and MySQL. Aggregates multi-source PM2.5/PM10 data, performs multi-city comparison and time-series forecasting (SARIMAX), and integrates an LLM-based planning agent with tiered acce

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Full-stack air quality analytics platform built with FastAPI

Use Cases

Aggregate multi-source air quality data and perform comparative analysis.
Conduct time-series forecasting for pollution trends.
Access comprehensive environmental analytics with agent-driven insights.
dyneth02

Maintainer

LicenseMIT
Languagejavascript
Versionv1.0.0
UpdatedMay 13, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx air-quality-trends-analysis-project

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Air Quality Analytics

Air Quality Analytics is a full-stack platform that aggregates PM2.5 and PM10 data from multiple sources including Open-Meteo, OpenAQ, IQAir, and WAQI, performs multi-city comparative analysis, and applies SARIMAX time-series forecasting to predict pollution trends. It ships an LLM-based planning agent with a critic-based reflection pattern that converts natural-language queries into data pipeline steps, and exposes the results through a FastAPI backend and React frontend. Researchers and environmental data engineers use it to automate air quality monitoring workflows and generate PDF reports.

Prerequisites

  • Python 3.10 or later and pip installed
  • Node.js 18 or later (for the React frontend)
  • MySQL database server running locally or remotely
  • API keys for IQAir and WAQI if using authenticated data sources
  • An MCP-compatible client such as Claude Desktop
1

Clone the repository

Download the Air Quality project source code from GitHub.

git clone https://github.com/dyneth02/Air-Quality-Trends-Analysis-Project.git
cd Air-Quality-Trends-Analysis-Project
2

Install Python backend dependencies

Install the FastAPI backend dependencies including the MCP server components and forecasting libraries.

pip install -r requirements.txt
3

Configure your database and API credentials

Set up MySQL connection details and any required data-source API keys in your environment or a .env file.

DATABASE_URL=mysql+pymysql://user:password@localhost:3306/air_quality
IQAIR_API_KEY=your_iqair_key_here
WAQI_API_KEY=your_waqi_key_here
4

Start the FastAPI backend

Launch the backend server which exposes the MCP endpoint and REST API for data access.

uvicorn main:app --host 0.0.0.0 --port 8000 --reload
5

Install and start the React frontend

Install frontend dependencies and start the development server to access the visualization dashboard.

cd frontend
npm install
npm run dev
6

Connect Claude Desktop to the MCP endpoint

Register the Air Quality MCP server in your claude_desktop_config.json to enable natural-language queries against the platform.

{
  "mcpServers": {
    "air-quality": {
      "command": "python",
      "args": ["-m", "mcp_server"],
      "env": {
        "DATABASE_URL": "mysql+pymysql://user:password@localhost:3306/air_quality"
      }
    }
  }
}

Air Quality Analytics Examples

Client configuration

claude_desktop_config.json entry for the Air Quality Analytics MCP server.

{
  "mcpServers": {
    "air-quality": {
      "command": "python",
      "args": ["-m", "mcp_server"],
      "env": {
        "DATABASE_URL": "mysql+pymysql://user:password@localhost:3306/air_quality"
      }
    }
  }
}

Prompts to try

Example natural-language queries for air quality analysis and forecasting.

- "Compare PM2.5 levels in New York, Los Angeles, and Chicago over the last 30 days"
- "Forecast PM10 pollution in Delhi for the next two weeks using historical trends"
- "Show me which city had the worst air quality this month and generate a PDF report"
- "What are the mean, min, and max PM2.5 values for Beijing in 2024?"
- "Plot a time series of PM2.5 data for London and highlight anomalies"

Troubleshooting Air Quality Analytics

Database connection fails on startup

Verify that MySQL is running and that DATABASE_URL uses the correct host, port, username, password, and database name. Run 'mysql -u user -p air_quality' to test credentials independently.

SARIMAX forecasting raises a 'convergence warning' or fails

SARIMAX requires sufficient historical data. Ensure at least 60 days of data are present in the database for the target city before running forecasting queries.

The LLM planning agent returns 'I cannot complete this query'

The agent uses a critic-based reflection pattern and may reject ambiguous queries. Rephrase with explicit city names, date ranges, and pollutant types (PM2.5 or PM10) to give the planner enough context.

Frequently Asked Questions about Air Quality Analytics

What is Air Quality Analytics?

Air Quality Analytics is a Model Context Protocol (MCP) server that full-stack air quality analytics platform built with fastapi, react, and mysql. aggregates multi-source pm2.5/pm10 data, performs multi-city comparison and time-series forecasting (sarimax), and integrates an llm-based planning agent with tiered acce It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Air Quality Analytics?

Follow the installation instructions on the Air Quality Analytics GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Air Quality Analytics?

Air Quality Analytics works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Air Quality Analytics free to use?

Yes, Air Quality Analytics is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "air-quality-trends-analysis-project": { "command": "npx", "args": ["-y", "air-quality-trends-analysis-project"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Air Quality Analytics?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides