@heysalad/bair1-mcp
v1.0.0
Published
MCP server for querying Bair1 air quality sensor data
Readme
Bair1 MCP Server
An MCP (Model Context Protocol) server that lets AI agents query air quality data from bair1.live sensors.
Tools
| Tool | Description |
|------|-------------|
| get_latest_reading | Get the most recent air quality reading (optionally by device) |
| list_devices | List all registered Bair1 sensors |
| get_readings | Get historical readings for a device |
| get_air_quality_summary | Human-readable summary with AQI, PM levels, and health advice |
| export_data | Export readings as JSON with optional date range filtering |
Setup
npm install
npm run buildPublished package target:
npx @heysalad/bair1-mcpConfiguration
Set the BAIR1_API_KEY environment variable if you need authenticated endpoints (export). Public read endpoints work without a key.
Usage with Claude Desktop
Add the following to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"bair1": {
"command": "npx",
"args": ["-y", "@heysalad/bair1-mcp"],
"env": {
"BAIR1_API_KEY": "your-api-key-here"
}
}
}
}Usage with Claude Code
Add the server to your Claude Code MCP config:
claude mcp add bair1 npx -y @heysalad/bair1-mcpOr with an API key:
claude mcp add bair1 -e BAIR1_API_KEY=your-key npx -y @heysalad/bair1-mcpDevelopment
npm run dev # Watch mode — recompiles on change
npm start # Run the compiled server