Skip to main content
Glama

πŸ“yerevan-aqi-mcp

MCP server for real-time Yerevan city air quality data. Connects AI assistants directly to the official Yerevan GIS platform β€” no API key required.

https://github.com/user-attachments/assets/757580fc-1061-4cb4-9c76-6526ccb19d80

✨ Features

  • Real-time AQI from 50+ sensors across the city

  • Historical data β€” hourly records, daily trends, worst locations

  • Zero auth β€” open municipal data, just works

  • 8 tools covering everything from nearest sensor lookup to city-wide averages

Related MCP server: air-quality-mcp

πŸ“¦ Installation

Via npx (recommended):

{
  "mcpServers": {
    "yerevan-aqi": {
      "command": "npx",
      "args": ["yerevan-aqi-mcp"]
    }
  }
}

From source:

git clone https://github.com/hayrapetian/yerevan-aqi-mcp
cd yerevan-aqi-mcp
npm install && npm run build
{
  "mcpServers": {
    "yerevan-aqi": {
      "command": "node",
      "args": ["/absolute/path/to/yerevan-aqi-mcp/dist/index.js"]
    }
  }
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

πŸ› οΈ Tools

get_all_devices

All sensors with current AQI and coordinates. Also returns city-wide average AQI.

Param

Type

Default

Description

limit

int

50

Max devices to return (max 200)

onlyWorking

bool

true

Filter to operational devices only

get_device_current

Full current reading for a specific sensor: AQI, PM2.5, PM10, NO2, O3, temperature, humidity, wind.

Param

Type

Description

code

string

Device code identifier

get_devices_by_aqi

Devices filtered above or below an AQI threshold, ordered by AQI.

Param

Type

Default

Description

threshold

int

100

AQI threshold

above

bool

true

true = above, false = below

limit

int

20

Max results (max 100)

get_nearest_sensor

Closest working sensor to a given coordinate with its current reading.

Param

Type

Description

lat

float

Latitude

lon

float

Longitude

get_device_history

Hourly records for a specific sensor over N days, with min/max/avg summary.

Param

Type

Default

Description

code

string

β€”

Device code identifier

days

int

7

Days back (max 30)

get_city_average

City-wide aggregate AQI, PM2.5, and PM10 β€” averages and maxima β€” computed server-side.

Param

Type

Default

Description

days

int

1

Days back to aggregate (max 30)

get_worst_locations

Top N most polluted sensors in a time window, ranked by average AQI.

Param

Type

Default

Description

hours

int

24

Hours back (max 168)

limit

int

10

Number of results (max 50)

get_historical_trend

Daily average PM2.5 AQI and PM10 from the 2024–2025 archive dataset.

Param

Type

Default

Description

deviceCode

string

β€”

Filter to a specific device (optional)

limit

int

30

Days to return (max 365)

πŸ“Š AQI Scale

AQI

Category

0–50

🟒 Good

51–100

🟑 Moderate

101–150

🟠 Unhealthy for Sensitive Groups

151–200

πŸ”΄ Unhealthy

201–300

🟣 Very Unhealthy

301+

πŸ”΄ Hazardous

πŸ’» Development

npm run dev    # run with tsx, no build needed
npm run build  # compile TypeScript to dist/
npm start      # run compiled output

πŸ“„ License

MIT β€” Hayk Hayrapetyan

Available Tools

8 tools
get_all_devicesC

All air quality sensors with current AQI and coordinates. Returns city-wide average AQI.

Inputs: limit, onlyWorking.

get_city_averageB

City-wide aggregate AQI, PM2.5, PM10 β€” averages and maxima β€” computed server-side via outStatistics.

Inputs: days.

get_device_currentB

Full current reading for a specific sensor: AQI, PM2.5, PM10, NO2, O3, temperature, humidity, wind.

Inputs: code (required).

get_device_historyA

Hourly records for a specific sensor over N days. Returns records plus min/max/avg summary.

Inputs: code (required), days.

get_devices_by_aqiB

Devices filtered above or below an AQI threshold, ordered by AQI.

Inputs: above, limit, threshold.

get_historical_trendA

Daily averages from the 2024–2025 archive. Uses truncated field names (pm2_5con_6 = NowCast AQI, pm10concma = PM10 Β΅g/mΒ³).

Inputs: limit, deviceCode.

get_nearest_sensorA

Given latitude/longitude, find the closest working sensor and return its current reading.

Inputs: lat (required), lon (required).

get_worst_locationsB

Top N most polluted sensors in a recent time window, ranked by average AQI.

Inputs: hours, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: current readings, per-device history, nearest sensor, city aggregate, threshold filtering, worst locations, and historical trend. There is some overlap between get_all_devices (which also returns a city-wide average), get_city_average, get_devices_by_aqi, and get_worst_locations, but descriptions make the intended distinctions reasonably clear.

    Naming Consistency5/5

    All tool names use a consistent get_ snake_case pattern with predictable resource/qualifier phrasing. Singular/plural variation follows natural semantics rather than introducing inconsistency.

    Tool Count5/5

    Eight tools is well-scoped for an air-quality sensor server. Each tool covers a distinct query pattern and no tool feels redundant or unnecessary for the domain.

    Completeness4/5

    The read-only query surface is strong: current readings, per-device history, nearest sensor, city averages, threshold filters, worst locations, and historical trends are all covered. Minor gaps remain around richer sensor metadata/status details and possibly forecast or alerting workflows, but these are not blocking for core AQI exploration.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers