hive-mcp
Provides tools for interacting with Hive smart heating systems, enabling checking thermostats, radiator valves, hot water, plugs, and lights, and optionally boosting heating, setting temperatures, switching hot water on/off, and setting holiday mode.
hive-mcp
Talk to your heating.
An open-source Model Context Protocol server for Hive, British Gas's smart heating. It lets Claude and other AI assistants check your Hive thermostats, radiator valves, hot water, plugs and lights, and, if you allow it, boost the heating, set temperatures, switch the hot water on and set holiday mode, all from one small Docker container.
Quick start · Documentation · Tool reference · Contributing
hive-mcp is anunofficial project. It isn't made, endorsed or supported by Hive, British Gas or Centrica. Hive has no public API: hive-mcp uses the same undocumented API as the Hive app and the Home Assistant integration, which Hive can change at any time.
"It's freezing in here. Can you warm the house up?" The living room is 17.5 °C and the heating is on its schedule, which has it at 16 °C until 17:00. I can boost it to 21 °C for an hour, after which it goes back to the schedule. Shall I? "Yes, and put the hot water on too, I want a bath." Done: the heating is boosting to 21 °C until 15:40, and the hot water is boosting for 30 minutes. By the way, the bedroom radiator valve's battery is down to 20%.
Ask about your home in plain English. The assistant picks from 24 tools to look things up and, if you allow it, make changes. Some examples:
🌡️ "How warm is each room, and is the heating on?"
🔥 "Boost the heating to 21 for an hour."
🛁 "I want a bath in half an hour. Is the hot water on?"
🧳 "We're away from Saturday until the 28th. Set holiday mode."
🔋 "Do any of my Hive devices need new batteries?"
💡 "Turn the living room light down to 30% and switch the lamp plug off."
Highlights
🐳 Docker-first and tiny. One image (
ghcr.io/mattoddie/hive-mcp) forlinux/amd64andlinux/arm64, about 20 MB. It's a single static Go binary on a distroless base, with no shell or package manager, running as a non-root user. It serves Streamable HTTP for a long-running service, or stdio fordocker run -i. You can also run the binary on its own. For Claude Desktop there's also a one-click extension bundle (.mcpb) that needs no Docker.🛡️ Safe by default. The server is read-only unless you turn on writes. Tools that aren't allowed aren't registered at all, and every change is checked first: heating targets must be 5–25 °C in steps of 0.5 (raise the top with
HIVE_MAX_TEMP), boosts are limited to six hours, holiday mode to 60 days, and settings that last indefinitely (manual heating, hot water on) need an explicit confirmation.📱 One SMS code, once. Hive logins need a code sent by text message. You enter it once with
hive-mcp login, and the server registers itself as a remembered device, so it can log in again on its own without another code. Passwords, tokens and device secrets never appear in tool output or logs.🔐 Real Cognito SRP. It logs in the way the Hive app does (AWS Cognito with SRP, which never sends your password), checked against the exact maths of the client Home Assistant uses.
🐢 Gentle on Hive. Readings are cached for 30 seconds, so a conversation doesn't hammer an API Hive never meant for us, and it backs off when rate-limited or when a login fails.
🎛️ Tunable. Expose only the toolsets you need, which keeps the model's context small and focused.
🧪 Tested. The test suite runs against a mock Hive, including a fake Cognito that really checks the SRP proofs, SMS codes and remembered devices.
Related MCP server: claude-max-mcp
Quick start
Using Claude Desktop? Skip Docker: download the extension bundle (.mcpb) for your computer from the latest release, open it to install, fill in your Hive email and password, and ask Claude to "log in to Hive". See Claude Desktop.
hive-mcp is listed in the MCP Registry as io.github.mattoddie/hive-mcp, so clients that browse the registry can install it (the Docker image in stdio mode, or the bundle). See From the MCP Registry.
Otherwise, you need Docker, a Hive account that works in the Hive app, the phone that gets your Hive text messages, and an MCP client such as Claude Code.
1. Set up the server.
mkdir hive-mcp && cd hive-mcp
curl -fsSLO https://raw.githubusercontent.com/mattoddie/hive-mcp/main/compose.yaml
curl -fsSL https://raw.githubusercontent.com/mattoddie/hive-mcp/main/example.env -o .env
# Edit .env: set HIVE_USERNAME and HIVE_PASSWORD (your Hive app login)
# and a random MCP_AUTH_TOKEN (e.g. `openssl rand -hex 32`)2. Log in to Hive once and start the server.
docker compose run --rm hive-mcp login # type in the code Hive texts you
docker compose up -d3. Connect your assistant.
claude mcp add --transport http hive http://<docker-host>:8080/mcp \
--header "Authorization: Bearer <MCP_AUTH_TOKEN>"Now ask "How warm is the house?" in Claude Code.
Using Claude Desktop, VS Code, Cursor or Codex? See Connecting MCP clients. Prefer not to run a service? Use stdio mode with docker run -i or the local binary.
Turning on changes
Out of the box the assistant can look but not touch. To let it change your heating, hot water, plugs and lights, add this to .env and restart:
HIVE_ALLOW_WRITES=true
HIVE_TOOLSETS=home,heating,hotwater # optional: expose fewer toolsdocker compose up -dRead Security before turning on writes. A heating system is a real thing in a real home. To keep a record of every change the assistant makes, set HIVE_AUDIT_LOG to a file path (see Audit log).
What it can do
Toolset | What's covered |
| Login, a one-call overview of the home, the list of Hive devices with batteries and signal, and holiday mode |
| Heating zones and radiator valve (TRV) zones: temperatures, modes and schedules; set the temperature or mode, boost and cancel a boost |
| Hot water: status and schedule; switch it on, off or back to its schedule, boost and cancel a boost |
| Smart plugs, lights and sensors: on or off, power use, brightness, colour temperature, open or closed |
| An escape hatch that calls any path of Hive's API. Off unless you list it ( |
See the tool reference for every tool and argument. Ready-made prompts like home_check, warm_up and going_away chain the tools together for common jobs. Changing schedules isn't supported yet; see Compatibility.
Documentation
The docs are also published at hive-mcp.mattoddie.dev/docs, with search.
Step-by-step setup, including the one-time SMS login | |
Claude Code, Claude Desktop, VS Code, Cursor, Codex, stdio mode | |
Every environment variable, how login and remembered devices work, Docker secrets, toolsets | |
Compose, image tags, upgrades, TLS reverse proxy, hardening, running without Docker | |
Example conversations, prompts, how changes and boosts work | |
Every tool and prompt, generated from the code | |
🛡️ Security | Threat model, what the token file holds, safe write setups |
Supported Hive devices, discontinued products, and how the unofficial API is used | |
Login and SMS problems, common errors and how to fix them | |
🛠️ Development | Architecture, the mock Hive, adding a tool, testing |
Contributing
Contributions are very welcome, whether that's bug reports, notes on how Hive's API behaves, docs or new tools. Read the contributing guide to get started, and please follow the code of conduct. To report a vulnerability, see the security policy. Please don't open a public issue for one.
License
MIT © Matt Oddie
hive-mcp is an independent community project. It is not affiliated with, endorsed by or sponsored by Hive, British Gas or Centrica plc. "Hive" and "British Gas" are trademarks of Centrica plc or its subsidiaries. hive-mcp builds on what the community learned writing pyhiveapi, the library behind the Home Assistant Hive integration.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
HiveCompute MCP Server — decentralized inference router for AI agents
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted MCP server and REST API that lets AI agents use apps with no API, signed in as you.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the Ambient Weather REST API. Query your personal weather stations conversationally from Claude Code, Claude.ai, or any MCP-compatible client.1MIT
- AlicenseAqualityCmaintenanceAn MCP server that enables any AI agent to call Claude using your existing Max/Pro subscription via OAuth, avoiding additional API billing.11MIT
- AlicenseAqualityDmaintenanceAn unofficial MCP (Model Context Protocol) server that exposes a Vaillant heat pump's data to AI assistants like Claude. Query outdoor and room temperatures, hot water status, energy consumption, COP estimates, schedules, and diagnostics through natural conversation.4MIT
- AlicenseAqualityDmaintenanceMCP server for controlling Wyze smart home devices (plugs, switches, thermostats, air purifiers) via Claude Desktop or Home Assistant.77 npmMIT