UBOS Asset Marketplace: Aranet4 MCP Server - Monitor Your Air Quality with Ease
In today’s increasingly environmentally conscious world, monitoring air quality is paramount, especially in indoor spaces. The Aranet4 CO2 sensor has emerged as a reliable tool for measuring CO2 levels, temperature, humidity, and atmospheric pressure. However, managing and interpreting the data from these sensors can be challenging. This is where the Aranet4 MCP (Model Context Protocol) server comes into play, providing a seamless solution for managing your Aranet4 device and local database.
What is the Aranet4 MCP Server?
The Aranet4 MCP server is a lightweight application built upon the Aranet4-Python library. It acts as an intermediary between your Aranet4 sensor and your applications, allowing you to collect, store, and analyze environmental data effortlessly. The server is designed to be simple, efficient, and easily integrable with various platforms, making it an ideal solution for both personal and professional use.
If you’re looking for a standalone Python version without MCP logic, consider checking out aranet4-archiver.
Key Features
The Aranet4 MCP Server offers a range of features designed to streamline the management of your Aranet4 sensor data:
- Device Scanning: Easily scan for nearby Aranet4 devices to quickly connect and begin data collection.
- Data Fetching and Storage: Automatically fetch new data from the Aranet4 sensor’s memory and store it in a local SQLite database for historical tracking and analysis. This eliminates the need for manual data collection, saving you time and effort.
- Data Querying: Ask questions about recent measurements or specific past dates, allowing you to quickly access the information you need.
- Data Visualization: For MCP clients that support images, the server can generate plots of your data, providing a visual representation of trends and patterns.
- Assisted Configuration: The server offers an AI-assisted configuration feature that simplifies the setup process. Simply ask
init aranet4in your client to guide you through the necessary steps.
Use Cases
The Aranet4 MCP Server can be used in a variety of scenarios, including:
- Home Air Quality Monitoring: Track CO2 levels, temperature, and humidity in your home to ensure a healthy and comfortable living environment.
- Office Environment Monitoring: Monitor air quality in offices and other workplaces to optimize ventilation and improve employee well-being.
- Greenhouse Monitoring: Track environmental conditions in greenhouses to optimize plant growth and maximize yields.
- Data Logging and Analysis: Collect and store historical data for research, analysis, and reporting purposes.
Installation
Installing the Aranet4 MCP Server is straightforward. Follow these steps:
Clone the repository:
bash git clone git@github.com:diegobit/aranet4-mcp-server.git cd aranet4-mcp-server
Prepare the environment:
- Recommended (with uv): No additional steps are required. The provided
pyproject.tomlfile handles dependencies and virtual environments. - Alternative (with pip): Install the server using
pip install .
- Recommended (with uv): No additional steps are required. The provided
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” ] }- Claude Desktop MacOS config file path:
~/Library/Application Support/Claude/claude_desktop_config.json - Cursor MacOS config file path:
~/.cursor/mcp.json
- Claude Desktop MacOS config file path:
Configure:
- Recommended (AI-assisted config!): Start your client and ask
init aranet4to get a guided configuration. - Alternative (manual): Edit the
config.yamlfile. You will need to provide the MAC address and device name. You can obtain the MAC address usingaranetctl --scanfrom Aranet4-Python (installed with this repo’s dependencies).
- Recommended (AI-assisted config!): Start your client and ask
Docker Support
A Dockerfile is available for easy deployment. Remember to pass environment variables or update the config.yaml file accordingly.
Available Tools
The Aranet4 MCP Server comes with a set of tools to help you manage your device and data:
- Configuration and Utils:
init_aranet4_config: Assisted configuration of the device.scan_devices: Scan for nearby Bluetooth Aranet4 devices.get_configuration_and_db_stats: Get the currentconfig.yamlfile and general stats from the local SQLite3 database.set_configuration: Set values inconfig.yaml.
- Historical Data Updates:
fetch_new_data: Fetch new data from the configured nearby Aranet4 device and save it to the local database.
- Historical Data Querying:
get_recent_data: Get recent data from the local database. You can specify the number of measurements.get_data_by_timerange: Get data within a specific time range from the local database. You can specify the number of measurements (note that datapoints may be skipped if the range is large and the limit is low).
For both get_recent_data and get_data_by_timerange, you can request a plot to be generated and displayed for visualization.
Automating Data Fetching
To ensure your local database is always up-to-date, you can set up a cron job or launch agent to automatically fetch data every few hours. For macOS, follow these steps:
- Configure absolute paths in
com.diegobit.aranet4-fetch.plist. - Install the LaunchAgent: bash cp com.diegobit.aranet4-fetch.plist ~/Library/LaunchAgents/ launchctl load ~/Library/LaunchAgents/com.diegobit.aranet4-fetch.plist
For other platforms, simply run fetch-job.py periodically using your preferred method.
Integrating with UBOS: Full-Stack AI Agent Development Platform
While the Aranet4 MCP Server provides a robust solution for managing data from your Aranet4 CO2 sensor, integrating it with a full-stack AI agent development platform like UBOS can unlock even more powerful capabilities.
UBOS is designed to help businesses orchestrate AI Agents, connect them with enterprise data, and build custom AI Agents using their own LLM models and Multi-Agent Systems. By integrating the Aranet4 MCP Server with UBOS, you can:
- Create intelligent agents that respond to environmental changes: Develop agents that automatically adjust ventilation systems based on real-time CO2 levels, optimizing air quality and energy efficiency.
- Gain deeper insights through data analysis: Leverage UBOS’s data analytics capabilities to identify trends and patterns in your Aranet4 data, enabling proactive decision-making.
- Automate environmental monitoring tasks: Automate data collection, analysis, and reporting, freeing up valuable time and resources.
- Build custom AI-powered solutions: Use UBOS’s flexible platform to build custom AI agents that address specific environmental monitoring needs.
MCP (Model Context Protocol) server acts as a bridge, allowing AI models to access and interact with external data sources and tools.
In conclusion, the Aranet4 MCP Server is a valuable tool for anyone looking to monitor and manage data from their Aranet4 CO2 sensor. Its ease of use, comprehensive feature set, and integration capabilities make it an ideal solution for a wide range of applications. And by integrating it with a platform like UBOS, you can unlock even greater potential for AI-powered environmental monitoring and automation.
Aranet4 CO2 Sensor Manager
Project Details
- diegobit/aranet4-mcp-server
- Last Updated: 4/25/2025
Recomended MCP Servers
A MCP server to interface with Biomart
MCP server for the Tradovate platform
Allows AI assistants such as Cursor/Cline/GitHub Copilot to use Google's lighthouse tool to measure perf metrics for your...
son2





