Skip to content

v2.2.0 — MCP Server for LLM Agent Access

Choose a tag to compare

@gfargo gfargo released this 15 May 12:20
· 47 commits to main since this release
c4c846a

Highlights

MCP Server — Connect Claude Desktop, ChatGPT, Cursor, or any MCP-capable agent to the rig. New lighting-mcp.service exposes the entire control surface as a Model Context Protocol endpoint over Streamable HTTP at http://lights.local:5001/mcp. Agents discover fixtures, groups, and scenes through structured tool calls — no hand-rolled REST integration code.

Thin-wrapper architecture, single-writer preserved. The MCP server is a FastMCP process that calls the existing Flask control server over localhost:5000. The persistent QLC+ WebSocket still has exactly one owner (Flask), so the MCP service is stateless and crash-safe to restart.

Structured /api/action endpoint added to the Flask control server, letting the MCP server dispatch actions without going through the natural-language AI interpreter. The LLM is already on the other end of the MCP socket — re-interpreting its structured tool call as English would be wasted latency.

What's New

MCP Server (mcp-server/)

  • FastMCP server on Streamable HTTP (:5001/mcp)
  • 7 discovery tools: get_status, list_fixtures, get_fixture_channels, list_groups, list_scenes, list_templates, get_channel_values
  • 9 action tools: activate_scene, apply_template, adjust_brightness, adjust_color, fade, generate_scene, set_channel, save_scene, snapshot_scene
  • Resource: lights://workspace — one-shot dump of status + fixtures + groups + scenes + templates for session-start context
  • Bearer-token auth scaffolded via MCP_BEARER_TOKEN env var (plumbed through systemd, not yet enforced)

Control Server (control-server/app.py)

  • New POST /api/action — structured {action, parameters, groups} dispatch that skips the AI interpreter

Provisioning

  • scripts/services/mcp_server.sh — systemd installer mirroring control_server.sh
  • lighting-mcp.service ordered After=lighting-control.service with Wants=, so the Flask backend is up first
  • UFW opens port 5001

CLI (lightsctl.sh)

  • mcp-install, mcp-status, mcp-logs, mcp-restart, mcp-uninstall

Documentation

  • New docs/MCP_SERVER.md — architecture, tool catalog, client wiring
  • New wiki page MCP-Server linked from Home, Sidebar, Architecture, Command-Reference, Control-Server
  • Marketing site (lights.griffen.codes) updated with MCP feature card, hero copy, FAQ section, and roadmap item
  • README.md, docs/CONTROL_SERVER_ARCHITECTURE.md, docs/ROADMAP.md, .kiro/steering/{product,structure,tech}.md updated for the third service

Client Wiring

Claude Desktop / Cursor MCP config:

{
  "mcpServers": {
    "qlc-lights": { "url": "http://lights.local:5001/mcp" }
  }
}

Upgrade

git pull
./lightsctl.sh control-restart   # picks up POST /api/action
./lightsctl.sh mcp-install       # provision the new MCP service

Compatibility

  • No breaking changes. Existing UI, REST API, and CLI commands unchanged.
  • New service is opt-in via mcp-install; if you don't install it, nothing changes.
  • Requires mcp[cli]>=1.2.0 (installed automatically into a dedicated venv by mcp-install).