Openaq

v0.2.1
io.github.pipeworx-io/openaq Checked 14 hours ago Published 28 days ago

OpenAQ MCP — global air-quality measurements via the OpenAQ v3 API.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

air_quality_near

Get the latest air-quality readings (PM2.5, PM10, O3, NO2, SO2, CO, etc.) at the monitoring station NEAREST to a latitude/longitude. PREFER for "air quality near me", "what is the air quality at <coordinates>", "is the air bad in <place> right now". Returns the nearest station with its most recent pollutant values, plus other nearby stations.

ParameterTypeDescription
latitude *numberLatitude in decimal degrees (e.g., 40.785).
longitude *numberLongitude in decimal degrees (e.g., -73.968).
_apiKeystringOpenAQ API key (optional; the gateway supplies one).
radius_kmnumberSearch radius in km (default 12, max 25 — OpenAQ limit).

find_stations

Find OpenAQ air-quality monitoring stations by location: a city or place name, coordinates+radius (nearest first), a country (ISO 3166-1 alpha-2 code), or a bounding box. Returns station id, name, country, coordinates, and the pollutants each measures (with sensor ids), plus resolved_place echoing the coordinates a city name resolved to. This is the first step for a historical series: find the station here, then pass its sensor_id to get_measurements. At least one location argument is required — the tool will not return an unfiltered global list.

ParameterTypeDescription
_apiKeystringOpenAQ API key (optional; the gateway supplies one).
bboxstringBounding box "minLon,minLat,maxLon,maxLat" to search within.
citystringCity or place name, e.g. "Delhi", "Los Angeles", "Kraków". Geocoded to coordinates, then searched by radius. Add the country for ambiguous names ("Cambridge, UK").
countrystringISO 3166-1 alpha-2 country code (e.g. "US", "IN", "GB").
latitudenumberLatitude for a radius search (use with longitude).
limitnumberMax stations to return (1-100, default 20).
longitudenumberLongitude for a radius search (use with latitude).
radius_kmnumberRadius in km for a coordinate or city search (default 12, max 25).

get_latest

Get the latest reading for every pollutant at a specific OpenAQ station (by location id from find_stations). Returns each parameter (PM2.5, O3, NO2, etc.) with its value, units, and measurement time.

ParameterTypeDescription
location_id *numberOpenAQ location/station id (from find_stations or air_quality_near).
_apiKeystringOpenAQ API key (optional; the gateway supplies one).

get_measurements

Get the most recent time series (hourly or daily aggregates) for a single OpenAQ sensor (sensor id from find_stations), newest first. Use for pollutant trends over time at one station/parameter. Returns the sensor's LAST `limit` readings — note that many OpenAQ sensors are archived and stopped reporting years ago, so "most recent" can legitimately be several years old: always read the returned timestamps rather than assuming the data is current. Use find_stations or get_latest to pick a sensor that is still reporting.

ParameterTypeDescription
sensor_id *numberOpenAQ sensor id (a station+parameter pair, from find_stations).
_apiKeystringOpenAQ API key (optional; the gateway supplies one).
limitnumberHow many of the most recent data points to return (1-1000, default 24).
periodstringAggregation: "hours" (default) or "days".