Back to Home
randybritsch icon

c4-mcp

Verified Safe

by randybritsch

Overview

Exposes Control4 home automation capabilities as Model Context Protocol (MCP) tools for AI agents and other clients to query rooms/devices and safely run automations on a local network.

Installation

Run Command
python app.py

Environment Variables

  • C4_CONFIG_PATH
  • C4_HOST
  • C4_USERNAME
  • C4_PASSWORD
  • C4_TOKEN_TTL_S
  • C4_AUTH_TIMEOUT_S
  • C4_DIRECTOR_TIMEOUT_S
  • C4_HTTP_TIMEOUT_S
  • C4_GET_ALL_ITEMS_TIMEOUT_S
  • C4_ITEMS_CACHE_TTL_S
  • C4_STDIO_TOOL_MODE
  • C4_STDIO_TOOL_ALLOWLIST
  • C4_STDIO_TOOL_DENYLIST
  • C4_STDIO_DEBUG
  • C4_WRITES_ENABLED
  • C4_WRITE_GUARDRAILS
  • C4_WRITE_ALLOWLIST
  • C4_WRITE_DENYLIST

Security Notes

The project is designed with security in mind for local network operation. Credentials (host, username, password) are loaded from a gitignored `config.json` or environment variables, with explicit warnings against committing secrets. It enforces 'safe-by-default' controls, requiring explicit environment variable (`C4_WRITES_ENABLED=true`) to enable state-changing actions, and supports allow/deny lists for tools. Network communication with the Control4 Director on the local LAN uses `aiohttp` with `ssl=False`, which disables certificate verification. This is a common practice for local systems with self-signed certificates but means it won't detect local Man-in-the-Middle attacks. The `discover_controller.py` tool performs local IP scanning, which is a discovery feature. No 'eval' or obvious malicious patterns were found. Overall, it's responsibly built for its intended local-only use case.

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2026-01-17

Tags

Control4Home AutomationMCPAI AgentLocal NetworkPython