" more than once` | Duplicate profile name. |
| `... both map to the same env prefix CCU__* — rename one` | Distinct names can collide once sanitised: `prod-a` and `prod.a` both read `CCU_PROD_A_*`, so they would silently be the *same* target. |
| `CCU_DEFAULT_PROFILE="x" is not one of CCU_PROFILES (...)` | Typo in the startup profile. |
| `profile "" is missing CCU__HOST` | Every profile needs a host; the password may be empty. |
| `TLS_FINGERPRINT/CA_CERT/TLS_VERIFY is set but HTTPS is disabled` | The verification code path only exists over HTTPS. Ignoring these would leave you believing the connection is verified while credentials travel in cleartext. Set `CCU_HTTPS=true` (or `CCU__HTTPS=true`) or remove them. |
| `MCP_TLS_CERT and MCP_TLS_KEY must both be set (or both unset)` | Half a TLS config can't serve HTTPS. |
| `MCP_TRANSPORT must be "http" or "stdio"` | Case matters. A typo like `STDIO` must not silently select HTTP and leave a stdio-spawning client waiting forever. |
| ` must be a positive integer` | Ports, timeouts, `CACHE_TTL`, rate limits, `RESOURCE_POLL_INTERVAL`. The *whole* value has to be digits — `CCU_TIMEOUT=30s` is rejected rather than read as 30 ms, and `30.5` or `1e4` are rejected rather than truncated. |
| ` must be a positive number` | The two duration settings, `MCP_AUTH_TOKEN_TTL_DAYS` and `MCP_AUTH_TOKEN_GRACE_HOURS`, where a fractional value is meaningful. |
| ` must be "true" or "false"` | Any boolean setting (`CCU_HTTPS`, `CCU_TLS_VERIFY`, `CCU__PROTECTED`, `CCU__READONLY`, `MCP_ALLOW_PLAINTEXT`). Surrounding whitespace and capitalisation are fine; `yes`, `1` and `on` are not, because treating them as *false* would quietly switch a protection off. |
| `CCU_CA_CERT could not be read` | Path is wrong or unreadable by the server user. |
`ccu-mcp --version` and `--help` work without any configuration, so they stay
usable while you sort one of these out.
## Tools
28 tools organized by what you'd actually want to do:
**Find things** — `list_devices`, `list_rooms`, `list_functions`, `list_interfaces`, `list_programs`, `list_system_variables`, `list_links`, `describe_device_type`
**Read state** — `get_value`, `get_values` (bulk), `get_paramset`
**Change things** — `set_value`, `put_paramset`, `set_system_variable`, `create_system_variable`, `delete_system_variable`, `assign_channel`, `unassign_channel`, `execute_program`
**Check health** — `get_service_messages`, `acknowledge_service_messages`, `get_rssi`, `get_system_info`
**Switch targets** — `list_ccu_targets`, `get_connection_info`, `use_ccu` (multi-CCU profiles; see above)
**Other** — `help` (context-aware), `run_script` (raw HomeMatic Script for bulk operations, renaming devices/channels, querying room membership, or anything not covered by the other tools)
Most tools auto-resolve the interface and value types from the device address — you don't need to know whether a device is on BidCos-RF or HmIP-RF.
## Resources and prompts
Besides tools, the server exposes MCP **resources** — browsable JSON snapshots your client can attach as context:
`homematic://devices`, `homematic://rooms`, `homematic://functions`, `homematic://programs`, `homematic://sysvars`, `homematic://interfaces`, `homematic://device-types`, `homematic://system`
The server polls the CCU in the background (every `RESOURCE_POLL_INTERVAL` seconds) and sends `notifications/resources/updated` for resources whose content changed — to clients that subscribed to them via `resources/subscribe`.
It also ships MCP **prompts** — ready-made workflows you can invoke from clients that support them (e.g. as slash commands in Claude Code):
- `check-windows` — are any windows or doors open?
- `room-status` — full status report for one room
- `set-heating` — set a room's target temperature
- `good-night` — prepare the house for night
- `diagnostics` — check for device issues
- `device-info` — detailed info about a device's capabilities and parameters
The `room` and `device` arguments autocomplete: clients that support
`completion/complete` offer the rooms and device names this CCU actually has,
so there's no need to remember how a room was spelled in the WebUI.
### MCP protocol revisions
The server implements revision **`2025-11-25`** and negotiates down for older
clients (`2025-06-18`, `2025-03-26`, `2024-11-05` are all accepted) — you do
not need a particular client version. It advertises `tools`, `resources`
(with `subscribe`), `prompts`, `completions` and `logging`.
Revision `2026-07-28` — per-request protocol version, `server/discover` — is
not implemented yet: the TypeScript SDK this server is built on does not
support it at the time of writing, and this server follows the SDK.
## How it works
The server talks to the CCU's JSON-RPC API (the same one the WebUI uses). On startup it:
1. Logs in and caches the session (reused across restarts)
2. Loads the device type cache from disk (or warms it in the background)
3. Starts the MCP server on stdio or HTTP
Device type schemas are cached locally so the AI can look up valid parameters, types, and value ranges without hitting the CCU every time.
Values come back as native types — `21.5` not `"21.500000"`, `true` not `"true"`.
## Tested devices
This has been tested against a production debmatic installation with:
- HmIP-eTRV-2 / eTRV-2 I9F (radiator thermostats)
- HmIP-STHD (wall thermostats with humidity)
- HmIP-WTH-2 (wall thermostats)
- HmIP-SWDO-I (door/window contacts)
- HmIP-STHO (outdoor temperature/humidity)
- HmIP-ESI (energy/gas meter)
- HmIP-FALMOT-C12 (floor heating controller)
- HmIP-HEATING (virtual heating groups)
- HmIP-WRCC2 (wall remote)
- HM-PB-6-WM55 (BidCos 6-button remote)
- RPI-RF-MOD (radio module)
Other device types should work too — the server queries the CCU for parameter descriptions rather than maintaining a static device database.
## Changelog
Release notes — including **behavior changes to check before upgrading**
(stricter config validation, `/health` response shape, per-session write
confirmation, retry semantics) — live in [CHANGELOG.md](CHANGELOG.md).
## Getting help and contributing
- **Something broken, or an idea for a feature?** Open an issue:
[github.com/claymore666/ccu-mcp/issues](https://github.com/claymore666/ccu-mcp/issues)
- **Questions, setup help, general HomeMatic talk?** The
[HomeMatic forum](https://homematic-forum.de/) — the maintainer reads it as
`claymore666`.
- **Found a security problem?** Please don't post it publicly. See
[SECURITY.md](SECURITY.md) for private reporting.
- **Want to send a patch?** [CONTRIBUTING.md](CONTRIBUTING.md) covers the setup,
the branch to target, the coding standard, and the test policy.
Everyone taking part is expected to follow the
[Code of Conduct](CODE_OF_CONDUCT.md).
### Project documentation
| Document | What's in it |
| --- | --- |
| [ROADMAP.md](ROADMAP.md) | Where the project is going — and what it will deliberately never do |
| [GOVERNANCE.md](GOVERNANCE.md) | Who decides what, and the known continuity gap |
| [SECURITY.md](SECURITY.md) | Reporting, security requirements, threat model |
| [docs/architecture.md](docs/architecture.md) | High-level design and request flow |
| [docs/assurance-case.md](docs/assurance-case.md) | Why the security requirements hold, with evidence |
| [CHANGELOG.md](CHANGELOG.md) | What changed in each release |
## Related projects
- [OpenCCU](https://github.com/OpenCCU/OpenCCU) — community-maintained, cloud-free CCU firmware for Raspberry Pi, x86/ARM, and CCU3/ELV-Charly hardware (formerly **RaspberryMatic**; built on the OCCU framework)
- [debmatic](https://github.com/alexreinert/debmatic) — Run HomeMatic on Debian, Ubuntu, Raspberry Pi OS, Armbian
- [OCCU](https://github.com/eq-3/occu) — eQ-3's original Open CCU SDK (the upstream HomeMatic software); now being superseded by the community-maintained [OpenCCU](https://github.com/OpenCCU/OpenCCU)
- [MCP](https://modelcontextprotocol.io/) — Model Context Protocol specification
- [ccu-ai-mcp](https://github.com/mdzio/ccu-ai-mcp) by **Mathias (mdzio)** — a
kindred MCP server for HomeMatic, taking a deliberately different, elegant
approach (a lean Go core with user-defined HM-Script tools). See his write-up
on the [HomeMatic forum](https://homematic-forum.de/forum/viewtopic.php?t=88226).
## License
MIT