# MACP OpenClaw Plugin This plugin registers a new OpenClaw ACP runtime backend named `macp`. When OpenClaw calls `sessions_spawn(runtime: "macp", agentId: "pi")`, the plugin runs a Pi agent turn in-process using the MACP Pi runner logic and streams Pi output back as ACP runtime events. ## Current behavior - Supports `agentId: "pi"` only - Supports ACP `mode: "oneshot"` only - Rejects persistent ACP sessions - Reuses the Pi default tools from `tools/macp/dispatcher/pi_runner.ts` ## Install in OpenClaw Add the plugin entry to your OpenClaw config: ```json { "plugins": ["~/src/mosaic-mono-v1/plugins/macp/src/index.ts"] } ``` ## Optional config ```json { "plugins": [ { "source": "~/src/mosaic-mono-v1/plugins/macp/src/index.ts", "config": { "defaultModel": "openai/gpt-5-mini", "systemPrompt": "You are Pi running via MACP.", "timeoutMs": 300000, "logDir": "~/.openclaw/state/macp" } } ] } ``` ## Verification ```bash pnpm exec tsc --noEmit -p plugins/macp/tsconfig.json ```