Hive heating

io.github.mattoddie由 GitHub 账号 mattoddie 发布v0.3.1更新于 Oct 29, 2026

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

已验证STDIO仅桌面位置与生活效率与工作流

概览

AI 生成的概览

面向 Hive 智能供暖的非官方 MCP 服务器,让助手查看温控器、热水、插座和灯具,并可选地修改它们。

可以做什么
  • 读取家庭概况:一次调用获取全屋概览、设备清单及电量与信号、假日模式
  • 查看供暖分区与散热器阀门:温度、模式与日程
  • 查看热水状态与日程
  • 查看智能插座、灯具和传感器:开关、功耗、亮度、色温、开合状态
  • 开启写入后可设定温度或模式、启动或取消加温、开关热水与插座灯具、设置假日模式
  • 可选的 raw 工具集,可调用 Hive API 的任意路径
适用场景
适合使用 Hive(英国燃气)智能供暖的用户,想用自然语言询问各房间温度、热水是否开启、哪些设备需要换电池,或在出门前让助手加温、设置假日模式。
运行要求
通过 Docker 本地运行(提供 linux/amd64 与 arm64 镜像)或使用 Claude Desktop 的 .mcpb 扩展包;需要可在 Hive 应用中使用的 Hive 账号、接收 Hive 短信验证码的手机,以及 MCP 客户端。需设置 HIVE_USERNAME 和 HIVE_PASSWORD;HIVE_ALLOW_WRITES、HIVE_ALLOW_LOGIN_TOOLS、HIVE_MAX_TEMP、HIVE_TOOLSETS、HIVE_AUDIT_LOG、MCP_TRANSPORT 为可选项。HTTP 模式还需 MCP 认证令牌。
安装前请注意
非官方项目,未获 Hive 或英国燃气认可;使用未公开的 API,Hive 可随时更改。HIVE_PASSWORD 会被保存以便作为已记住设备自动重新登录,一次性短信登录需开启 HIVE_ALLOW_LOGIN_TOOLS。写入默认关闭;开启 HIVE_ALLOW_WRITES 后助手可改动真实住宅的供暖、热水、插座和灯具,建议配合 HIVE_MAX_TEMP、HIVE_TOOLSETS 和 HIVE_AUDIT_LOG。raw 工具集可调用任意 API 路径,未列出时默认关闭。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hive heating,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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.

来源:README.md,提交 66f1f0c

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:该软件包类型无法在沙箱中运行。

版本历史

1
  1. v0.3.1最新Oct 22, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分