SuperAPIAI Directory

debmatic-mcp

github.com · AI agents

Control a HomeMatic/debmatic CCU: switch and dim actuators, read sensors and system variables, run programs and manage rooms, links and devices.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

debmatic-mcp (repository name ccu-mcp) is an MCP server for controlling smart home devices via the JSON-RPC API of a HomeMatic CCU. It connects directly to the CCU in the local network, without plugins, XML-API, or cloud services, and exposes devices, rooms, programs, and system variables as MCP tools for Claude, Cursor, or any MCP client to call.

Purpose

This tool enables AI assistants to interact with a HomeMatic smart home, for example asking "What is the temperature in the bathroom?" "Is any window open?" "Set the living room heating to 21 degrees" "Show all low-battery devices" "What is the gas meter reading?" and so on. The MCP server handles device discovery, type resolution, session management, and value conversion, so the AI only needs to call the tools.

Main capabilities

  • Switching and dimming actuators
  • Reading sensors and system variables
  • Running programs
  • Managing rooms, links, and devices
  • Device discovery, type resolution, session management, and value conversion
  • Support for querying low-battery or long-unseen devices, finding channels whose names do not match the device name, renaming devices by floor label (UG/OG/EG), and more

Compatibility

Works with any HomeMatic CCU: debmatic (HomeMatic on Debian), CCU3, or OpenCCU (formerly RaspberryMatic) — any device that exposes the standard /api/homematic.cgi endpoint.

Usage

Prerequisites

  • A running HomeMatic CCU (debmatic, CCU3, or OpenCCU) reachable on the network
  • The CCU's administrator username and password (the same as for logging in to the WebUI)
  • Node.js 24+ (running from source or in stdio mode) or Docker

Run modes

There are two ways to run it: stdio (the server runs as a subprocess of the MCP client) or HTTP (the server runs independently in Docker and clients connect over the network).

Option A: stdio (direct, simplest)

The MCP client (Claude Code, Cursor, etc.) starts the server as a subprocess, with no need for Docker, network configuration, or an authentication token. Create a .mcp.json file in the project directory, replace CCU hostname or IP and the administrator password, restart Claude Code, and run /mcp to check the connection. The Claude Code CLI can also be used.

Option B: Docker (standalone HTTP server)

Suitable for scenarios where you want the server to run independently (such as a home server, multi-client access, or an MCP client that supports HTTP remote). The image is published on GHCR and supports linux/amd64 and linux/arm64. You need to set MCP_ALLOWED_HOSTS to allow remote clients, obtain an authentication token, configure the MCP client, and check the health status.

Guided setup

npx ccu-mcp init probes the CCU, pins the TLS certificate, tests login, writes a working .env file, and prints the matching MCP client configuration. ccu-mcp doctor can recheck certificate pinning.

LLM-guided setup (setup mode)

When the server is started with --stdio --env <path> and the configuration is missing or incomplete, it enters setup mode and exposes four setup_* tools (setup_status, setup_probe, setup_write_profile, setup_test), allowing the LLM to guide the probe→pin→test login→write process through chat. The password does not pass through the model or the chat history; instead, it is entered via the local command npx ccu-mcp secret <profile> --env /path/to/.env.

Configuration

All configuration is done through environment variables. The required CCU_HOST / CCU_PASSWORD can be provided via an inline .mcp.json, a shell export, or a .env file. Multiple CCU targets (named profiles) are supported.

Security

  • HTTPS is supported, with the option to pin a certificate fingerprint (CCU_TLS_FINGERPRINT), trust a CA/self-signed PEM (CCU_CA_CERT), or use the system trust store (CCU_TLS_VERIFY=true)
  • HTTP mode supports bearer token authentication, token rotation and expiration, DNS rebinding protection, and a CORS allowlist
  • A fail2ban configuration template is provided

Use Cases

  • Query and control HomeMatic smart home devices via an AI assistant
  • Manage devices, rooms, programs, and system variables
  • Batch rename devices, find abnormal devices
  • Multi-CCU environments (e.g., production and development CCUs)

Limitations

  • Requires an accessible HomeMatic CCU and valid credentials
  • Requires Node.js 24+ or Docker
  • Setup mode only supports stdio
  • Some script tools require an ADMIN-level user
  • No information on fees, pricing, or platform restrictions is provided
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools