Hive heating

io.github.mattoddiePublished by GitHub account mattoddiev0.3.1Updated Oct 29, 2026

Check and control Hive smart heating: thermostats, radiator valves, hot water and holiday mode

Overview

AI-generated overview

Unofficial MCP server for Hive smart heating that lets an assistant read thermostats, hot water, plugs and lights, and optionally change them.

What you can do
  • Read home status: a one-call overview, device list with battery and signal, and holiday mode
  • Check heating zones and radiator valves: temperatures, modes and schedules
  • Check hot water status and schedule
  • Inspect smart plugs, lights and sensors: on/off, power use, brightness, colour temperature, open/closed
  • With writes enabled: set temperature or mode, boost or cancel a boost, switch hot water, plugs and lights, and set holiday mode
  • Optional raw toolset that calls any path of Hive's API
When to use it
Useful if you have Hive (British Gas) smart heating and want to ask an assistant in plain English how warm each room is, whether the hot water is on, which devices need batteries, or to boost the heating or set holiday mode before going away.
Requirements
Runs locally via Docker (image for linux/amd64 and arm64) or a Claude Desktop .mcpb bundle; needs a Hive account that works in the Hive app, the phone that receives Hive SMS codes for a one-time login, and an MCP client. Set HIVE_USERNAME and HIVE_PASSWORD; HIVE_ALLOW_WRITES, HIVE_ALLOW_LOGIN_TOOLS, HIVE_MAX_TEMP, HIVE_TOOLSETS, HIVE_AUDIT_LOG and MCP_TRANSPORT are optional. HTTP mode also uses an MCP auth token.
Before you install
Unofficial and not endorsed by Hive or British Gas; it uses an undocumented API that Hive can change at any time. HIVE_PASSWORD is stored for automatic re-login as a remembered device, and the one-time SMS login needs HIVE_ALLOW_LOGIN_TOOLS. Writes are off by default; enabling HIVE_ALLOW_WRITES lets the assistant change real heating, hot water, plugs and lights, so consider HIVE_MAX_TEMP, HIVE_TOOLSETS and HIVE_AUDIT_LOG. The raw toolset calls arbitrary API paths and is off unless listed.

Installation

In SourceWeft

  1. Open Hive heating in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[hive-mcp logo]

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.

[CI] [Release] [Container image] [License: MIT]

hive-mcp.mattoddie.dev

Quick start · Documentation · Tool reference · Contributing


[!IMPORTANT] hive-mcp is an unofficial 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) for linux/amd64 and linux/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 for docker 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.

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.

sh
mkdir hive-mcp && cd hive-mcpcurl -fsSLO https://raw.githubusercontent.com/mattoddie/hive-mcp/main/compose.yamlcurl -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.

sh
docker compose run --rm hive-mcp login   # type in the code Hive texts youdocker compose up -d

3. Connect your assistant.

sh
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:

sh
HIVE_ALLOW_WRITES=trueHIVE_TOOLSETS=home,heating,hotwater   # optional: expose fewer tools
sh
docker compose up -d

Read 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

ToolsetWhat's covered
homeLogin, a one-call overview of the home, the list of Hive devices with batteries and signal, and holiday mode
heatingHeating zones and radiator valve (TRV) zones: temperatures, modes and schedules; set the temperature or mode, boost and cancel a boost
hotwaterHot water: status and schedule; switch it on, off or back to its schedule, boost and cancel a boost
devicesSmart plugs, lights and sensors: on or off, power use, brightness, colour temperature, open or closed
rawAn escape hatch that calls any path of Hive's API. Off unless you list it (HIVE_TOOLSETS=all,raw)

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.

🚀 Getting startedStep-by-step setup, including the one-time SMS login
🔌 Connecting MCP clientsClaude Code, Claude Desktop, VS Code, Cursor, Codex, stdio mode
⚙️ ConfigurationEvery environment variable, how login and remembered devices work, Docker secrets, toolsets
🐳 DeploymentCompose, image tags, upgrades, TLS reverse proxy, hardening, running without Docker
💬 Using hive-mcpExample conversations, prompts, how changes and boosts work
🧰 Tool referenceEvery tool and prompt, generated from the code
🛡️ SecurityThreat model, what the token file holds, safe write setups
📡 CompatibilitySupported Hive devices, discontinued products, and how the unofficial API is used
🩹 TroubleshootingLogin and SMS problems, common errors and how to fix them
🛠️ DevelopmentArchitecture, 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.

Source: README.md at commit 66f1f0c

Tools

0
SourceWeft started this package once in an isolated sandbox, without credentials, to list its tools. That failed: the package type cannot run in the sandbox.

Version history

1
  1. v0.3.1LatestOct 22, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts