mcp-airq
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-airq get air quality in the living room"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-airq
MCP server for air-Q air quality sensor devices. Enables Claude Desktop, Claude Code, and other MCP clients to directly query and configure air-Q devices on your local network.
Built on aioairq, the official async Python library for air-Q.
The same mcp-airq executable also works as a direct CLI when you pass a tool
name as a subcommand.
Installation
pip install mcp-airqOr run directly with uvx:
uvx mcp-airqRelated MCP server: aranet4-mcp-server
CLI Usage
Use the same command directly from the shell:
mcp-airq list-devices
mcp-airq get-air-quality --device "Living Room"
mcp-airq get-air-quality-history --device "Living Room" --last-hours 12 --sensors co2
mcp-airq plot-air-quality-history --sensor co2 --output-format png
mcp-airq export-air-quality-history --sensor co2 --output-format xlsx
mcp-airq set-night-mode --activated --device "Bedroom"For historical plots and exports:
omit
device,location, andgroupto combine all configured devices into one artifactuse
locationorgroupto combine only the matching devicesplot_air_quality_historyreturns one file per requested sensor, with one series per matching deviceexport_air_quality_historyreturns one CSV/XLSX file per request, with rows for all matching devices
The CLI subcommands mirror the MCP tool names. Both styles work:
mcp-airq list-devices
mcp-airq list_devicesTo force MCP server mode from an interactive terminal, run:
mcp-airq serveThe CLI is pipe-friendly: successful command output goes to stdout, while
tool errors go to stderr with exit code 1.
mcp-airq get-air-quality --device "Living Room" | jq '.co2'
mcp-airq get-air-quality --device "Living Room" --compact-json | jq '.co2'
mcp-airq get-air-quality --device "Living Room" --yaml | yq '.co2'Device Configuration
Create a JSON file with your device(s), e.g. ~/.config/airq-devices.json:
[
{"address": "192.168.4.1", "password": "your_password", "name": "air-Q Pro", "location": "Living Room", "group": "Home"},
{"address": "192.168.4.2", "password": "your_password", "name": "air-Q Radon", "location": "Living Room", "group": "Home"},
{"address": "office_air-q.local", "password": "other_pass", "name": "Office", "group": "Work"}
]Each entry requires:
address— IP address or mDNS hostname (e.g.abcde_air-q.local)password— Device password (default:airqsetup)name(optional) — Human-readable name; defaults to addresslocation(optional) — Physical room/area for grouping (e.g."Living Room")group(optional) — Second grouping dimension, orthogonal to location (e.g."Home","Work")
Then restrict access to the file (it contains passwords):
chmod 600 ~/.config/airq-devices.jsonAlternatively, pass the device list inline via the AIRQ_DEVICES environment variable as a JSON string.
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"airq": {
"command": "uvx",
"args": ["mcp-airq"],
"env": {
"AIRQ_CONFIG_FILE": "/home/you/.config/airq-devices.json"
}
}
}
}Claude Code
Register the server once via the CLI:
claude mcp add airq -e AIRQ_CONFIG_FILE=~/.config/airq-devices.json -- uvx mcp-airqThis writes to ~/.claude/settings.json and is automatically picked up by the Claude Code VSCode extension as well — no separate configuration needed.
If the server fails to connect: MCP servers run in a subprocess that may not inherit your shell's PATH. Replace
uvxwith its full path (which uvx→ e.g./home/you/.local/bin/uvx):claude mcp add airq -e AIRQ_CONFIG_FILE=~/.config/airq-devices.json -- /home/you/.local/bin/uvx mcp-airq
OpenAI Codex
Register the server once via the CLI:
codex mcp add airq --env AIRQ_CONFIG_FILE=~/.config/airq-devices.json -- uvx mcp-airqThis writes to ~/.codex/config.toml and is automatically picked up by the Codex VSCode extension as well.
If the server fails to connect: Use the full path to
uvx(see note above).
Available Tools
Read-Only
Tool | Description |
| List all configured air-Q devices (with location/group if set) |
| Get sensor readings — by |
| Get historical sensor data as column-oriented JSON |
| Render one historical chart per sensor across all matching devices |
| Export one historical sensor as one |
| Get device metadata (name, model, firmware version) |
| Get full device configuration |
| Get device log entries |
| Make device blink its LEDs for visual identification |
| Get current LED visualization theme |
| List all available LED visualization themes |
| Get current night mode configuration |
| Get current LED brightness configuration |
Configuration
Tool | Description |
| Rename a device |
| Change LED visualization (CO₂, VOC, Humidity, PM2.5, …) |
| Configure night mode schedule and settings |
| Adjust LED brightness (day/night) |
| Set static IP or switch to DHCP |
Device Control
Tool | Description |
| Restart the device (~30s downtime) |
| Shut down the device (manual restart required) |
Multi-Device Support
When multiple devices are configured, specify which device to query:
By exact name:
"air-Q Pro"By partial match (case-insensitive):
"pro","radon"
If only one device is configured, it is selected automatically.
Location and Group Queries
get_air_quality accepts two optional grouping parameters:
location— query all devices in the same room (e.g."Living Room")group— query all devices sharing a group tag (e.g."Home")
Both are independent: a device can have a location, a group, both, or neither. Matching is case-insensitive and substring-based.
get_air_quality(location="Living Room") → air-Q Pro + air-Q Radon
get_air_quality(group="Home") → air-Q Pro + air-Q Radon + …
get_air_quality(device="air-Q Radon") → just that one deviceExactly one of device, location, or group may be specified per call.
Historical Data
Three tools provide access to data stored on the device's SD card:
Plotting charts
plot_air_quality_history renders a chart for one sensor. When multiple devices
match, each device becomes a separate series in the same chart.

