Openaq MCP Server logo

Openaq MCP Server

Query OpenAQ v3 for monitoring stations, current readings, historical pollutant data, and read-only staged-series analysis.

Install Openaq MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "openaq-mcp-server": {
      "command": "bunx",
      "args": [
        "@cyanheads/openaq-mcp-server@latest"
      ],
      "env": {
        "OPENAQ_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

bunx @cyanheads/openaq-mcp-server@latest

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 13d ago.

Overview

openaq-mcp-server MCP server connects MCP clients to OpenAQ v3 air-quality data from government monitors and research-grade sensors. It finds stations, retrieves current sensor values, resolves pollutant parameters and country coverage, and returns historical series with optional hourly or daily aggregation. Measurement results can be staged on a DuckDB-backed DataCanvas for read-only SQL queries. Use it when an agent needs location-aware air-quality observations or structured pollutant time series through stdio, Streamable HTTP, or the hosted endpoint.

Use cases

  • Find monitoring stations near a set of coordinates
  • Read the latest pollutant values from a station
  • Retrieve hourly or daily historical measurements
  • Compare staged sensor series with read-only SQL
  • Check pollutant and country coverage before querying

Key features

  • OpenAQ v3 station and sensor queries
  • Current and historical pollutant observations
  • Geographic, country, provider, and parameter filters
  • Hourly and daily measurement aggregation
  • DuckDB-backed DataCanvas staging and SQL queries
  • Stdio and Streamable HTTP transports

Tools8

What Openaq MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~194 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

9/9 checks healthy over the last 53d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · @cyanheads/openaq-mcp-server@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads570Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed8Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Openaq MCP Server works

What openaq-mcp-server MCP server does

The openaq-mcp-server MCP server exposes OpenAQ v3 air-quality data to MCP clients. It can locate monitoring stations by coordinates, radius, bounding box, or country, then use the resulting location IDs to retrieve sensor data. Station results include provider details, coordinates when available, monitor or mobile status, measured parameters, and the available data span.

Current observations come from openaq_get_readings, which returns one latest value per sensor with pollutant labels, units, timestamps, and station metadata. For analysis over time, openaq_get_measurements retrieves a single pollutant series for a station. Results may be raw or aggregated hourly or daily, with range and gap information included for rolled-up data.

The server also provides parameter and country catalogs. These help an agent convert a pollutant and unit into the parameter ID required by measurement calls, or identify countries with coverage for a given parameter.

Tools and capabilities

The openaq-mcp-server MCP server includes tools for:

  • Finding stations using geographic filters, country codes, provider IDs, monitor status, mobile status, and parameter IDs.
  • Reading the latest value from every sensor at a station, or resolving a nearby station for specified coordinates and a parameter.
  • Retrieving up to 5,000 measurement rows per call with UTC or station-local date ranges.
  • Listing pollutant definitions, canonical units, country coverage, measurement spans, and available parameters.
  • Describing staged DataCanvas tables and columns.
  • Running read-only SQL SELECT queries against staged measurement data.
  • Optionally deleting an entire staged canvas when canvas deletion is enabled.

Two resources are also available: one exposes metadata for a location ID, and the other exposes the complete parameter and unit catalog. Clients that only support tools can use the equivalent tool output.

How it works

Run the server as a stdio process, a local Streamable HTTP service, or use the public hosted MCP endpoint. The normal workflow is to search for a station, inspect its parameters, and pass the selected location and parameter IDs to a readings or measurements call. A coordinate-based readings request can instead find the nearest matching station within 25 kilometers.

Large measurement results are previewed in the direct response after the first 100 rows. When DuckDB canvas support is enabled, the pulled series is staged in a table named for its sensor. A caller can provide a canvas ID to place multiple sensor series together, describe the resulting tables, and query them with read-only SQL. Query responses are capped at 200 rows and can be paged with ORDER BY, LIMIT, and OFFSET.

Setup and configuration

The package can be installed for MCP clients with npx -y @cyanheads/openaq-mcp-server. Set OPENAQ_API_KEY in the client configuration. The README also provides installation links for Claude Desktop, Cursor, and VS Code, along with a hosted endpoint at https://openaq.caseyjhand.com/mcp.

Canvas features require CANVAS_PROVIDER_TYPE=duckdb. The destructive canvas tool is registered only when OPENAQ_ENABLE_CANVAS_DROP=true; enabling it allows callers with a canvas ID to delete all staged tables in that canvas. The server supports Docker as well as the package-based installation described in the project materials.

Limitations and notes

Station searches return at most 100 stations per page, while measurement calls return at most 5,000 rows. Counts may be lower bounds in some paginated or large-result responses. A historical series can be truncated in the inline response even though its rows have been staged for later querying.

DataCanvas IDs can expire, and canvas operations fail when the configured provider is unavailable. Dropping a canvas does not change OpenAQ source data, but it removes every staged table and affects other agents sharing that ID. When authentication is disabled, anyone holding the ID can delete the canvas if deletion is enabled. The service reports typed errors for missing stations, unavailable parameters, absent recent values, unknown canvases, and missing tables.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Openaq MCP Server

openaq-mcp-server is an MCP server that connects AI clients to the OpenAQ v3 air-quality API. Its main tools find monitoring locations, read latest sensor values, retrieve historical pollutant measurements, list parameters and countries, and query staged measurement data with read-only SQL when DataCanvas is enabled.

Install it with `npx -y @cyanheads/openaq-mcp-server` and configure `OPENAQ_API_KEY` in the MCP client. The project also provides Docker support, a hosted Streamable HTTP endpoint, and setup links for Claude Desktop, Cursor, and VS Code.

Use `openaq_find_locations` with coordinates and an optional radius, or use `openaq_get_readings` with coordinates and a parameter ID to resolve the nearest matching station. Coordinate searches support distances up to 25,000 meters for location discovery.

Yes, `openaq_get_measurements` returns a historical series for one station and pollutant. Supply a location ID, parameter ID, and optional date range, then choose raw, hourly, or daily aggregation. Larger results can be staged on a DuckDB DataCanvas for read-only SQL analysis.

Yes, the README provides a Cursor installation link for this server. Configure the MCP entry with the package command and an `OPENAQ_API_KEY`, or connect Cursor to the hosted Streamable HTTP endpoint.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOpenaq MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/openaq-mcp-server?style=directory)](https://allmcps.com/mcp/openaq-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/openaq-mcp-server"><img src="https://allmcps.com/api/badge/openaq-mcp-server?style=directory" alt="Openaq MCP Server on AllMCPs" /></a>