Labsco
CorantGmbH logo

air-Q

from CorantGmbH

Allows easy local access to air-Q devices for retrieving air quality data

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

mcp-airq

Total Downloads

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.

OpenAI Codex

Register the server once via the CLI:

codex mcp add airq --env AIRQ_CONFIG_FILE=~/.config/airq-devices.json -- uvx mcp-airq

This 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

ToolDescription
list_devicesList all configured air-Q devices (with location/group if set)
get_air_qualityGet sensor readings โ€” by device, location, or group
get_air_quality_historyGet historical sensor data as column-oriented JSON
plot_air_quality_historyRender one historical chart per sensor across all matching devices
export_air_quality_historyExport one historical sensor as one csv/xlsx across matching devices
get_device_infoGet device metadata (name, model, firmware version)
get_configGet full device configuration
get_logsGet device log entries
identify_deviceMake device blink its LEDs for visual identification
get_led_themeGet current LED visualization theme
get_possible_led_themesList all available LED visualization themes
get_night_modeGet current night mode configuration
get_brightness_configGet current LED brightness configuration

Configuration

ToolDescription
set_device_nameRename a device
set_led_themeChange LED visualization (COโ‚‚, VOC, Humidity, PM2.5, โ€ฆ)
set_night_modeConfigure night mode schedule and settings
set_brightnessAdjust LED brightness (day/night)
configure_networkSet static IP or switch to DHCP

Device Control

ToolDescription
restart_deviceRestart the device (~30s downtime)
shutdown_deviceShut 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 device

Exactly 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.

COโ‚‚ area chart โ€” single device

Single device (24 h, area chart, PNG)

COโ‚‚ area chart โ€” multiple devices

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.png

Output 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.xlsx

Querying 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 150

Common parameters

ParameterDefaultDescription
--last-hours1 (history) / 24 (plot)Hours of data to retrieve
--from-datetime / --to-datetimeโ€”ISO 8601 time range (overrides --last-hours)
--max-points300Downsample to at most N evenly spaced points
--timezone-nameUTCIANA timezone for timestamps (e.g. Europe/Berlin)

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 pytest

The 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-files

Release Process

  1. Update version in pyproject.toml.
  2. Commit and create a matching Git tag like v0.1.1.
  3. 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.