# SynthesisAgent.ClaudePlugin Stdio MCP server registered as a Claude Code `--channels server:` source. Lives inside every long-lived Claude process spawned by SynthesisAgent.OpenclawPlugin. ## What it does - Connects out (WebSocket) to OpenclawPlugin's bridge on startup, sends `hello` - Listens for `inbound` frames → emits `notifications/claude/channel` so Claude opens a new turn - Exposes a single `reply(text, final?)` MCP tool — the model calls it to send its answer back to the OpenClaw side ## Capability declaration (important detail) ```ts new Server({...}, { capabilities: { tools: {}, experimental: { 'claude/channel': {}, }, }, }) ``` Top-level placement of `'claude/channel'` is silently ignored — Claude Code logs `"server did not declare claude/channel capability"`. Verified 2026-05-14 against the official Anthropic discord plugin source. ## Required env vars Set by OpenclawPlugin's process-manager when spawning claude: | Var | Example | |-----|---------| | `SYNTHESIS_WS_URL` | `ws://127.0.0.1:18901/bridge` | | `SYNTHESIS_OPENCLAW_SESSION` | `developer::discord:channel:123` | | `SYNTHESIS_CLAUDE_SESSION` | `` | ## Manual registration (laptop smoke test) To use this MCP server with `claude --channels server:synthesis`, register it once globally: ```bash claude mcp add --scope user synthesis -- bun run /absolute/path/to/server.ts ``` Then OpenclawPlugin can spawn: ```bash claude --channels server:synthesis \ --dangerously-load-development-channels server:synthesis \ --resume \ --permission-mode bypassPermissions ``` (The `--dangerously-load-development-channels` flag triggers a one-time interactive dev-mode confirmation. OpenclawPlugin's process-manager pipes "1\n" to stdin shortly after spawn to dismiss it automatically.) ## Tool surface (v1) Just `reply`. The model uses Claude Code's built-in tools (Read, Edit, Bash, etc.) for any actual work; `reply` is purely the output channel. `reply(text, final=true)` sends a complete answer. `reply(text, final=false)` queues a progress chunk; OpenclawPlugin buffers chunks until a final call arrives. ## License Apache-2.0 (modeled after Anthropic's official `discord@claude-plugins-official` plugin).