Unreachable. The endpoint has not answered since 12 Oct.
Find air-quality stations and read pollutant observations from government monitors via OpenAQ v3.
One address for any MCP client. No sign-in needed on this server.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Odel could not list its tools without signing in.
Find air-quality monitoring stations, read latest sensor values, and pull historical pollutant series via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://openaq.caseyjhand.com/mcp
Measured air quality from the OpenAQ v3 API: physical-sensor observations from government reference monitors and research-grade sensors worldwide. Find monitoring stations, read current values, and pull historical pollutant series from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
| Tool | Description |
|---|---|
openaq_find_locations | Find monitoring stations near a point, in a bounding box, or by country; the location ids the other tools take |
openaq_get_readings | Latest value for every sensor at a station, labeled with its pollutant and unit |
openaq_get_measurements | Historical series for one pollutant at one station, raw or rolled up hourly/daily |
openaq_list_parameters | Pollutant catalog with canonical units; maps a pollutant and unit to its parameter id |
openaq_list_countries | Country coverage: data span and the parameters measured in each |
openaq_dataframe_describe | List the tables and columns staged on a DataCanvas |
openaq_dataframe_query | Run a read-only SQL SELECT over staged measurement series |
openaq_dataframe_drop | Delete a complete staged canvas; opt-in with OPENAQ_ENABLE_CANVAS_DROP=true |
| Resource | Description |
|---|---|
openaq://location/{locationId} | Metadata for one station: coordinates, provider, sensors with units, data span |
openaq://parameters | Full pollutant and unit catalog |
Both resources mirror tool output, so tool-only clients lose nothing.
openaq_find_locations toolcoordinates with radius (metres, 1–25000, default 12000), bbox, and/or iso (a code from openaq_list_countries); at least one is required, and coordinates and bbox exclude each other. parametersId, monitor, mobile, and providersId narrow further; up to 100 stations per page (limit, default 20), 1-based pageid, distanceMeters (coordinate search only), provider/providerId, isMonitor/isMobile, its parameters with units, and the datetimeFirst/datetimeLast span; coordinates, country, and provider are null when OpenAQ lists nonetotalCount counts stations through the current page and is a floor when totalCountIsLowerBound is set; no match fails as no_locations_found, a page past the end as page_exhaustedopenaq_get_readings toollocationId, or coordinates plus parametersId to resolve the nearest station within 25 km that measures it (compared across up to 1,000 matching stations; a full 1,000 adds a notice); with locationId, parametersId optionally filters to one parametervalue, unit, sensorId, and datetimeUtc/datetimeLocal, plus the station's provider, providerId, timezone, and datetimeLastlocation_not_found, parameter_not_at_location (with the station's available ids), no_station_near_coordinates, no_recent_valuesopenaq_get_measurements toollocationId and parametersId; datetimeFrom/datetimeTo accept UTC timestamps or station-local YYYY-MM-DD dates (UTC days when the station has no timezone). aggregation is raw (default), hourly, or daily; up to 5,000 rows per callseries, sensorId, pulledCount, pullComplete, effectiveRange, and station provider, providerId, and timezone. totalCount is a floor when totalCountIsLowerBound is set; rollups add summary statistics, gapCount, the first 20 missing intervals as gaps, and a notice when edge buckets are clippedseries is a preview (truncated) and the pulled rows stage on a DataCanvas as measurements_<sensorId> (canvasId, tableName) when CANVAS_PROVIDER_TYPE=duckdb; a supplied canvas_id stages onto that canvas at any size. One table per sensor: a second sensor adds a table to join against, and re-staging the same sensor overwrites its earlier seriesopenaq_list_parameters toolquery over code, display name, and description; pollutantsOnly drops meteorological and particle-count channelsid, name, displayName, unit, and description; one pollutant can appear under several ids by unit (CO is 4 in µg/m³, 8 in ppm, 102 in ppb)openaq_list_countries toolquery (a two-letter value matches an ISO 3166-1 alpha-2 code first; otherwise code or name substrings match) and parametersId; up to 100 per page (limit, default 20), 1-based pagecode (the iso value for openaq_find_locations), name, the datetimeFirst/datetimeLast span, and the parameters measured anywhere in the country; totalCount is the full filtered countopenaq_dataframe_describe toolcanvas_id from openaq_get_measurements and returns each staged table's name, rowCount, and columns. Call it before openaq_dataframe_query: the staged table is flat (min, sd) while the inline series nests those under summarycanvas_unavailable unless CANVAS_PROVIDER_TYPE=duckdb, or canvas_not_found for an unknown or expired idopenaq_dataframe_query toolcanvas_id and one read-only SELECT; writes, DDL, and file/network table functions are rejectedtruncated set when the cap cut the result; page with ORDER BY plus LIMIT/OFFSETcanvas_unavailable, canvas_not_found, or missing_tableopenaq_dataframe_drop toolOPENAQ_ENABLE_CANVAS_DROP=true; calls fail as canvas_unavailable unless CANVAS_PROVIDER_TYPE=duckdb. When disabled, the HTTP landing page shows the enable hint and tools/list omits the toolcanvas_id and deletes that whole canvas, including all staged tables. Other agents sharing the id lose access; OpenAQ's source data is unaffectedcanvasId and dropped: true when deleted, false when no reachable canvas exists. With authentication off, callers share a tenant: anyone holding an id can delete its canvas when enabledopenaq://location/{locationId} resourceapplication/json: name, locality, timezone, country, provider, isMonitor/isMobile, coordinates, sensors (each with parameterId and unit), and the datetimeFirst/datetimeLast spanlocationId comes from openaq_find_locations; cached 5 minutesopenaq://parameters resourceapplication/json catalog, the same rows as an unfiltered openaq_list_parametersBuilt on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
OpenAQ-specific:
X-API-Key auth, retry with backoff, and typed upstream failures (invalid_api_key, rate_limited, upstream_timeout, upstream_error) on every OpenAQ callcanvas_id can be joinedAgent-friendly output:
no_locations_found or no_station_near_coordinates, stated as no coverage rather than clean airparametersId selects pollutant and unit togetherdatetimeLast, and totalCount / truncated / notice on capped resultsA public instance is available at https://openaq.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"openaq-mcp-server": {
"type": "streamable-http",
"url": "https://openaq.caseyjhand.com/mcp"
}
}
}
Add the following to your MCP client configuration file.
{
"mcpServers": {
"openaq-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/openaq-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"OPENAQ_API_KEY": "your-api-key"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"openaq-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/openaq-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"OPENAQ_API_KEY": "your-api-key"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"openaq-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "OPENAQ_API_KEY=your-api-key",
"ghcr.io/cyanheads/openaq-mcp-server:latest"
]
}
}
}
Add "CANVAS_PROVIDER_TYPE": "duckdb" to env to enable DataCanvas SQL over large measurement series.
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 OPENAQ_API_KEY=your-api-key bun run start:http
# Server listens at http://localhost:3010/mcp
git clone https://github.com/cyanheads/openaq-mcp-server.git
cd openaq-mcp-server
bun install
cp .env.example .env
# edit .env and set OPENAQ_API_KEY
| Variable | Description | Default |
|---|---|---|
OPENAQ_API_KEY | Required. OpenAQ v3 API key, sent as the X-API-Key header. | — |
OPENAQ_API_BASE_URL | OpenAQ v3 API base URL, for a proxy or test mirror. | https://api.openaq.org/v3 |
CANVAS_PROVIDER_TYPE | duckdb stages large measurement series for SQL via the dataframe tools; without it, large series return a preview plus a notice. The .mcpb bundle ships without DuckDB, so use npm, npx, or Docker for canvas work. | none |
OPENAQ_ENABLE_CANVAS_DROP | Enable openaq_dataframe_drop to delete entire canvases and release their resources. Requires DuckDB; an id shared with another agent grants deletion access within the same tenant. | false |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_SESSION_MODE | HTTP session mode: stateless, stateful, or auto. Overrides the server's explicit stateless posture; auto resolves to stateful. | stateless |
MCP_AUTH_MODE | Authentication: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, warning, error, etc.). | info |
OTEL_ENABLED | Enable OpenTelemetry. | false |
OTEL_EXPORTER_OTLP_ENDPOINT | OTLP base URL; traces use /v1/traces and metrics use /v1/metrics. Signal-specific endpoints override it. | — |
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Opt into OTLP log export with a full endpoint URL. The base endpoint never enables logs. | — |
LOG_TOOL_FAILURE_PAYLOADS | Log failed calls' arguments and results. Redacts by key name only; secrets in free-form values remain. | false |
LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES | UTF-8 byte cap per logged failure payload. | 16384 |
See .env.example for the full list of optional overrides.
Build and run:
bun run rebuild
bun run start:http # or start:stdio
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security, changelog sync
bun run test # Vitest test suite
bun run lint:mcp # Validate MCP definitions against spec
docker build -t openaq-mcp-server .
docker run --rm -e OPENAQ_API_KEY=your-api-key -p 3010:3010 openaq-mcp-server
The image defaults to HTTP transport, stateless session mode, and logs to /var/log/openaq-mcp-server. DuckDB ships in the image, so DataCanvas works once CANVAS_PROVIDER_TYPE=duckdb is set. OpenTelemetry peer dependencies are installed by default; build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point: registers tools and resources, wires the service and canvas. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools | Tool definitions (definitions/*.tool.ts) and shared input, error, and format helpers (shared/). |
src/mcp-server/resources | Resource definitions (definitions/*.resource.ts). |
src/services | OpenAQ v3 client and domain types (openaq/), plus the DataCanvas accessor. |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md / AGENTS.md for development guidelines and architectural rules. The short version:
ctx.log for request-scoped logging, ctx.state for tenant-scoped storagecreateApp() arraysIssues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
Data comes from the OpenAQ platform, and attribution to OpenAQ is required when using this server's output (Terms of Use). OpenAQ aggregates measurements from government agencies, research institutions, and other networks, each of which may set its own attribution or licensing terms. The provider field on openaq_find_locations, openaq_get_readings, and openaq_get_measurements results and the openaq://location/{locationId} resource names the originating network; review and follow the terms of any provider whose data you use.