influx-mcp
Tuned for Home Assistant's long-term storage schema (ha_data-style bucket with entity_id tag), allowing AI agents to read sensor history, detect anomalies, and manage entity data from a Home Assistant InfluxDB bucket.
Provides tools to query and analyze sensor data stored in an InfluxDB 2.x bucket, including listing measurements, fields, retrieving history, finding anomalies, and running arbitrary Flux queries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@influx-mcpshow me the temperature sensor history for the past 7 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
influx-mcp
MCP server for InfluxDB 2.x, tuned for Home Assistant long-term storage (an ha_data-style bucket with an entity_id tag). Lets any MCP client (Claude or otherwise) read sensor history, find anomalies, and run arbitrary Flux queries through a single HTTP MCP endpoint.
Tools
Tool | Description |
| List of all measurements in the bucket, with |
| List of fields for a specific measurement, with |
| Latest value of a sensor by |
| History of sensor values over a period (with optional aggregation over N minutes) |
| Arbitrary Flux query against InfluxDB |
| Anomalous sensor values (deviation from the mean by more than N sigma) |
query_flux gives full read access to the database — that's an intentional tradeoff for flexibility, not a bug. Make sure to lock the server down with MCP_SECRET if it's reachable from anywhere outside your local network.
Related MCP server: Overwatch MCP
Setup
git clone <this-repo> influx-mcp && cd influx-mcp
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # fill in INFLUX_URL / INFLUX_TOKEN / INFLUX_ORG / INFLUX_BUCKET / MCP_SECRET
uvicorn server:app --host 0.0.0.0 --port 8000Systemd unit example: deploy/influx-mcp.service (adjust paths for your install).
Security model
Auth is an
Authorization: Bearer $MCP_SECRETheader on every request to/mcp. IfMCP_SECRETis unset, the server responds without checking auth (fine for a local network/VPN only)./.well-known/oauth-authorization-server,/oauth/authorize,/oauth/tokenare not a real OAuth provider — just a compatible stub. As of this writing, claude.ai custom connectors don't support pasting a static API key — only full OAuth 2.1 or no auth at all. This stub satisfies the connector setup UI's OAuth handshake; the actual protection is the Bearer token on/mcp(see above). If you're connecting via Claude Code CLI (claude mcp add --header ...), you don't need this stub at all — just send the header directly.redirect_uriin/oauth/authorizeis checked against an allowlist (claude.ai,anthropic.com,console.anthropic.com,localhost) — without that it would be an open redirect.Transport: the server does not terminate TLS itself — it listens on plain HTTP. If it's reachable beyond localhost/a trusted LAN (and especially if you're connecting it as a custom connector in claude.ai, where HTTPS is required), put TLS termination in front of it: Cloudflare Tunnel, Tailscale Funnel, nginx/Caddy + Let's Encrypt, etc. Without that, the Bearer token (
MCP_SECRET) in theAuthorizationheader goes out in plaintext.
Requirements
InfluxDB 2.x with a bucket where points carry an
entity_idtag (the standard schema when exporting from Home Assistant, e.g. via itsinfluxdbintegration).Python 3.11+.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nickcheban/influx-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server