by diegobit
Manage Aranet4 CO2 sensor data, scan devices, fetch measurements, store them in a local SQLite database, and query or visualize the results through an MCP client.
Aranet4 MCP Server provides a lightweight backend for interacting with an Aranet4 CO2 sensor. It discovers nearby BLE devices, pulls historical measurements from the sensor's memory, persists them locally, and makes the data queryable and plottable via MCP‑compatible clients.
uv
(or pip install .
as an alternative).init aranet4
in your MCP client for AI‑assisted setup or by editing config.yaml
manually with the device MAC address and name.uv
and arguments to run src/server.py
).uv run src/server.py
).Dockerfile
.init aranet4
command.Q: Do I need the Aranet4 already paired on my machine? A: Yes. The sensor must be paired once via BLE (e.g., using LightBlue on macOS) before the server can communicate with it.
Q: Can I run the server on Windows? A: The code is cross‑platform Python, but BLE scanning may require additional drivers. macOS is the primary tested environment.
Q: How does automatic data fetching work?
A: Place fetch-job.py
in a scheduled task (cron, launch agent, etc.) or use the provided com.diegobit.aranet4-fetch.plist
on macOS to run the fetch routine at regular intervals.
Q: Do I need Docker? A: Docker is optional; it simplifies deployment but the server can run directly from a Python environment.
Q: Where is the data stored? A: All measurements are saved in a local SQLite database file located in the project directory.
MCP server to manage your Aranet4 CO2 sensor. Built upon Aranet4-Python.
[!TIP] For the standalone python version without MCP logic, see aranet4-archiver.
init aranet4
in your client to set up everything for the mcp server to work with your device.An Aranet4 device already paired. The device uses BLE, so it won't be shown in regular bluetooth search. On MacOS, one way is to install LightBlue from the App Store.
Clone repo:
git clone git@github.com:diegobit/aranet4-mcp-server.git`
cd aranet4-mcp-server
Prepare environment:
pyproject.toml
handles dependencied and virtual environments.pip install .
Add to MCP client configuration:
"aranet4": {
"command": "{{PATH_TO_UV}}", // run `which uv`
"args": [
"--directory",
"{{PATH_TO_SRC}}/aranet4-mcp-server/",
"run",
"src/server.py"
]
}
~/Library/Application Support/Claude/claude_desktop_config.json
~/.cursor/mcp.json
Configure:
init aranet4
to get a guided configuration.config.yaml
. You need to provide the mac address and the device name. You can get the mac address with aranetctl --scan
from Aranet4-Python (installed with this repo dependencies).Dockerfile is available. Remember to pass env variables or update config.yaml
.
Configuration and utils:
init_aranet4_config
: assisted configuration of device.scan_devices
: scan nearby bluetooth aranet4 devices.get_configuration_and_db_stats
: get current config.yaml and general stats from the local sqlite3 db.set_configuration
: set values in config.yaml.To update historical data:
fetch_new_data
: fetch new data from configured nearby aranet4 device and save to local db.To query historical data:
get_recent_data
: get recent data from local db. Can specify how many measurements.
get_data_by_timerange
: get data in specific timerange from local db. Can specify how many measurements (careful, if the range is big and the limit is low, datapoints will be skipped).
For both, ask to receive a plot to have it generated and displayed.
If you want your local db to always be updated, you can setup a cronjob or a launch agent that fetches data automatically every few hours. In MacOS, do as follows:
com.diegobit.aranet4-fetch.plist
.cp com.diegobit.aranet4-fetch.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.diegobit.aranet4-fetch.plist
For other platforms, just run fetch-job.py
periodically however you prefer.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by antvis
Offers over 25 AntV chart types for automated chart generation and data analysis, callable via MCP tools, CLI, HTTP, SSE, or streamable transports.
by reading-plus-ai
A versatile tool that enables interactive data exploration through prompts, CSV loading, and script execution.
by Canner
Provides a semantic engine that lets MCP clients and AI agents query enterprise data with contextual understanding, precise calculations, and built‑in governance.
by surendranb
Provides natural‑language access to Google Analytics 4 data via MCP, exposing over 200 dimensions and metrics for Claude, Cursor and other compatible clients.
by ergut
Provides secure, read‑only access to BigQuery datasets, allowing large language models to query and analyze data through a standardized interface.
by isaacwasserman
Provides an interface for LLMs to visualize data using Vega‑Lite syntax, supporting saving of data tables and rendering visualizations as either a full Vega‑Lite specification (text) or a base64‑encoded PNG image.
by vantage-sh
Fetch and explore cloud cost and usage data from a Vantage account using natural language through AI assistants and MCP clients.
by acryldata
Provides a Model Context Protocol server that enables searching, metadata retrieval, lineage traversal, and SQL query listing for DataHub entities.
by rishijatia
Provides programmatic access to Fantasy Premier League statistics, team information, gameweeks, and analysis tools via a Model Context Protocol server.