Agents & MCP
Drive Hypercolor with AI agents over MCP and the CLI: 16 tools, 5 resources, 3 prompts, plus a scriptable command line.
Hypercolor is built to be driven by AI agents. Point an assistant at the daemon and it can read the live lighting state, browse the effect catalog, apply visuals, tune brightness, manage scenes, and diagnose a misbehaving device, all over two complementary surfaces: a built-in MCP server and a scriptable CLI. This section shows how to wire them up and put them to work.
Hypercolor exposes the same engine through every interface. Whether an agent calls an MCP tool, runs a CLI command, or hits the REST API, it operates on one shared state through the event bus, so a change made one way is instantly visible everywhere.
๐Two surfaces, one engine ๐ฎ
There are two ways to put an agent in control. They are not competitors. Most real workflows cross between them.
| Surface | Transport | Best for |
|---|---|---|
| MCP server | Streamable HTTP at http://127.0.0.1:9420/mcp | Conversational assistants (Claude, Cursor, Zed) that speak the Model Context Protocol natively |
CLI (hypercolor) | HTTP to the daemon on :9420 | Shell scripts, cron jobs, CI, and agents that shell out and branch on exit codes |
The MCP server gives a model structured tools, browsable resources, and ready-made prompts. The CLI gives any agent that can run a command a machine-readable contract through --json output and exit codes. When a job needs both, for example building an effect with the SDK and then applying it, you reach across the line: the SDK authoring CLI installs the effect, then an MCP tool or the daemon CLI applies it.
The MCP server is off by default. Until you enable it in config, http://127.0.0.1:9420/mcp returns 404. Start at MCP setup, which leads with turning it on.
๐The three MCP primitives
The MCP server speaks in three kinds of building blocks. Knowing which is which tells an agent how to use it.
graph TD
A[AI Agent] -->|calls| T[Tools]
A -->|reads| R[Resources]
A -->|invokes| P[Prompts]
T -->|act on| E[Hypercolor Engine]
R -->|reflect| E
P -->|orchestrate| T
P -->|reference| RTools are actions and queries the model invokes with structured arguments, the verbs. There are 16: set_effect, list_effects, stop_effect, set_color, get_devices, set_brightness, get_status, activate_scene, list_scenes, create_scene, get_audio_state, get_sensor_data, set_display_face, set_profile, get_layout, and diagnose. Eight of those are read-only (get_status, list_effects, get_devices, get_audio_state, get_sensor_data, list_scenes, get_layout, diagnose); the rest mutate state. See the tools reference.
Resources are browsable, read-only views of live state under the hypercolor:// scheme, the nouns. There are 5: hypercolor://state, hypercolor://devices, hypercolor://effects, hypercolor://profiles, and hypercolor://audio. An agent reads a resource to orient itself before acting. See the resources reference.
Prompts are guided, parameterized templates a client surfaces as slash commands. There are 3: mood_lighting, troubleshoot, and setup_automation. Each one encodes a known-good flow so the model does not have to invent it. See prompt templates.
The server ships its own operating instructions to every connected client: start with get_status or the hypercolor://state resource before making changes, use list_effects to discover the catalog before applying visuals, and prefer structured arguments and resource reads over guessing the current state. That read-then-act discipline is the through-line for every agent workflow here.
๐Where to go next
New to agent control? Walk it in order: enable the server, learn the tools, then study a worked playbook.
- MCP setup โ Turn the server on, then copy-paste connection config for Claude Code, Claude Desktop, Cursor, Zed, and generic MCP clients.
- Tools reference โ All 16 tools with arguments, defaults, enums, read-only and idempotency flags, and a worked call for each.
- Resources reference โ The 5
hypercolor://resources, their payload shapes, and how fresh each one is. - Prompt templates โ The 3 shipped prompts, their arguments, and when each one fits.
- CLI scripting for agents โ Drive the daemon from a shell:
--jsonoutput, exit codes, env vars, and a state-first workflow. - Agent workflows โ End-to-end playbooks with real call-and-response pairs: set a calm scene, build and apply an effect, diagnose a sick device.
๐Authentication in one line
Local agents need no credentials. Loopback requests bypass auth entirely, so an assistant talking to 127.0.0.1:9420 just works. A bearer token is only required when the daemon is reached from a non-loopback address, in which case the agent sends Authorization: Bearer <token> using a key from HYPERCOLOR_API_KEY (control) or HYPERCOLOR_READ_API_KEY (read-only). Full detail, including the loopback exemption and remote-client allowlisting, lives in MCP setup.
๐Beyond MCP: the CLI as an agent tool
Any agent that can run a shell command can drive Hypercolor without speaking MCP at all. The hypercolor CLI emits machine-readable JSON with -j (or --format json) and exits non-zero on failure, so an agent can branch on the result. Three top-level commands are easy to confuse, so keep them straight:
hypercolor serverโ query the daemonโs identity, version, capabilities, and run a quick health check.hypercolor serversโ discover Hypercolor daemons advertised over mDNS on the local network and save them as connection profiles.hypercolor serviceโ manage the daemonโs lifecycle (start, stop, restart, enable or disable autostart, tail logs).
Read the full command tree and agent recipes in CLI scripting for agents, backed by the complete CLI reference.
In this section
MCP setup
Enable the Hypercolor MCP server and connect it to Claude Code, Claude Desktop, Cursor, Zed, and generic MCP clients.
Tools reference
All 16 Hypercolor MCP tools: arguments, defaults, enums, read-only and idempotency flags, and a worked call for each.
Resources reference
The five hypercolor:// MCP resources: ambient read-only context for state, devices, effects, profiles, and audio, with verified JSON shapes.
Prompt templates
The three shipped Hypercolor MCP prompts: mood_lighting, troubleshoot, and setup_automation, with arguments, message flows, and when to reach for each.
CLI scripting for agents
Use the hypercolor CLI as an agent tool: JSON output, exit codes, env vars, a state-first workflow, and jq recipes.
Agent workflows
Three worked agent playbooks for Hypercolor: set a calm scene, build and apply an effect, and diagnose a sick device.
Publishing to the MCP Registry
Publish the Hypercolor MCP server to the official registry: server.json, the io.github.hyperb1iss/hypercolor namespace, and submission.