Control4 MCP驱动程序,通过"模型背景协议"(Model Control Protocol),通过LLMs使你的智能家用自然语言控制.
概览
一个Control4 DriverWorks驱动程序,通过模式上下文协议(MCP)在HTTP上暴露出你的智能家庭. 将任何MCP相容的AI客户端——克洛德代码(Claude Code),克洛德桌面(Claude Desktop),OpenClaw(OpenClaw)等——指向您的控制器,用自然语言控制您的家. :控制4 OS 3.3.0+. 在控制器上生成HTTPS证书需要OS 3.4.1+. - 直接在Control4控制器上运行一个MCP服务器——不需要外部服务器——通过标准的MCP工具来运行 Exposes设备状态,房间布局,以及控制 - 支持灯光,自动调温器,百叶窗,锁接器,中继器,传感器,体验按钮,以及更多 - 以房间为中心的媒体控制 - 播放/暂停,音量,源选择,广播音频站,多房间会话 - 为局域网安全提供熊儿标志认证 - HTTP和HTTPS运输 1. 下载 c4mcp.c4z(或从源头建造——见Building) 2. 通过Composers Pro(Controllers下的研究)在您的控制器上安装 c4mcp.c4z.
概述(AI 翻译)
** 下载C4mcp.c4z**
一个Control4 DriverWorks驱动程序,通过模式上下文协议(MCP)在HTTP上暴露出你的智能家庭. 将任何MCP相容的AI客户端——克洛德代码(Claude Code),克洛德桌面(Claude Desktop),OpenClaw(OpenClaw)等——指向您的控制器,用自然语言控制您的家.
** 要求**:控制4 OS 3.3.0+. 在控制器上生成HTTPS证书需要OS 3.4.1+.
∮它会怎样∮
- 直接在控制4控制器上运行 MCP 服务器——不需要外部服务器
- 通过标准的 MCP 工具进行曝光设备状态、房间布局和控制
- 支持灯光、自动调温器、百叶窗、锁、继电器、传感器、体验按钮等
- 以房间为中心的媒体控制——播放/暂停、音量、源选择、广播音频站、多会议室会议
- 局域网安全标志认证
- HTTP和HTTPS运输
□ 快开始
- 下载 c4mcp.c4z(或从源入-见 Building)
- 通过Composers Pro(在Controllers下搜索)在控制器上安装
c4mcp.c4z - 转到驱动程序动作标签并按Generate API键,输入一个名称并选择了Write范围(阅读只能查看;Full也可以编辑设备配置).
本页由 AI 翻译,技术细节请以原文为准。
README
C4MCP — Control4 MCP Server
A Control4 DriverWorks driver that exposes your smart home via the Model Context Protocol (MCP) over HTTP. Point any MCP-compatible AI client — Claude Code, Claude Desktop, OpenClaw, etc. — at your controller and control your home with natural language.
Requires: Control4 OS 3.3.0+. Generating the HTTPS certificate on the controller requires OS 3.4.1+.
What It Does
- Runs an MCP server directly on the Control4 controller — no external server needed
- Exposes device state, room layout, and control via standard MCP tools
- Supports lights, thermostats, blinds, locks, relays, sensors, experience buttons, and more
- Room-centric media control — play/pause, volume, source selection, broadcast audio stations, multi-room sessions
- Bearer token authentication for LAN security
- HTTP and HTTPS transport
Quick Start
- Download c4mcp.c4z (or build from source — see Building)
- Install
c4mcp.c4zon your controller via Composer Pro (search under Controllers) - Go to the driver’s Actions tab and press Generate API Key, entering a name and choosing the Write scope (Read can only view; Full can also edit Device Profiles). Copy the key from the Last Generated Key property (auto-clears after 30s)
- Configure your MCP client to connect to
http://:9201/mcpwith the API key as a Bearer token
See the full documentation for client configuration examples, HTTPS setup, device profiles, troubleshooting, and more.
Building
Requires DriverPackager and DriverValidator (Windows/WSL) in PATH.
make build # Build c4mcp.c4z
make clean # Remove build artifacts
Install the resulting c4mcp/build/c4mcp.c4z on your controller via Composer Pro.
Project Structure
c4mcp/
├── driver.lua # Entry point
├── driver.xml # Driver manifest
├── c4mcp.c4zproj # Build project file
├── modules/
│ ├── mcp_server.lua # MCP JSON-RPC protocol handler
│ ├── http_server.lua # Raw TCP → HTTP server
│ ├── server.lua # Server lifecycle (HTTP/HTTPS)
│ ├── auth.lua # API key authentication
│ ├── c4_home.lua # Smart home data layer
│ ├── c4_media.lua # Media status and control
│ ├── control.lua # Device control dispatch
│ ├── device_config.lua # Custom device profiles
│ └── device_types.lua # Per-type control handlers
└── www/
└── documentation.html # Full documentation
License
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →