Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
openclaw mcpopenclaw mcp servelistshowsetunsetIn other words:
servelistshowsetunsetUse openclaw acp
This is the
openclaw mcp serveserveUse
openclaw mcp serveUse openclaw acp
openclaw mcp serveUse the same bridge in two different ways:
serveThe bridge uses existing Gateway session route metadata to expose channel-backed conversations. A conversation appears when OpenClaw already has session state with a known route such as:
channelaccountIdthreadIdThis gives MCP clients one place to:
The current bridge exposes these MCP tools:
The bridge keeps an in-memory event queue while it is connected.
Current event types:
messageexec_approval_requestedexec_approval_resolvedplugin_approval_requestedplugin_approval_resolvedclaude_permission_requestThe bridge can also expose Claude-specific channel notifications. This is the OpenClaw equivalent of a Claude Code channel adapter: standard MCP tools remain available, but live inbound messages can also arrive as Claude-specific MCP notifications.
When Claude channel mode is enabled, the server advertises Claude experimental capabilities and can emit:
notifications/claude/channelnotifications/claude/channel/permissionCurrent bridge behavior:
usernotifications/claude/channelyes abcdeno abcdenotifications/claude/channel/permissionThis is intentionally client-specific. Generic MCP clients should rely on the standard polling tools.
Example stdio client config:
json{ "mcpServers": { "openclaw": { "command": "openclaw", "args": [ "mcp", "serve", "--url", "wss://gateway-host:18789", "--token-file", "/path/to/gateway.token" ] } } }
For most generic MCP clients, start with the standard tool surface and ignore Claude mode. Turn Claude mode on only for clients that actually understand the Claude-specific notification methods.
openclaw mcp serveThe bridge does not invent routing. It only exposes conversations that Gateway already knows how to route.
That means:
messages_sendIf a conversation is missing from
conversations_listOpenClaw ships a deterministic Docker smoke for this bridge:
bashpnpm test:docker:mcp-channels
That smoke:
openclaw mcp serveThis is the fastest way to prove the bridge works without wiring a real Telegram, Discord, or iMessage account into the test run.
For broader testing context, see Testing.
This is the
openclaw mcp listshowsetunsetThese commands do not expose OpenClaw over MCP. They manage OpenClaw-owned MCP server definitions under
mcp.serversThose saved definitions are for runtimes that OpenClaw launches or configures later, such as embedded Pi and other runtime adapters. OpenClaw stores the definitions centrally so those runtimes do not need to keep their own duplicate MCP server lists.
Runtime adapters may normalize this shared registry into the shape their downstream client expects. For example, embedded Pi consumes OpenClaw
transporttypehttpssestdioOpenClaw also stores a lightweight MCP server registry in config for surfaces that want OpenClaw-managed MCP definitions.
Commands:
openclaw mcp listopenclaw mcp show [name]openclaw mcp set <name> <json>openclaw mcp unset <name>Notes:
listshowsettransport: "streamable-http"openclaw mcp settype: "http"unsetExamples:
bashopenclaw mcp list openclaw mcp show context7 --json openclaw mcp set context7 '{"command":"uvx","args":["context7-mcp"]}' openclaw mcp set docs '{"url":"https://mcp.example.com","transport":"streamable-http"}' openclaw mcp unset context7
Example config shape:
json{ "mcp": { "servers": { "context7": { "command": "uvx", "args": ["context7-mcp"] }, "docs": { "url": "https://mcp.example.com", "transport": "streamable-http" } } } }
Launches a local child process and communicates over stdin/stdout.
| Field | Description |
|---|---|
text command | Executable to spawn (required) |
text args | Array of command-line arguments |
text env | Extra environment variables |
text cwdtext workingDirectory | Working directory for the process |
OpenClaw rejects interpreter-startup env keys that can alter how a stdio MCP server starts up before the first RPC, even if they appear in a server's
envNODE_OPTIONSPYTHONSTARTUPPYTHONPATHPERL5OPTRUBYOPTSHELLOPTSPS4GITHUB_TOKENHTTP_PROXY*_API_KEYIf your MCP server genuinely needs one of the blocked variables, set it on the gateway host process instead of under the stdio server's
envConnects to a remote MCP server over HTTP Server-Sent Events.
| Field | Description |
|---|---|
text url | HTTP or HTTPS URL of the remote server (required) |
text headers | Optional key-value map of HTTP headers (for example auth tokens) |
text connectionTimeoutMs | Per-server connection timeout in ms (optional) |
Example:
json{ "mcp": { "servers": { "remote-tools": { "url": "https://mcp.example.com", "headers": { "Authorization": "Bearer <token>" } } } } }
Sensitive values in
urlheadersstreamable-httpssestdio| Field | Description |
|---|---|
text url | HTTP or HTTPS URL of the remote server (required) |
text transport | Set to text "streamable-http"text sse |
text headers | Optional key-value map of HTTP headers (for example auth tokens) |
text connectionTimeoutMs | Per-server connection timeout in ms (optional) |
OpenClaw config uses
transport: "streamable-http"type: "http"openclaw mcp setopenclaw doctor --fixtransportExample:
json{ "mcp": { "servers": { "streaming-tools": { "url": "https://mcp.example.com/stream", "transport": "streamable-http", "connectionTimeoutMs": 10000, "headers": { "Authorization": "Bearer <token>" } } } } }
This page documents the bridge as shipped today.
Current limits:
permissions_list_open© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine