Domoticz Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Domoticz Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<div align="center"> <img src="logo.svg" alt="domoticz-mcp logo" width="200" height="200" /> </div>
A Model Context Protocol (MCP) server for integrating with the Domoticz home automation system. This server provides tools to AI assistants (like Claude, Gemini, etc.) to view and control your smart home devices, scenes, user variables, and more.
The server exposes Tools (for active control and modifications), Resources (for read-only contextual awareness), and Prompts (for guided interaction templates).
search_devices_tool searches devices by name or current data/status text. search_scripts_tool searches inside Domoticz event scripts.get_daily_energy_history, get_weekly_energy_history, and get_monthly_energy_history read counter graph history for energy, gas, and water meters by idx or name.toggle_switch, set_switch_state, set_dimmer_level, set_temperature_setpoint, control_blinds, set_color_brightness, and set_color_temperature control supported devices by idx or name.rename_device, delete_device, create_virtual_sensor, and update_device_value manage devices and virtual sensors.switch_scene activates configured scenes/groups by idx or name.add_user_variable, update_user_variable, and delete_user_variable manage Domoticz user variables.create_event and update_event create or update internal Domoticz event scripts.restart_system, add_log_message, send_notification, and set_security_status call Domoticz system, log, notification, and security APIs.call_domoticz_api executes a generic Domoticz command API call.High-impact tools require confirm=True: call_domoticz_api, delete_device, delete_user_variable, update_event, restart_system, and set_security_status.
idx is authoritative and type/subtype are descriptive path fields.domoticz://overview, prefer idx, and use health/log resources for troubleshooting.domoticz://dashboard.domoticz://devices and the energy history tools.httpx.AsyncClient with consistent timeout, authentication setup, and explicit close handling for owned clients.DomoticzError, DeviceNotFoundError, AuthenticationError, etc.) for precise error handling and debugging._resolve_idx() helper function for consistent device/scene/variable lookup patterns.pip:pip install .This will install the domoticz-mcp command-line tool.
uv (Recommended)If you use uv, you can run the server directly from the source repository without installing it globally:
uv run --directory /path/to/domoticz-mcp domoticz-mcpYou can run the server via Docker. By default, the Docker image runs the server in sse (HTTP) mode on port 8000.
docker run -d \
--name domoticz-mcp \
-p 8000:8000 \
-e DOMOTICZ_URL="http://192.168.1.100:8080" \
-e DOMOTICZ_USERNAME="your_username" \
-e DOMOTICZ_PASSWORD="your_password" \
ghcr.io/adrighem/domoticz-mcp:latestNote: For the OAuth2 token flow to work and persist in Docker without interactive browser prompts, see the OAuth / API Token section below on how to mount the token file or use headless authentication.
The server supports three different transports for clients to connect with:
domoticz-mcp --transport stdio domoticz-mcp --transport sse --port 8000Connection URL for clients: http://localhost:8000/sse
domoticz-mcp --transport streamable-http --port 8000Connection URL for clients: http://localhost:8000/mcp
The server can be configured via environment variables, a .env file, or command-line arguments. Environment variables take precedence over command-line arguments, which in turn override the defaults. Using a .env file is a convenient way to provide these variables without exposing them in your shell history.
| Option | Environment Variable | Default | Description |
|---|---|---|---|
--transport | DOMOTICZ_MCP_TRANSPORT, TRANSPORT | stdio | Transport to use (stdio, sse, or streamable-http) |
--host | DOMOTICZ_MCP_HOST, HOST | 127.0.0.1 | Host to bind to for SSE / HTTP |
--port | DOMOTICZ_MCP_PORT, PORT | 8000 | Port to bind to for SSE / HTTP |
--domoticz-url | DOMOTICZ_URL | http://127.0.0.1:8080 | Base URL of your Domoticz instance |
--token-file | DOMOTICZ_MCP_TOKEN_FILE, TOKEN_FILE | ~/.config/domoticz-mcp/token.json | Path to OAuth token storage file |
Example `.env` file:
DOMOTICZ_URL=http://192.168.1.100:8080
DOMOTICZ_CLIENT_ID=your_client_id_here
DOMOTICZ_CLIENT_SECRET=your_client_secret_hereBy default, the server uses standard input/output (stdio) for communication with the MCP client. You can also run it as an HTTP Server-Sent Events (SSE) streaming server using the --transport sse argument.
domoticz-mcp --transport sse --host 127.0.0.1 --port 8000You can authenticate the MCP server with Domoticz using either an OAuth/API Token (Recommended) or Basic Auth.
#### Option 1: OAuth / API Token (Recommended) This approach uses an OAuth2 token and is generally more secure.
| Option | Environment Variable | Description |
|---|---|---|
--domoticz-client-id | DOMOTICZ_CLIENT_ID, DOMOTICZ_CLIENTID | Your Application's Client ID |
--domoticz-client-secret | DOMOTICZ_CLIENT_SECRET, DOMOTICZ_CLIENTSECRET | Your Application's Client Secret |
--domoticz-oauth-token | DOMOTICZ_OAUTH_TOKEN | Direct OAuth2 access token (skips flow) |
MCP ServerInteractive Flow (Desktop/CLI): When the server runs for the first time natively on your machine, it will print an authorization URL to the console/stderr and attempt to open your browser. After you approve the request, it will save the token to the token-file for future use.
Headless Flow (Docker / Server Environments): In a Docker container, you have two options:
#### Option 2: Basic Auth If you prefer traditional username and password authentication:
| Option | Environment Variable | Description |
|---|---|---|
--domoticz-username | DOMOTICZ_USERNAME | Your Domoticz username |
--domoticz-password | DOMOTICZ_PASSWORD | Your Domoticz password |
Add the following to your ~/.gemini/settings.json under the mcpServers object:
{
"mcpServers": {
"domoticz": {
"command": "uv",
"args": [
"--directory",
"/path/to/domoticz-mcp",
"run",
"domoticz-mcp"
],
"env": {
"DOMOTICZ_URL": "http://192.168.1.x:8080",
"DOMOTICZ_CLIENT_ID": "your_client_id_here",
"DOMOTICZ_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"domoticz": {
"command": "uv",
"args": [
"--directory",
"/path/to/domoticz-mcp",
"run",
"domoticz-mcp"
],
"env": {
"DOMOTICZ_URL": "http://192.168.1.x:8080",
"DOMOTICZ_CLIENT_ID": "your_client_id_here",
"DOMOTICZ_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}If you installed it globally via pip, you can use the command directly:
{
"mcpServers": {
"domoticz": {
"command": "domoticz-mcp",
"args": [],
"env": {
"DOMOTICZ_URL": "http://192.168.1.x:8080",
"DOMOTICZ_CLIENT_ID": "your_client_id_here",
"DOMOTICZ_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}For other clients that support the Model Context Protocol, simply configure them to run the domoticz-mcp binary or the uv run command with the appropriate environment variables.
To develop and run tests for this project:
uv: uv pip install -e ".[dev]" uv run --extra dev pytest tests/ uv run --extra dev python -m buildYou can also pass --directory /path/to/domoticz-mcp to either uv run command when running from outside the repository.
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.