# openaq-mcp-server MCP server

Find air-quality stations and read pollutant observations from government monitors via OpenAQ v3.

## Links
- Registry page: https://www.getdrio.com/mcp/io-github-cyanheads-openaq-mcp-server
- Repository: https://github.com/cyanheads/openaq-mcp-server

## Install
- Command: `npx -y @cyanheads/openaq-mcp-server`
- Endpoint: https://openaq.caseyjhand.com/mcp
- Auth: Auth required by registry metadata

## Setup notes
- Package: Npm @cyanheads/openaq-mcp-server v0.1.7
- Environment variable: OPENAQ_API_KEY (required; secret)
- Environment variable: OPENAQ_API_BASE_URL (default https://api.openaq.org/v3)
- Environment variable: CANVAS_PROVIDER_TYPE (default none)
- Environment variable: MCP_LOG_LEVEL (default info)
- Package: Npm @cyanheads/openaq-mcp-server v0.1.7
- Environment variable: OPENAQ_API_KEY (required; secret)
- Environment variable: OPENAQ_API_BASE_URL (default https://api.openaq.org/v3)
- Environment variable: CANVAS_PROVIDER_TYPE (default none)
- Environment variable: MCP_HTTP_HOST (default 127.0.0.1)
- Environment variable: MCP_HTTP_PORT (default 3010)
- Environment variable: MCP_HTTP_ENDPOINT_PATH (default /mcp)
- Environment variable: MCP_AUTH_MODE (default none)
- Environment variable: MCP_LOG_LEVEL (default info)
- The upstream registry signals required auth or secrets.
- Remote endpoint: https://openaq.caseyjhand.com/mcp

## Tools
- openaq_find_locations (openaq-mcp-server: find locations) - Find air-quality monitoring stations (measured by physical sensors, not modeled) near a point, within a bounding box, or by country. Returns each station's id, name, coordinates, distance from the query point (when searching by coordinates), country, provider, the parameters its sensors measure, and the timestamp of its most recent data (datetimeLast). Required first step: openaq_get_readings and openaq_get_measurements key on the location id this returns. Coverage is uneven and real — a station only reports the parameters it measures, and the absence of a nearby station means no monitoring there, not clean air. For dense modeled coverage anywhere on Earth, use open-meteo-mcp-server's air-quality tool instead. Endpoint: https://openaq.caseyjhand.com/mcp
- openaq_get_readings (openaq-mcp-server: get readings) - Latest measured value for every sensor at a monitoring station — the current-conditions tool. Returns one record per parameter, each with the value, its unit, the UTC and local timestamp, and the sensor id, joined so every value carries its pollutant and unit (the raw latest feed is keyed only by sensor id). Pass a locationId from openaq_find_locations, or pass coordinates to auto-resolve to the nearest station that measures the requested parametersId. Data recency varies by station reporting cadence — read each value's timestamp to know whether "latest" is minutes or hours old. These are measured observations with coverage gaps, not a modeled grid. Endpoint: https://openaq.caseyjhand.com/mcp
- openaq_get_measurements (openaq-mcp-server: get measurements) - Historical measurement series for one pollutant at one station over a date range — for trend analysis and "was last week worse than the monthly average?". Pass a locationId and a parametersId and work in stations — you get the series for that pollutant at that station. Choose aggregation: raw (every reported value), hourly, or daily — daily and hourly add a per-bucket statistical summary (min, median, max, mean, sd). Large ranges produce thousands of rows and spill to a DataCanvas: the response returns a preview plus a canvasId and table name you query with openaq_dataframe_query. Values carry their unit; the server never converts between µg/m³, ppm, and ppb. Endpoint: https://openaq.caseyjhand.com/mcp
- openaq_list_parameters (openaq-mcp-server: list parameters) - Catalog of every measurable pollutant and its canonical unit: id, code, display name, unit, and a one-line description (pm25, pm10, o3, no2, so2, co, bc, and ~38 more). This is the unit-disambiguation reference — the same pollutant exists under several ids with different units (CO is id 4 in µg/m³, id 8 in ppm, id 102 in ppb), so use this to pick the exact parametersId for openaq_find_locations / openaq_get_readings / openaq_get_measurements and to interpret a reading's unit. A small bounded catalog fetched live from OpenAQ. Endpoint: https://openaq.caseyjhand.com/mcp
- openaq_list_countries (openaq-mcp-server: list countries) - Catalog of country-level coverage: id, ISO code, name, the date span of available station data (datetimeFirst/datetimeLast), and which parameters are measured anywhere in that country. The availability check before a regional sweep — answers "which countries have NO2 monitoring?" and tells you whether a country has recent data before you call openaq_find_locations. Coverage is uneven worldwide; this surfaces where measured data exists. Endpoint: https://openaq.caseyjhand.com/mcp
- openaq_dataframe_query (openaq-mcp-server: dataframe query) - Run a read-only SQL SELECT against the measurement tables openaq_get_measurements staged on a DataCanvas. Reference tables by the name the measurements call returned (measurements_<sensorId>). For aggregation (monthly means, exceedance counts) and cross-sensor comparison over series too large to inline. Only SELECT is allowed — writes, DDL, and file/network table functions are rejected. Endpoint: https://openaq.caseyjhand.com/mcp
- openaq_dataframe_describe (openaq-mcp-server: dataframe describe) - List the tables and columns staged on a DataCanvas so you can write valid SQL for openaq_dataframe_query without guessing column names. Returns each measurement table (measurements_<sensorId>) with its row count and column names. Requires DataCanvas to be enabled. Endpoint: https://openaq.caseyjhand.com/mcp

## Resources
- openaq://parameters - openaq-parameters Full catalog of measurable pollutants and their canonical units (id, code, display name, unit, description). Same data as openaq_list_parameters. The unit-disambiguation reference — the same pollutant appears under several ids with different units (CO is id 4 µg/m³, id 8 ppm, id 102 ppb). MIME type: application/json

## Prompts
Not captured

## Metadata
- Owner: io.github.cyanheads
- Version: 0.1.7
- Runtime: Npm
- Transports: STDIO, HTTP
- License: Not captured
- Language: Not captured
- Stars: Not captured
- Updated: Jul 27, 2026
- Source: https://registry.modelcontextprotocol.io
