openaq-mcp-server
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.
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.
Tool Definition Quality
Average 4.6/5 across 7 of 7 tools scored.
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.
All tools follow a consistent verb_noun pattern with the 'openaq_' prefix (e.g., list_countries, get_readings, dataframe_query). No mixing of conventions.
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.
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 toolsopenaq_dataframe_describeopenaq-mcp-server: dataframe describeRead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| canvas_id | Yes | DataCanvas id returned by openaq_get_measurements when a series spilled. |
Output Schema
| Name | Required | Description |
|---|---|---|
| notice | No | Guidance when the canvas holds no tables yet. |
| tables | Yes | Tables currently staged on the canvas. |
openaq_dataframe_queryopenaq-mcp-server: dataframe queryRead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Read-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_id | Yes | DataCanvas id returned by openaq_get_measurements when a series spilled. |
Output Schema
| Name | Required | Description |
|---|---|---|
| rows | Yes | Result rows (capped at the canvas row limit). |
| rowCount | Yes | Full result count before the row cap. |
openaq_find_locationsopenaq-mcp-server: find locationsRead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| iso | No | Restrict 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. | |
| bbox | No | Bounding 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). | |
| page | No | Which 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. | |
| limit | No | Max stations to return (1–100). Default 20. Results are ordered by distance when searching by coordinates. | |
| radius | No | Search radius in metres around coordinates (1–25000; the API hard-caps at 25000). Default 12000 (~12km). Only used with coordinates. | |
| coordinates | No | Center 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. | |
| parametersId | No | Only 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
| Name | Required | Description |
|---|---|---|
| cap | No | The limit that was applied. |
| shown | No | Number of stations returned. |
| notice | No | Guidance when OpenAQ reports a lower-bound total without the result set hitting the limit. |
| locations | Yes | Matching 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. |
| truncated | No | True when the station list was capped at the limit. |
| totalCount | Yes | Total matching stations before the limit. A floor (not an exact count) when totalCountIsLowerBound is true. |
| totalCountIsLowerBound | No | True 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 measurementsRead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows per page from the API (1–1000). Default 1000. The tool pages internally up to the spill threshold. | |
| canvas_id | No | DataCanvas 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. | |
| datetimeTo | No | End 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". | |
| locationId | Yes | Station id from openaq_find_locations. | |
| aggregation | No | Time 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 |
| datetimeFrom | No | Start 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. | |
| parametersId | Yes | Parameter 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
| Name | Required | Description |
|---|---|---|
| notice | No | What limited this response, when something did — the row cap, a failed page, or DataCanvas being unavailable — plus how to reach the rest. |
| series | Yes | The (possibly previewed) series, newest or oldest first per the API. When truncated, this is a preview — query canvasId for the rows staged there. |
| canvasId | No | DataCanvas 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. |
| location | Yes | Station the series came from |
| rowCount | Yes | Rows in this response (preview length when spilled) |
| sensorId | Yes | Resolved sensor id the series was pulled from |
| parameter | Yes | What was measured, resolved from the station's sensor |
| tableName | No | Canvas table name for the staged series (e.g. "measurements_1701"). Reference it in SQL. |
| truncated | No | True 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. |
| totalCount | Yes | Total rows in the full series. |
| aggregation | Yes | Bucketing applied |
openaq_get_readingsopenaq-mcp-server: get readingsRead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| locationId | No | Station id from openaq_find_locations. Provide this OR coordinates. When set, returns the latest value for every sensor at this station. | |
| coordinates | No | Fallback "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. | |
| parametersId | No | Required 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
| Name | Required | Description |
|---|---|---|
| notice | No | Guidance when the station resolved but returned no recent values. |
| location | Yes | The station these readings came from |
| readings | Yes | Latest 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 countriesRead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Case-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. | |
| parametersId | No | Only 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
| Name | Required | Description |
|---|---|---|
| notice | No | Guidance when the query matched nothing. |
| countries | Yes | Matching countries with coverage metadata. |
| totalCount | Yes | Total countries matched after filtering. |
openaq_list_parametersopenaq-mcp-server: list parametersRead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Case-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. | |
| pollutantsOnly | No | When true, exclude meteorological/auxiliary parameters (temperature, humidity, wind, pressure, particle-count channels) and return only air pollutants. Default false (full catalog). |
Output Schema
| Name | Required | Description |
|---|---|---|
| notice | No | Guidance when the query matched nothing. |
| parameters | Yes | Matching parameters. Multiple rows can share a name with different ids/units — pick the id whose unit you want. |
| totalCount | Yes | Total parameters matched after filtering. |
Claim this connector by publishing a /.well-known/glama.json file on your server's domain with the following structure:
{
"$schema": "https://glama.ai/mcp/schemas/connector.json",
"maintainers": [{ "email": "your-email@example.com" }]
}The email address must match the email associated with your Glama account. Once published, Glama will automatically detect and verify the file within a few minutes.
Control your server's listing on Glama, including description and metadata
Access analytics and receive server usage reports
Get monitoring and health status updates for your server
Feature your server to boost visibility and reach more users
For users:
Full audit trail – every tool call is logged with inputs and outputs for compliance and debugging
Granular tool control – enable or disable individual tools per connector to limit what your AI agents can do
Centralized credential management – store and rotate API keys and OAuth tokens in one place
Change alerts – get notified when a connector changes its schema, adds or removes tools, or updates tool definitions, so nothing breaks silently
For server owners:
Proven adoption – public usage metrics on your listing show real-world traction and build trust with prospective users
Tool-level analytics – see which tools are being used most, helping you prioritize development and documentation
Direct user feedback – users can report issues and suggest improvements through the listing, giving you a channel you would not have otherwise
The connector status is unhealthy when Glama is unable to successfully connect to the server. This can happen for several reasons:
The server is experiencing an outage
The URL of the server is wrong
Credentials required to access the server are missing or invalid
If you are the owner of this MCP connector and would like to make modifications to the listing, including providing test credentials for accessing the server, please contact support@glama.ai.
Discussions
No comments yet. Be the first to start the discussion!