C4 MCP Server

Control4 MCP server (Python) - npm wrapper for easy setup/run

Local serverstdioPython

What is the C4 MCP MCP server?

Control4 MCP server (Python) - npm wrapper for easy setup/run. The c4 mcp mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 14 defined tools rather than through you.

What it actually does

Turn your Control4 system into a Model Context Protocol (MCP) toolset, so any MCP-capable client (Claude Desktop, custom agents, scripts) can query rooms/devices and safely run automations.

  • Works with real MCP clients — HTTP transport for dev/scripts + STDIO JSON-RPC for clients like Claude Desktop
  • One integration point for many clients — use the same toolset from Claude Desktop, scripts, or your own agents without rewriting Control4 logic
  • Structured tool schemas = fewer mistakes — explicit inputs/outputs (room/device IDs, levels, setpoints, etc.) reduce ambiguity vs. prompt-only automations
  • Safe-by-default controls — optional write guardrails, read-only mode, and allow/deny lists for state-changing tools
  • Session memory for follow-ups — enables natural multi-step flows like “turn on the basement lights… now dim those lights”
  • Smarter “lights” semantics — room-based lighting ops avoid accidentally targeting fans/heaters/outlets

Its toolset

Everything the assistant can do here goes through one of these:

  • Safe-by — default controls**: optional write guardrails, read-only mode, and allow/deny lists for state-changing tools
  • One — command validation**: an end-to-end runner exercises HTTP + STDIO so you can ship changes with confidence
  • Example — GET http://<NAS_IP>:3334/mcp/list
  • Name — c4-mcp
  • Category — Home Automation / Control4
  • Repohttps://github.com/randybritsch/c4-mcp
  • Transports — - STDIO (JSON-RPC): claude_stdio_server.py (for Claude Desktop and other stdio-based MCP clients)
  • Recommended — set C4_CONFIG_PATH to a local config.json that contains host, username, password (keep this file gitignored)
  • Optional — set C4_HOST (non-secret) to override host from config.json
  • python3 — m venv .venv
  • File — %APPDATA%\Claude\claude_desktop_config.json
  • C4_CONFIG_PATH — point to a config.json stored elsewhere

Configuration

You will need 8 environment variables: PYTHONUTF8, PYTHONIOENCODING, C4_STDIO_TOOL_MODE, C4_CONFIG_PATH, C4_WRITE_GUARDRAILS, C4_WRITES_ENABLED, C4_DIRECTOR_TIMEOUT_S, C4_GET_ALL_ITEMS_TIMEOUT_S. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Adding it to your client

The server ships on PyPI as c4-mcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

When to reach for it

Among the knowledge and memory options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. C4 MCP's toolset — Safe-by, One, Example and 11 more — is a fair guide to whether it matches your workflow. It is maintained by randybritsch; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against C4 MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch C4 MCP.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the c4 mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
Safe-bydefault controls**: optional write guardrails, read-only mode, and allow/deny lists for state-changing tools.
Onecommand validation**: an end-to-end runner exercises HTTP + STDIO so you can ship changes with confidence.
ExampleGET http://<NAS_IP>:3334/mcp/list
Namec4-mcp
CategoryHome Automation / Control4
Repohttps://github.com/randybritsch/c4-mcp
Transports- **STDIO (JSON-RPC)**: claude_stdio_server.py (for Claude Desktop and other stdio-based MCP clients)
Recommendedset C4_CONFIG_PATH to a local config.json that contains host, username, password (keep this file gitignored)
Optionalset C4_HOST (non-secret) to override host from config.json
python3m venv .venv
File%APPDATA%\Claude\claude_desktop_config.json
C4_CONFIG_PATHpoint to a config.json stored elsewhere
c4_list_roomsc4_find_rooms / c4_resolve_room (search by name)
c4_shade_listc4_shade_get_state (returns position 0-100 when available)

How to install the C4 MCP MCP server

{
	"mcpServers": {
		"c4-mcp": {
			"command": "C:\\Users\\YOUR_USER\\c4-mcp\\.venv\\Scripts\\python.exe",
			"args": ["-u", "C:\\Users\\YOUR_USER\\c4-mcp\\claude_stdio_server.py"],
			"cwd": "C:\\Users\\YOUR_USER\\c4-mcp",
			"env": {
				"PYTHONUTF8": "1",
				"PYTHONIOENCODING": "utf-8",
				"C4_STDIO_TOOL_MODE": "compact",
				"C4_CONFIG_PATH": "C:\\Users\\YOUR_USER\\c4-mcp\\config.json",
				"C4_WRITE_GUARDRAILS": "true",
				"C4_WRITES_ENABLED": "false",
				"C4_DIRECTOR_TIMEOUT_S": "30",
				"C4_GET_ALL_ITEMS_TIMEOUT_S": "75"
			}
		}
	}
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
PYTHONUTF8Configuration value read at startup.Optional
PYTHONIOENCODINGConfiguration value read at startup.Optional
C4_STDIO_TOOL_MODEConfiguration value read at startup.Optional
C4_CONFIG_PATHFilesystem location the server is allowed to use.Optional
C4_WRITE_GUARDRAILSConfiguration value read at startup.Optional
C4_WRITES_ENABLEDConfiguration value read at startup.Optional
C4_DIRECTOR_TIMEOUT_SFilesystem location the server is allowed to use.Optional
C4_GET_ALL_ITEMS_TIMEOUT_SConfiguration value read at startup.Optional

Example prompts to try

  • Use C4 MCP to Safe-by.
  • Use C4 MCP to One.
  • Use C4 MCP to Example.

Frequently asked questions

It connects C4 MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Safe-by, One, Example, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with C4 MCP directly.