debmatic-mcp
The debmatic-mcp server connects an AI assistant (like Claude or Cursor) to a HomeMatic smart home system (debmatic, CCU3, or RaspberryMatic), enabling discovery, monitoring, and control of smart home devices through 18 tools, resources, and prompts.
š Discover & List
list_devicesā Discover all devices with channels, types, and addresses; filter by room, function, type, or namelist_rooms/list_functionsā List rooms and function groups (e.g. Heating, Lighting) with assigned channelslist_interfacesā List available communication interfaces (BidCos-RF, HmIP-RF, VirtualDevices, etc.)list_programs/list_system_variablesā List automation programs and system variables, with optional name filteringdescribe_device_typeā Get the full channel/datapoint schema for a device type, including parameters, types, and value ranges
š Read State
get_valueā Read a single datapoint value from a device channel (e.g. temperature, window state)get_valuesā Bulk-read datapoint values for multiple channels, or filter by room/functionget_paramsetā Read all parameters for a channel (VALUES, MASTER, or LINK paramsets)
āļø Control Devices & Automation
set_valueā Set a single datapoint value (e.g. set thermostat temperature, toggle a switch)put_paramsetā Write multiple parameters at once (e.g. update a thermostat weekly profile)set_system_variableā Update a system variable valueexecute_programā Trigger an automation program on the CCU
𩺠Monitor Health
get_service_messagesā View active service messages: low battery alerts, unreachable devices, etc.get_system_infoā Retrieve CCU system info: firmware version, serial number, and addresses
š ļø Advanced & Usability
run_scriptā Execute arbitrary HomeMatic Script on the CCU for bulk operations or anything not covered by other toolshelpā Context-aware help: general guide, tool-specific usage, or device type capabilitiesBrowsable JSON resources (devices, rooms, functions, programs, sysvars, etc.) that clients can attach as context
Built-in prompt workflows for common tasks like checking windows, setting heating, good-night routines, and diagnostics
Automatic interface and value type resolution for most operations
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@debmatic-mcpWhat's the temperature in the living room?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
debmatic-mcp
Talk to your HomeMatic smart home from Claude, Cursor, or any MCP client.
debmatic-mcp connects to the CCU's built-in JSON-RPC API and exposes your devices, rooms, programs, and system variables as MCP tools. No addons, no XML-API, no cloud ā just a direct connection to the CCU on your local network.
Built for debmatic (HomeMatic on Debian) but works with any CCU3 or RaspberryMatic installation that exposes the standard /api/homematic.cgi endpoint.
What can it do?
Ask your AI assistant things like:
"What's the temperature in the bathroom?"
"Are any windows open?"
"Set the living room heating to 21 degrees"
"Show me all devices with low battery"
"What's the gas meter reading?"
"Which devices have low battery or haven't been seen in a long time?"
"Find all channels whose names don't match their device name"
"Rename all devices to follow a consistent naming convention with floor labels (UG/OG/EG)"
"Which room is the window sensor in?"
The MCP server handles device discovery, type resolution, session management, and value conversion ā the AI just calls the tools.
Related MCP server: Home Assistant MCP
Prerequisites
A running HomeMatic CCU (debmatic, CCU3, or RaspberryMatic) reachable on your network
The CCU's admin username and password (the same credentials you use to log into the WebUI)
Node.js 22+ (for running from source or stdio mode) or Docker
Quick start
export CCU_HOST=your-ccu-hostname-or-ip
export CCU_PASSWORD=your-ccu-admin-password
npx debmatic-mcp --stdioIf it prints server_ready to stderr, it's working. Press Ctrl+C to stop. Now set it up in your MCP client ā see below.
Installation
There are two ways to run this: stdio (the server runs as a subprocess of your MCP client) or HTTP (the server runs standalone in Docker and clients connect over the network). Pick one.
Option A: stdio (direct, simplest)
This is the easiest setup. Your MCP client (Claude Code, Cursor, etc.) starts the server as a child process ā no Docker, no network config, no auth tokens.
For Claude Code, create a .mcp.json file in your project directory (or any directory where you'll use Claude Code):
{
"mcpServers": {
"debmatic": {
"command": "npx",
"args": ["debmatic-mcp", "--stdio"],
"env": {
"CCU_HOST": "your-ccu-hostname-or-ip",
"CCU_PASSWORD": "your-ccu-admin-password"
}
}
}
}Replace your-ccu-hostname-or-ip with your CCU's hostname (like homematic-ccu3) or IP (like 192.168.1.50), and your-ccu-admin-password with the password you use to log into the CCU WebUI.
Restart Claude Code. Run /mcp to check it connected. You should see debmatic in the list.
Alternatively, use the Claude Code CLI:
claude mcp add debmatic -- npx debmatic-mcp --stdioOption B: Docker (standalone HTTP server)
Use this if you want the server running independently ā for example on a home server, accessible to multiple clients, or when your MCP client supports HTTP remotes.
1. Start the container:
docker run -d \
--name debmatic-mcp \
-e CCU_HOST=your-ccu-hostname-or-ip \
-e CCU_PASSWORD=your-ccu-admin-password \
-v debmatic-data:/data \
-p 3000:3000 \
debmatic-mcp2. Get the auth token. The server generates a random bearer token on first startup and saves it inside the container's data volume. You need this token to authenticate your MCP client. Grab it with:
docker exec debmatic-mcp grep MCP_AUTH_TOKEN /data/.envThis prints something like MCP_AUTH_TOKEN=e96suzi1iG0H-GPif6K2.... The part after = is your token.
3. Configure your MCP client. If your client uses .mcp.json, add the HTTP server:
{
"mcpServers": {
"debmatic": {
"url": "http://your-server-ip:3000",
"headers": {
"Authorization": "Bearer PASTE-YOUR-TOKEN-HERE"
}
}
}
}To inject the token automatically (requires jq):
TOKEN=$(docker exec debmatic-mcp grep MCP_AUTH_TOKEN /data/.env | cut -d= -f2)
jq --arg t "$TOKEN" '.mcpServers.debmatic.headers.Authorization = "Bearer " + $t' .mcp.json > .mcp.json.tmp && mv .mcp.json.tmp .mcp.jsonThis only updates the debmatic entry ā other servers in your .mcp.json are left alone.
4. Check it's healthy:
curl http://localhost:3000/healthBrowser-based clients (CORS)
The HTTP server sends permissive CORS headers and answers OPTIONS preflight requests, so browser-based MCP clients like MCP Inspector can connect directly ā no proxy needed. Authentication is still enforced: browsers can read the endpoint, but every MCP request needs the bearer token.
CORS support was first implemented by @marcinn2 in his fork marcinn2/debmatic-mcp ā thanks!
HTTPS
If your CCU uses HTTPS (self-signed certificates are fine), add these environment variables:
CCU_HTTPS=true
CCU_PORT=443The server accepts self-signed certificates automatically ā certificate verification is off by default because CCUs ship with self-signed certs. If your CCU has a proper certificate, enable verification with CCU_TLS_VERIFY=true.
Configuration
All configuration is via environment variables:
Variable | Default | Description |
| required | Hostname or IP of your CCU |
| required | CCU admin password |
|
| CCU username |
|
| API port ( |
|
| Connect via HTTPS (self-signed certs supported) |
|
| Verify the CCU's TLS certificate (enable if you have a proper cert) |
|
| CCU request timeout in milliseconds |
|
| HM Script execution timeout in milliseconds |
|
|
|
|
| Where to store device type cache and session |
|
| Cache lifetime in seconds (24h) |
|
|
|
|
| HTTP server port (HTTP mode only) |
| auto-generated | Bearer token for HTTP mode; generated and saved to |
|
| Max burst of requests sent to the CCU |
|
| Sustained CCU requests per second |
|
| Seconds between polls for MCP resource change notifications |
Tools
18 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, describe_device_type
Read state ā get_value, get_values (bulk), get_paramset
Change things ā set_value, put_paramset, set_system_variable, execute_program
Check health ā get_service_messages, get_system_info
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 notifies connected clients when the device list changes.
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 roomset-heatingā set a room's target temperaturegood-nightā prepare the house for nightdiagnosticsā check for device issuesdevice-infoā detailed info about a device's capabilities and parameters
How it works
The server talks to the CCU's JSON-RPC API (the same one the WebUI uses). On startup it:
Logs in and caches the session (reused across restarts)
Loads the device type cache from disk (or warms it in the background)
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.
Related projects
debmatic ā Run HomeMatic on Debian, Ubuntu, Raspberry Pi OS, Armbian
OCCU ā Open CCU SDK by eQ-3 (the upstream HomeMatic software)
RaspberryMatic ā HomeMatic on Raspberry Pi
MCP ā Model Context Protocol specification
License
MIT
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/claymore666/debmatic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server