hive-mcp
hive-mcp is an unofficial MCP server for Hive smart heating that lets AI assistants inspect your home and, if writes are enabled, change heating, hot water, plugs, and lights.
Read your home: one-call overview, heating and radiator-valve (TRV) zones with temperatures, modes, boosts, batteries, and signal, weekly heating and hot water schedules, hot water status, device list, smart plugs, lights and sensors, Hive actions (automations), and login status. Raw Hive objects available on many lookups.
Boost heating: heat a zone to a target temperature for a set time (5–25 °C, up to 6 hours), replacing any existing boost; cancel a boost to return to the prior mode.
Boost hot water: heat the water now for a set time; cancel a boost early.
Set heating mode: schedule, manual hold, or off (frost protection); manual holds need explicit confirmation.
Set heating temperature: adjust a zone's target, optionally switching to manual to hold it indefinitely.
Edit weekly heating schedules: set periods and target temperatures per day or weekday/weekend groups.
Set hot water mode: on (until changed), off, or back to schedule — indefinite "on" requires confirmation; edit the weekly hot water schedule.
Holiday mode: set a date range (max 60 days) holding one temperature while away, or cancel it.
Heat on demand: let radiator valves call the boiler through a zone.
Toggle Hive actions: turn automations on or off (they run on their triggers).
Control lights: on/off, brightness, white colour temperature, and hue/saturation colour.
Switch smart plugs on or off.
Safety features: read-only by default (unallowed tools aren't registered),
dry_runpreviews, confirmation for open-ended changes, temperature/boost caps, caching to avoid hammering Hive, and optional audit logging of every change.
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. Install it with Homebrew, run it in Docker, or add it to Claude Desktop in one click.
Quick start · Documentation · Tool reference · Contributing
▶️ Watch the one-minute trailer
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 29 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
📦 Install it your way. It's a single static Go binary with no dependencies:
brew install mattoddie/tap/hive-mcpon macOS or Linux.A tiny distroless Docker image (
ghcr.io/mattoddie/hive-mcp, about 20 MB) forlinux/amd64andlinux/arm64, with no shell or package manager, running as a non-root user and serving Streamable HTTP for a long-running service.A one-click extension bundle (
.mcpb) for Claude Desktop.Plain binaries for macOS, Linux and Windows on
amd64andarm64.
🛡️ 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? 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 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. Have your Hive login ready. That's the email and password you use in the Hive app. You log in once, typing in a code Hive texts you, and the server then logs itself in again without another code.
2. Install and connect. Pick one of these.
With Homebrew (macOS or Linux)
Your MCP client starts the server when it needs it, over stdio. There's nothing to keep running and no MCP_AUTH_TOKEN to set. Put your Hive password in a file only you can read, such as ~/.config/hive-mcp/password, then:
brew install mattoddie/tap/hive-mcp
# Log in to Hive once: type in the code Hive texts you
export HIVE_USERNAME=you@example.com HIVE_PASSWORD_FILE=/path/to/hive-password
hive-mcp login
claude mcp add hive \
--env HIVE_USERNAME=you@example.com \
--env HIVE_PASSWORD_FILE=/path/to/hive-password \
-- "$(brew --prefix)/bin/hive-mcp"Now ask "How warm is the house?" in Claude Code. brew upgrade picks up new releases. For VS Code, Cursor or Codex, see Without Docker.
With Docker (a long-running service)
Run it once on a server or NAS and connect any number of clients over HTTP.
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`)
docker compose run --rm hive-mcp login # log in once: type in the code Hive texts you
docker compose up -d
claude mcp add --transport http hive http://<docker-host>:8080/mcp \
--header "Authorization: Bearer <MCP_AUTH_TOKEN>"For other clients, see Connecting MCP clients. Docker also has a stdio mode with docker run -i.
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, set these variables. With Homebrew, add them as more --env options to claude mcp add, or to env in your client's config. With Docker, add them to .env and run docker compose up -d.
HIVE_ALLOW_WRITES=true
HIVE_TOOLSETS=home,heating,hotwater # optional: expose fewer toolsRead 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, holiday mode, and Hive actions (automations): list them and turn them on or off |
| Heating zones and radiator valve (TRV) zones: temperatures, modes and schedules; set the temperature, mode or weekly schedule, boost and cancel a boost, heat on demand |
| Hot water: status and schedule; switch it on, off or back to its schedule, change the schedule, boost and cancel a boost |
| Smart plugs, lights and sensors: on or off, power use, brightness, colour temperature, colour, 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.
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.
Available Tools
26 toolshive_boost_heatingBoost heatingA
Boost a zone: heat to a temperature for a number of minutes, then go back to the previous mode. Replaces any boost already running.
Inputs: temperature (required), zone, dry_run, minutes.
hive_boost_hot_waterBoost hot waterA
Heat the hot water now for a number of minutes, then go back to the previous mode.
Inputs: dry_run, minutes.
hive_cancel_heating_boostCancel heating boostAIdempotent
Stop a zone's boost early and go back to the mode (and, for manual or off, the temperature) it had before.
Inputs: zone, dry_run.
hive_cancel_holiday_modeCancel holiday modeAIdempotent
Cancel holiday mode, so the heating and hot water go back to their normal settings straight away.
Inputs: dry_run.
hive_cancel_hot_water_boostCancel hot water boostAIdempotent
Stop a hot water boost early and go back to the previous mode.
Inputs: dry_run.
hive_get_auth_statusHive login statusARead-only
Show whether this server is logged in to Hive: the account (with the email address masked), whether this server is a remembered device (so it can log in again without an SMS code), when the current token expires and any login error. Never shows passwords, tokens or device secrets.
hive_get_heatingGet heatingBRead-only
Show the heating: for each heating zone (a Hive thermostat) and TRV zone (Hive radiator valves), the current temperature, target temperature, mode (schedule, manual, off or boost), boost time left, whether it's calling for heat, what the schedule asks for now and next, and thermostat or valve batteries.
Inputs: raw, zone, fresh.
hive_get_heating_scheduleGet heating scheduleARead-only
Show a zone's weekly heating schedule: for each day, the periods and the target temperature for each, in the home's local time. Also says what the schedule asks for now and when it next changes.
Inputs: zone.
hive_get_holiday_modeGet holiday modeARead-only
Show whether holiday mode is set: when it starts and ends and the temperature the heating holds while you're away.
hive_get_hot_waterGet hot waterARead-only
Show the hot water: whether it's heating now, the mode (schedule, on, off or boost), boost time left, and what the schedule asks for now and next.
Inputs: raw, fresh.
hive_get_hot_water_scheduleGet hot water scheduleARead-only
Show the weekly hot water schedule: for each day, when the hot water is on and off, in the home's local time.
hive_get_overviewHome overviewARead-only
A one-call snapshot of the home: every heating zone and TRV zone (current and target temperature, mode, boost, whether it's calling for heat), the hot water, plugs, lights and sensors, holiday mode, and anything that needs attention: low batteries, offline devices and discontinued hardware. A good first call.
Inputs: fresh.
hive_list_actionsList Hive actionsARead-only
List the Hive actions (automations set up in the Hive app, such as "when the back door opens, send a notification"): each one's name, whether it's on, and its events: what starts it (when), any condition (while) and what it does (then), with the devices involved.
Inputs: raw, fresh.
hive_list_devicesList Hive devicesARead-only
List the Hive hardware: hub, thermostats, boiler module, radiator valves (TRVs), plugs, bulbs and sensors, with online status, battery level, signal strength, model and firmware. Filter by type, low battery or offline.
Inputs: raw, type, fresh, offline, +1 more.
hive_list_smart_devicesList plugs, lights and sensorsARead-only
List Hive smart plugs (on or off, power use), lights (on or off, brightness, colour temperature) and sensors (window and door sensors open or closed, motion sensors), with online status and batteries.
Inputs: raw, kind, fresh.
hive_list_trvsList radiator valvesARead-only
List the Hive radiator valves (TRVs) by zone: each zone's temperature, target and mode, and each valve's battery, signal, online status, calibration, mounting and child lock.
Inputs: fresh.
hive_set_actionTurn a Hive action on or offAIdempotent
Turn a Hive action (an automation from the Hive app) on or off. This doesn't run it: an action that's on runs when its trigger happens. Actions can only be created or edited in the Hive app.
Inputs: action (required), enabled (required), dry_run.
hive_set_heating_modeSet heating modeADestructiveIdempotent
Switch a zone between schedule (follow the weekly schedule), manual (hold one temperature) and off (frost protection only). Cancels a boost. Manual lasts indefinitely, so it needs confirm: true; prefer hive_boost_heating for a temporary change.
Inputs: mode (required), zone, confirm, dry_run, +1 more.
hive_set_heating_scheduleSet heating scheduleADestructiveIdempotent
Change a heating zone's or TRV zone's weekly schedule. In days, give the periods for the days that change, keyed by day or by weekdays, weekend or every_day (a day wins over a group); other days keep their current periods. Each day has 1 to 6 periods, each a start time (HH:MM, home's local time) and a target temperature, lasting until the next period starts (before a day's first period, the previous day's last one carries on). This replaces those days' schedule for good, so show the user the new periods and get their go-ahead first. The zone only follows it in schedule mode.
Inputs: days (required), zone, dry_run.
hive_set_heating_temperatureSet heating temperatureAIdempotent
Set a zone's target temperature. In schedule mode this lasts until the next scheduled change, like turning the thermostat dial; pass mode=manual to hold it. If the zone is off, the target is saved but nothing heats until the mode changes. Holding a temperature in manual mode (mode=manual, or a zone that is already in manual) lasts indefinitely, so it needs confirm: true; prefer hive_boost_heating for a temporary change.
Inputs: temperature (required), mode, zone, confirm, +1 more.
hive_set_heat_on_demandSet heat on demandAIdempotent
Turn heat on demand on or off for a heating zone. With it on, Hive radiator valves can turn the boiler on through this zone when their rooms are below target, even when the thermostat isn't calling for heat (Hive shows this as a boost with boost_reason "heat on demand"). The setting stays until changed.
Inputs: enabled (required), zone, dry_run.
hive_set_holiday_modeSet holiday modeADestructive
Set holiday mode: from start (default now) until end, the heating holds one temperature, then the normal settings resume. It lasts at most 60 days. Replaces any holiday mode already set. Confirm the dates and temperature with the user first.
Inputs: end (required), temperature (required), start, dry_run.
hive_set_hot_water_modeSet hot water modeAIdempotent
Switch the hot water on (it stays on until changed), off, or back to its schedule. Cancels a boost. For a limited time, use hive_boost_hot_water instead of on. On lasts indefinitely, so it needs confirm: true.
Inputs: mode (required), confirm, dry_run.
hive_set_hot_water_scheduleSet hot water scheduleADestructiveIdempotent
Change the weekly hot water schedule. In days, give the periods for the days that change, keyed by day or by weekdays, weekend or every_day (a day wins over a group); other days keep their current periods. Each day has 1 to 6 periods, each a start time (HH:MM, home's local time) and on or off, lasting until the next period starts (before a day's first period, the previous day's last one carries on). This replaces those days' schedule for good, so show the user the new periods and get their go-ahead first. The hot water only follows it in schedule mode.
Inputs: days (required), dry_run.
hive_set_lightControl a lightAIdempotent
Switch a Hive light on or off, and set its brightness, its white colour temperature (tuneable and colour bulbs) or its colour as hue and saturation (colour bulbs).
Inputs: on, hue, light, dry_run, +3 more.
hive_set_plugSwitch a smart plugAIdempotent
Switch a Hive smart plug on or off. Check what's plugged in with the user before switching it off.
Inputs: on (required), plug, dry_run.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Most tools have a clearly distinct resource+action purpose, and descriptions make the intended use clear. Some overlap exists between hive_list_devices, hive_list_smart_devices and hive_list_trvs (all list hardware from different angles), and hive_set_heating_mode vs hive_set_heating_temperature with mode=manual can both put a zone in manual mode, but the descriptions provide enough guidance to pick correctly.
All 26 tools follow a single, predictable convention: hive_ prefix plus a verb_noun pattern (get_, set_, list_, boost_, cancel_). Even less common operations like hive_set_heat_on_demand fit the pattern, and there is no mixing of styles.
At 26 tools the surface is on the heavy side, just over the 'borderline' 16-25 range. The domain is genuinely broad (heating, hot water, schedules, holiday mode, devices, actions, lights/plugs, auth/overview), and each tool appears to earn its place, but the count is larger than ideal for easy agent navigation.
Core lifecycle operations are well covered: reading state, setting modes/temperatures/schedules, boosting and cancelling boosts, holiday mode, device listing, lights/plugs, and actions on/off. Minor gaps remain—actions cannot be created or edited (deliberately deferred to the Hive app), and there are no tools to rename/remove devices or adjust TRV calibration/child lock—but these are workable limitations rather than dead ends.
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.
Manage a Discord server from Claude, ChatGPT or any MCP client. Sign in with Discord, no bot token.
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
- AlicenseAqualityDmaintenanceAn 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.7MIT