Single device (24 h, area chart, PNG)

Multiple devices at one location (24 h, area chart, PNG)
# Single device, last 24 hours (default), PNG output (default)
mcp-airq plot-air-quality-history --sensor co2 --device "Living Room"
# All devices at a location, custom time range, SVG output
mcp-airq plot-air-quality-history --sensor co2 --location "Living Room" \
--from-datetime "2026-03-16T00:00:00" --to-datetime "2026-03-17T00:00:00" \
--output-format svg --output co2.svg
# All configured devices, dark mode, line chart
mcp-airq plot-air-quality-history --sensor co2 --dark --chart-type line
# Save to file
mcp-airq plot-air-quality-history --sensor co2 --output co2_chart.pngOutput formats: png (default), webp, svg, html (interactive Plotly chart with hover tooltips and zoom)
Customization: --title, --x-axis-title, --y-axis-title, --chart-type (line/area), --dark, --timezone-name
Exporting data
export_air_quality_history produces one CSV or Excel file containing all matching devices.
# CSV export (default)
mcp-airq export-air-quality-history --sensor co2 --device "Living Room" --last-hours 48
# Excel export for all devices at a location
mcp-airq export-air-quality-history --sensor radon --location "Home" \
--output-format xlsx --output radon.xlsxQuerying raw JSON
get_air_quality_history returns column-oriented JSON, useful for programmatic analysis.
mcp-airq get-air-quality-history --device "Living Room" --last-hours 12 \
--sensors co2 pm2_5 --max-points 150Common parameters
Parameter | Default | Description |
| 1 (history) / 24 (plot) | Hours of data to retrieve |
| — | ISO 8601 time range (overrides |
| 300 | Downsample to at most N evenly spaced points |
| UTC | IANA timezone for timestamps (e.g. |
Example Prompts
"How is the air quality in the living room?" — queries all devices at that location
"What's the air quality at home?" — queries all devices in the "Home" group
"Show the CO₂ trend over the last 12 hours as SVG"
"Export the radon history from yesterday as Excel"
"Show me the radon level" — targets the air-Q Radon device by name
"Show CO₂ on the LEDs"
"Enable night mode from 10 PM to 7 AM"
"Set brightness to 50%"
"What's in the device log?"
"Make the air-Q blink"
Development
git clone https://github.com/CorantGmbH/mcp-airq.git
cd mcp-airq
uv sync --frozen --extra dev
uv run pre-commit install
uv run pytestThe repository uses a project-local .venv plus uv.lock for reproducible tooling.
Run all developer commands through uv run, for example:
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pre-commit run --all-filesRelease Process
Update
versioninpyproject.toml.Commit and create a matching Git tag like
v0.1.1.Publish a GitHub Release from that tag.
The publish workflow validates that the release tag matches pyproject.toml, uploads the package to PyPI, and then publishes the same version to the MCP Registry.
License
Apache License 2.0 — see LICENSE.
Available Tools
20 toolsconfigure_networkADestructiveIdempotent
Configure network settings. Set dhcp=True for DHCP, or provide ip/subnet/gateway/dns for static IP.
After changing network settings, the device must be restarted.
Inputs: dhcp, ip, subnet, gateway, +2 more. Returns: result
export_air_quality_historyARead-only
Export historical air-Q sensor data as CSV or Excel.
Selector:
- `device` — one specific device
- `location` — all devices at one location
- `group` — all devices in one group
- if none is specified, all configured devices are exported together
OUTPUT FORMAT:
- "csv" — one UTF-8 CSV file containing all selected devices
- "xlsx" — one Excel workbook containing all selected devices
REQUIRED:
- sensor: one sensor key to export, for example `co2`, `pm2_5`, `radon`
TIME RANGE:
- `last_hours` or `from_datetime` / `to_datetime`
- `timezone_name` controls how timestamps are rendered in the exported file
Inputs: sensor (required), device, location, group, +6 more.
get_air_qualityARead-only
Get current air quality sensor readings from one or more devices.
Specify exactly one of:
- 'device' — query a single device by name
- 'location' — query all devices at a given location (e.g. "Wohnzimmer")
- 'group' — query all devices in a group (e.g. "zu Hause")
When using 'location' or 'group', the response contains one entry per
device. Returns sensor names mapped to values. Set return_average=True
for time-averaged data (recommended) or False for instantaneous readings.
The response includes a _sensor_guide field with full unit and index
documentation — read it before interpreting any values.
Inputs: device, location, group, return_average, +2 more. Returns: result
get_air_quality_historyARead-only
Get historical air quality data stored on the device's SD card.
IMPORTANT — 'sensors' must be a JSON array, not a plain string.
Correct: sensors=["pm1","pm2_5"]
Wrong: sensors="pm1"
IMPORTANT — response size: air-Q records every ~2 minutes, so long ranges
produce large responses (24 h ≈ 720 readings × ~25 sensors). Always use
'sensors' and 'max_points' when querying more than 1–2 hours to stay within
response size limits. Example for a 24 h chart: sensors=["pm1","pm2_5","pm10"],
max_points=150.
Time range — specify one of:
- 'last_hours' — data from the last N hours (default: 1 hour)
- 'from_datetime' / 'to_datetime' — ISO 8601 strings
(e.g. "2026-03-10T14:00:00" or "2026-03-10T14:00:00+01:00")
'from_datetime' takes precedence over 'last_hours'.
'to_datetime' defaults to now.
- 'timezone_name' — optional IANA timezone such as "Europe/Berlin".
Naive datetimes are interpreted in this timezone. Output timestamps are
localized into `datetime` using the same timezone.
Optional filtering:
- 'sensors' — list of sensor names to include (e.g. ["pm1", "pm2_5", "pm10"]).
Omit to get all sensors.
- 'max_points' — downsample to at most this many evenly spaced points.
Response: column-oriented JSON with `timestamp` (Unix seconds) and localized
`datetime` columns. Compound sensor values like `[value, quality]` are split
into `<sensor>` and `<sensor>_quality`. Includes `_sensor_guide` and
`_history_guide`.
Inputs: device, last_hours, from_datetime, to_datetime, +3 more. Returns: result
get_brightness_configBRead-only
Get the current LED brightness configuration (day and night values) of a device.
Inputs: device. Returns: result
get_configARead-only
Get the full configuration of a device as a JSON dict.
The response includes a _config_guide field with full documentation of
all configuration keys — read it before interpreting or modifying values.
Inputs: device. Returns: result
get_device_infoARead-only
Get device metadata: ID, name, model, firmware/hardware version, and suggested area.
Inputs: device. Returns: result
get_led_themeBRead-only
Get the current LED visualization theme for both sides of a device.
Inputs: device. Returns: result
get_logsCRead-only
Get log entries from a device.
Inputs: device. Returns: result
get_night_modeBRead-only
Get the current night mode configuration of a device.
Inputs: device. Returns: result
get_possible_led_themesARead-only
List all available LED visualization themes for a device.
Inputs: device. Returns: result
identify_deviceBRead-only
Make a device blink its LEDs in rainbow colors for visual identification. Returns the device ID.
Inputs: device. Returns: result
list_devicesARead-only
List all configured air-Q devices with their names, addresses, locations, and groups.
Inputs: no named parameters. Returns: result
plot_air_quality_historyARead-only
Generate a chart of historical air-Q sensor data.
WHEN TO USE THIS TOOL: Call this whenever the user asks to see a graph,
chart, plot, or visual representation of historical sensor data.
Selector:
- `device` — one specific device
- `location` — all devices at one location
- `group` — all devices in one group
- if none is specified, all configured devices are plotted together
OUTPUT FORMAT:
- "png" (default) — one inline image containing all selected devices
- "webp" — inline image with smaller payload size
- "svg" — vector graphic as downloadable MCP resource
- "html" — self-contained interactive HTML as downloadable MCP resource
REQUIRED:
- sensor: the sensor key to visualise (one sensor per chart)
TIME RANGE:
- `last_hours` or `from_datetime` / `to_datetime`
- `timezone_name` controls how timestamps are rendered on the X axis and
how naive input datetimes are interpreted
Inputs: sensor (required), device, location, group, +11 more.
restart_deviceBDestructive
Restart a device. It will be unreachable for about 30 seconds.
Inputs: device. Returns: result
set_brightnessAIdempotent
Set LED brightness. 'default' is the normal brightness (0-100%), 'night' is optional night brightness.
Inputs: default (required), night, device. Returns: result
set_device_nameBIdempotent
Rename a device. The new name appears on the device display.
Inputs: name (required), device. Returns: result
set_led_themeAIdempotent
Set the LED visualization theme for one or both sides of the device.
Common themes: 'standard', 'CO2', 'VOC', 'Humidity', 'PM2.5', 'Noise'.
Use get_possible_led_themes to see all available themes.
Inputs: left, right, device. Returns: result
set_night_modeAIdempotent
Configure night mode. Times in 'HH:mm' format (UTC).
brightness_day/brightness_night are percentages (0-100).
fan_night_off disables the particle sensor fan at night.
wifi_night_off caches data to SD and uploads when wifi returns.
alarm_night_off disables acoustic warnings (fire/gas still trigger).
Inputs: activated (required), start_night, start_day, brightness_day, +5 more. Returns: result
shutdown_deviceADestructive
Shut down a device. It must be manually powered on again. Only use if explicitly requested.
Inputs: device. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a distinct action on air-Q devices: network config, data export, current/historical readings, configuration get/set, device management, and plotting. No two tools have overlapping purposes.
All 20 tools follow a consistent verb_noun pattern (e.g., configure_network, get_air_quality, set_night_mode). No mixing of styles or vague verbs.
20 tools is slightly above the ideal range but each tool serves a clear purpose in the air quality monitoring domain. The count does not feel excessive given the breadth of functionality (configuration, data retrieval, device control).
The tool surface covers device management, configuration, data export, and visualization. Minor gaps exist (e.g., no firmware update or sensor calibration), but essential CRUD and lifecycle operations are present.
Maintenance
Related MCP Connectors
QuLab MCP remote server (Streamable HTTP) for computational science and lab tools.
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
MCP server for the Seline Analytics API
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server for Airthings air quality monitoring devices.127 npmISC
- FlicenseNot gradedqualityCmaintenanceMCP server to manage your Aranet4 CO2 sensor, enabling scanning, data fetching, historical querying, and plotting.4-
- AlicenseNot gradedqualityCmaintenanceMCP server for the air-Q Cloud API, enabling remote retrieval of air quality sensor data and historical analysis through read-only tools like listing devices, fetching readings, and exporting charts or data.46 PyPIApache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for querying connected WiFi devices from MikroTik RouterOS, enriched with DHCP leases and ARP table entries.MIT