Skip to main content
Glama

Server Details

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

Status
Healthy
Last Tested
Transport
Streamable HTTP
URL
Repository
cyanheads/openaq-mcp-server
GitHub Stars
1

Glama MCP Gateway

Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.

MCP client
Glama
MCP server

Full call logging

Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.

Tool access control

Enable or disable individual tools per connector, so you decide what your agents can and cannot do.

Managed credentials

Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.

Usage analytics

See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.

100% free. Your data is private.
Tool DescriptionsA

Average 4.6/5 across 7 of 7 tools scored.

Server CoherenceA
Disambiguation5/5

Each tool has a clearly distinct purpose: listing countries, listing parameters, finding locations, getting current readings, getting historical measurements, and managing DataCanvas tables for SQL queries. No two tools overlap in functionality.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with the 'openaq_' prefix (e.g., list_countries, get_readings, dataframe_query). No mixing of conventions.

Tool Count5/5

7 tools is well-scoped for an air quality data server, covering discovery, current conditions, historical data, and advanced SQL querying via DataCanvas. Not too few or too many.

Completeness4/5

The tool set covers the full data lifecycle for a read-only API: discovery (countries, parameters, locations), current readings, historical measurements, and custom SQL queries. Minor gaps like missing multi-parameter bulk retrieval are addressed by the DataCanvas tools.

Available Tools

7 tools
openaq_dataframe_describeopenaq-mcp-server: dataframe describe
Read-only
Inspect

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_) with its row count and column names. Requires DataCanvas to be enabled.

ParametersJSON Schema
NameRequiredDescriptionDefault
canvas_idYesDataCanvas id returned by openaq_get_measurements when a series spilled.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when the canvas holds no tables yet.
tablesYesTables currently staged on the canvas.
openaq_dataframe_queryopenaq-mcp-server: dataframe query
Read-only
Inspect

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_). 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SELECT. Reference tables by the names openaq_get_measurements returned (e.g. measurements_1701). Use openaq_dataframe_describe first to see table and column names.
canvas_idYesDataCanvas id returned by openaq_get_measurements when a series spilled.

Output Schema

