什么是 air-Q Cloud?
用于 air-Q Cloud API 的 MCP 服务器,可随时随地访问与获取空气质量数据。
README
mcp-airq-cloud
MCP server for the air-Q Cloud API — access air quality data from anywhere.
Unlike mcp-airq (which communicates directly with devices on the local network), this server uses the air-Q Cloud REST API to retrieve sensor data remotely.
The same mcp-airq-cloud executable also works as a direct CLI when you pass a
tool name as a subcommand.
Tools
| Tool | Description |
|---|---|
list_devices | List configured air-Q Cloud devices |
get_air_quality | Get latest sensor readings (supports device/location/group selection) |
get_air_quality_history | Get historical data within a time range as column-oriented JSON |
plot_air_quality_history | Render one historical chart per sensor across all matching devices |
export_air_quality_history | Export one historical sensor as one csv or xlsx across matching devices |
All tools are read-only — the Cloud API does not support device configuration or control.
Installation
pip install mcp-airq-cloud
Or install from source:
git clone https://github.com/CorantGmbH/mcp-airq-cloud.git
cd mcp-airq-cloud
uv sync --frozen --extra dev
CLI Usage
Use the same command directly from the shell:
mcp-airq-cloud list-devices
mcp-airq-cloud get-air-quality --device "Living Room"
mcp-airq-cloud get-air-quality-history --device "Living Room" --last-hours 24 --sensors co2 pm2_5
mcp-airq-cloud plot-air-quality-history --sensor co2 --output-format png --output co2.png
mcp-airq-cloud export-air-quality-history --sensor co2 --output-format xlsx --output co2.xlsx
For historical plots and exports:
- omit
device,location, andgroupto combine all configured devices into one artifact - use
locationorgroupto combine only the matching devices plot_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-cloud list-devices
mcp-airq-cloud list_devices
To force MCP server mode from an interactive terminal, run:
mcp-airq-cloud serve
The CLI is pipe-friendly: successful command output goes to stdout, while
tool errors go to stderr with exit code 1. Plot commands can also stream
directly to stdout.
mcp-airq-cloud get-air-quality --device "Living Room" | jq '.co2'
mcp-airq-cloud get-air-quality-history --device "Living Room" --compact-json | jq '.columns.co2'
mcp-airq-cloud get-air-quality-history --device "Living Room" --yaml | yq '.columns.co2'
mcp-airq-cloud plot-air-quality-history --sensor co2 --device "Living Room" --output - > co2.png
mcp-airq-cloud export-air-quality-history --sensor co2 --device "Living Room" --output - > co2.xlsx
Historical Data
Three tools provide access to historical sensor data via the air-Q Cloud API:
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-cloud plot-air-quality-history --sensor co2 --device "Living Room"
# All devices at a location, custom time range, SVG output
mcp-airq-cloud 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-cloud plot-air-quality-history --sensor co2 --dark --chart-type line
# Save to file
mcp-airq-cloud 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-cloud export-air-quality-history --sensor co2 --device "Living Room" --last-hours 48
# Excel export for all devices at a location
mcp-airq-cloud export-air-quality-history --sensor co2 --location "Home" \
--output-format xlsx --output co2.xlsx
Common parameters
| Parameter | Default | Description |
|---|---|---|
--last-hours | 1 (history) / 24 (plot) | Hours of data to retrieve |
--from-datetime / --to-datetime | — | ISO 8601 time range (overrides --last-hours) |
--max-points | 300 | Downsample to at most N evenly spaced points |
--timezone-name | UTC | IANA timezone for timestamps (e.g. Europe/Berlin) |
Configuration
You need a Cloud API key and the 32-character device ID for each device. Both can be obtained at my.air-q.com.
Option 1: Environment variable (inline JSON)
export AIRQ_CLOUD_DEVICES='[{"id": "de45d2ed777780c96c0deae7a220b745", "api_key": "your-api-key", "name": "Living Room"}]'
Option 2: Default config file (recommended)
Place a JSON file at ~/.config/airq-cloud-devices.json — no environment variable needed:
[
{"id": "de45d2ed777780c96c0deae7a220b745", "api_key": "your-api-key", "name": "Living Room"}
]
Option 3: Custom config file path
export AIRQ_CLOUD_CONFIG_FILE=/path/to/devices.json
Option 4: Global API key
If all devices share the same API key, set it once:
export AIRQ_CLOUD_API_KEY="your-api-key"
export AIRQ_CLOUD_DEVICES='[{"id": "de45d2ed777780c96c0deae7a220b745", "name": "Living Room"}]'
Device config fields
| Field | Required | Description |
|---|---|---|
id | yes | 32-character cloud device ID |
api_key | no | Per-device API key (falls back to AIRQ_CLOUD_API_KEY) |
name | no | Friendly name (defaults to first 8 chars of ID) |
location | no | Location for grouping (e.g. "Wohnzimmer") |
group | no | Group for grouping (e.g. "zu Hause") |
Usage with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"air-Q Cloud": {
"command": "mcp-airq-cloud",
"env": {
"AIRQ_CLOUD_DEVICES": "[{\"id\": \"<device-id>\", \"api_key\": \"<key>\", \"name\": \"Living Room\"}]"
}
}
}
}
Usage with Claude Code
claude mcp add air-Q-Cloud mcp-airq-cloud \
-e AIRQ_CLOUD_DEVICES='[{"id":"<ID>","api_key":"<KEY>","name":"<Name>"}]'
Development
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 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
License
Apache 2.0 — see LICENSE.
常见问题
air-Q Cloud 是什么?
用于 air-Q Cloud API 的 MCP 服务器,可随时随地访问与获取空气质量数据。
相关 Skills
环境密钥管理
by alirezarezvani
统一梳理dev/staging/prod的.env和密钥流程,自动生成.env.example、校验必填变量、扫描Git历史泄漏,并联动Vault、AWS SSM、1Password、Doppler完成轮换。
✎ 统一管理环境变量、密钥与配置,减少泄露和部署混乱,安全治理与团队协作一起做好,DevOps 场景很省心。
可观测性设计
by alirezarezvani
面向生产系统规划可落地的可观测性体系,串起指标、日志、链路追踪与 SLI/SLO、错误预算、告警和仪表盘设计,适合搭建监控平台与优化故障响应。
✎ 把监控、日志、链路追踪串起来,帮助团队从设计阶段构建可观测性,排障更快、系统演进更稳。
更新日志
by alirezarezvani
基于 Conventional Commits 自动解析提交记录、判断语义化版本升级并生成规范 changelog,适合在 CI、发版前检查提交格式并批量输出可审计发布说明。
✎ 自动生成和管理更新日志与发布说明,帮团队把版本变更说清楚;聚焦版本化与流程自动化,省时又更规范。
相关 MCP Server
kubefwd
编辑精选by txn2
kubefwd 是让 AI 帮你批量转发 Kubernetes 服务到本地的开发神器。
✎ 微服务开发者最头疼的本地调试问题,它一键搞定——自动分配 IP 避免端口冲突,还能用自然语言查询状态。但依赖 AI 工作流,纯命令行爱好者可能觉得不够直接。
Cloudflare
编辑精选by Cloudflare
Cloudflare MCP Server 是让你用自然语言管理 Workers、KV 和 R2 等云资源的工具。
✎ 这个工具解决了开发者频繁切换控制台和文档的痛点,特别适合那些在 Cloudflare 上部署无服务器应用、需要快速调试或管理配置的团队。不过,由于它依赖多个子服务器,初次设置可能有点繁琐,建议先从 Workers Bindings 这类核心功能入手。
Terraform
编辑精选by hashicorp
Terraform MCP Server 是让 AI 助手直接操作 Terraform Registry 和 HCP Terraform 的桥梁。
✎ 如果你经常在 Terraform 里翻文档找模块配置,这个服务器能省不少时间——直接问 Claude 就能生成准确的代码片段。最适合管理多云基础设施的团队,但注意它目前只适合本地使用,别在生产环境里暴露 HTTP 端点。