Summary
Tools registered via api.registerTool() in the adapter work perfectly in TUI sessions but are not visible to agent dispatch (openclaw agent --agent X --message "..."). This is an OpenClaw core architectural constraint, not a bug in the adapter — but it's worth documenting since it affects anyone trying to use MCP tools from headless agent runs.
Root Cause
api.registerTool() registers at the gateway runtime level only
- TUI sessions share the gateway runtime, so they see plugin-registered tools
- Agent dispatch builds its tool set from the core tool registry, which doesn't query plugins
- The ACP layer explicitly disables MCP capabilities (
mcpCapabilities sets HTTP and SSE to false)
- MCP servers passed during session creation are silently ignored
- OpenClaw Issue #4834 (native MCP support) was closed as "not planned" (2026-02-01)
What We Tried
tools.alsoAllow in agent config → read as tools.allow, "unknown entries" warning
tools at agents.defaults level → not valid (only per-agent)
- Multiple config permutations across 7+ test rounds — all confirmed the limitation
Workaround: SKILL.md + mcporter
The OpenClaw-blessed pattern for making external tools visible to agent dispatch is file-based skill registration, not programmatic tool registration:
- Install mcporter
- Create
~/.openclaw/skills/<your-mcp-server>/SKILL.md that documents mcporter call commands
- OpenClaw discovers SKILL.md at startup and injects it into the system prompt for ALL agent runs (including dispatch)
- The agent reads the skill docs and shells out via mcporter per tool call
This is how every MCP skill in the OpenClaw ecosystem works (clickup-mcp, guru-mcp, etc.). Trade-off: ~2.4s cold-start per call (subprocess spawn + connect), vs the adapter's persistent connection.
Suggestion
Consider adding a note to the README explaining:
- The adapter works great for TUI sessions (its intended scope)
- For agent dispatch, users should use the SKILL.md + mcporter pattern
- Link to OpenClaw's skill documentation for setup instructions
Happy to PR the README update if that's helpful. Great adapter btw — the persistent connection and auto-reconnect logic is solid for the TUI use case.
—
Andy Grossberg & Claude (Waving Cat Learning Systems)
Summary
Tools registered via
api.registerTool()in the adapter work perfectly in TUI sessions but are not visible to agent dispatch (openclaw agent --agent X --message "..."). This is an OpenClaw core architectural constraint, not a bug in the adapter — but it's worth documenting since it affects anyone trying to use MCP tools from headless agent runs.Root Cause
api.registerTool()registers at the gateway runtime level onlymcpCapabilitiessets HTTP and SSE tofalse)What We Tried
tools.alsoAllowin agent config → read astools.allow, "unknown entries" warningtoolsatagents.defaultslevel → not valid (only per-agent)Workaround: SKILL.md + mcporter
The OpenClaw-blessed pattern for making external tools visible to agent dispatch is file-based skill registration, not programmatic tool registration:
~/.openclaw/skills/<your-mcp-server>/SKILL.mdthat documentsmcporter callcommandsThis is how every MCP skill in the OpenClaw ecosystem works (clickup-mcp, guru-mcp, etc.). Trade-off: ~2.4s cold-start per call (subprocess spawn + connect), vs the adapter's persistent connection.
Suggestion
Consider adding a note to the README explaining:
Happy to PR the README update if that's helpful. Great adapter btw — the persistent connection and auto-reconnect logic is solid for the TUI use case.
—
Andy Grossberg & Claude (Waving Cat Learning Systems)