ParametersJSON Schema
NameRequiredDescription
rowsYesResult rows (capped at the canvas row limit).
rowCountYesFull result count before the row cap.
openaq_find_locationsopenaq-mcp-server: find locations
Read-onlyIdempotent
Inspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
isoNoRestrict to a country by ISO 3166-1 alpha-2 code (e.g. "US", "IN", "DE"). Combine with bbox/coordinates to scope, or use alone for a country-wide list. Discover coverage with openaq_list_countries.
bboxNoBounding box as "minLon,minLat,maxLon,maxLat" (west,south,east,north). Alternative to coordinates+radius for area sweeps. Results have no distance field (no center point).
pageNoWhich page of results to return (1-based). Default 1. The only way past the 100-station cap: with limit 100, page 2 returns stations 101–200. Distance ordering applies within a page, not across pages, so paging is for iso/bbox sweeps — a near-me coordinates search should stay on page 1.
limitNoMax stations to return (1–100). Default 20. Results are ordered by distance when searching by coordinates.
radiusNoSearch radius in metres around coordinates (1–25000; the API hard-caps at 25000). Default 12000 (~12km). Only used with coordinates.
coordinatesNoCenter point as "latitude,longitude" (e.g. "47.6062,-122.3321"). Pair with radius for a near-me search. Resolve a place name to coordinates with openstreetmap-mcp-server or open-meteo geocode first. Provide either coordinates+radius OR bbox, not both.
parametersIdNoOnly return stations that measure this parameter id (e.g. 2 = PM2.5 µg/m³). Get ids from openaq_list_parameters — the same pollutant has several ids for different units. Narrows the station set; each returned station still lists all its sensors.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe limit that was applied.
shownNoNumber of stations returned.
noticeNoGuidance when OpenAQ reports a lower-bound total without the result set hitting the limit.
locationsYesMatching stations. Empty array means no monitoring coverage for the query — NOT clean air. Widen the radius, try openaq_list_countries, or use the modeled open-meteo air-quality tool.
truncatedNoTrue when the station list was capped at the limit.
totalCountYesTotal matching stations before the limit. A floor (not an exact count) when totalCountIsLowerBound is true.
totalCountIsLowerBoundNoTrue when OpenAQ reported a lower bound (">N"): totalCount is a floor and more stations match than the count shown.
openaq_get_measurementsopenaq-mcp-server: get measurements
Read-onlyIdempotent
Inspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows per page from the API (1–1000). Default 1000. The tool pages internally up to the spill threshold.
canvas_idNoDataCanvas id from a prior call to reuse the same canvas (e.g. to compare two stations' series side by side). Omit to start fresh; the response returns a new canvas_id when the series spills.
datetimeToNoEnd of the range, inclusive. Date "YYYY-MM-DD" covers that whole day (closes at 23:59:59Z) or full UTC "YYYY-MM-DDTHH:MM:SSZ". Must land after datetimeFrom — the two forms mix freely, so "2026-06-25" to "2026-06-25" is a valid one-day range. Omit for "up to now".
locationIdYesStation id from openaq_find_locations.
aggregationNoTime bucketing. "raw" = every reported value (often hourly at source). "hourly"/"daily" = server-side rollups with a statistical summary per bucket. Use "daily" for multi-month trends to keep the series small; "raw" for fine-grained recent analysis.raw
datetimeFromNoStart of the range, inclusive. Date "YYYY-MM-DD" (opens at 00:00:00Z that day) or full UTC "YYYY-MM-DDTHH:MM:SSZ". Omit to get the most recent values.
parametersIdYesParameter id to pull the series for (e.g. 2 = PM2.5 µg/m³). Get ids from openaq_list_parameters. Must be a parameter the station measures — find_locations lists each station's parameters.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoWhat limited this response, when something did — the row cap, a failed page, or DataCanvas being unavailable — plus how to reach the rest.
seriesYesThe (possibly previewed) series, newest or oldest first per the API. When truncated, this is a preview — query canvasId for the rows staged there.
canvasIdNoDataCanvas id holding the pulled series. Query with openaq_dataframe_query. The pull stops at 5000 rows, so this is the whole series only when totalCount is at or below that — read the notice, which says so when the cap or a failed page cut the pull short.
locationYesStation the series came from
rowCountYesRows in this response (preview length when spilled)
sensorIdYesResolved sensor id the series was pulled from
parameterYesWhat was measured, resolved from the station's sensor
tableNameNoCanvas table name for the staged series (e.g. "measurements_1701"). Reference it in SQL.
truncatedNoTrue when the series exceeded the inline limit, so series is a preview and the pulled rows were staged on canvasId. Absent/false when everything fit inline. It says nothing about whether the pull itself was complete — compare rowCount and totalCount, and read the notice.
totalCountYesTotal rows in the full series.
aggregationYesBucketing applied
openaq_get_readingsopenaq-mcp-server: get readings
Read-onlyIdempotent
Inspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
locationIdNoStation id from openaq_find_locations. Provide this OR coordinates. When set, returns the latest value for every sensor at this station.
coordinatesNoFallback "latitude,longitude" when you do not have a locationId — resolves to the nearest station (within 25km) that measures parametersId, then reads its latest values. Requires parametersId.
parametersIdNoRequired with coordinates: which parameter id the nearest station must measure (get ids from openaq_list_parameters). With locationId, optionally filters the returned values to this parameter id; omit to get all sensors.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when the station resolved but returned no recent values.
locationYesThe station these readings came from
readingsYesLatest value per sensor. An old datetime means the station reports infrequently or is stale — not that the value is current.
openaq_list_countriesopenaq-mcp-server: list countries
Read-onlyIdempotent
Inspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNoCase-insensitive filter over the bounded country catalog (~153) by code and name. A two-letter query is treated as an exact ISO 3166-1 alpha-2 code (e.g. "US" → United States); longer queries match as substrings (e.g. "united", "germany"). Omit to list all.
parametersIdNoOnly return countries that measure this parameter id somewhere (e.g. 2 = PM2.5 µg/m³) — the one-call answer to "which countries have NO2 monitoring?". Get ids from openaq_list_parameters; the same pollutant has several ids for different units. Composes with query.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when the query matched nothing.
countriesYesMatching countries with coverage metadata.
totalCountYesTotal countries matched after filtering.
openaq_list_parametersopenaq-mcp-server: list parameters
Read-onlyIdempotent
Inspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNoCase-insensitive filter over the bounded parameter catalog (~44) by code, display name, and description (e.g. "pm" for particulates, "ozone", "co"). Omit to list everything.
pollutantsOnlyNoWhen true, exclude meteorological/auxiliary parameters (temperature, humidity, wind, pressure, particle-count channels) and return only air pollutants. Default false (full catalog).

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when the query matched nothing.
parametersYesMatching parameters. Multiple rows can share a name with different ids/units — pick the id whose unit you want.
totalCountYesTotal parameters matched after filtering.

Discussions

No comments yet. Be the first to start the discussion!

Try in Browser

Your Connectors

Sign in to create a connector for this server.