You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add MCP server add/configure/login/reload flows plus config/runtime support for enablement, filters, timeouts, OAuth, TLS, and parallel execution hints. Update docs and tests for the expanded MCP operator surface.
Copy file name to clipboardExpand all lines: docs/cli/mcp.md
+57-16Lines changed: 57 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -348,8 +348,8 @@ For broader testing context, see [Testing](/help/testing).
348
348
349
349
## OpenClaw as an MCP client registry
350
350
351
-
This is the `openclaw mcp list`, `show`, `status`, `probe`, `set`, `tools`,
352
-
and `unset` path.
351
+
This is the `openclaw mcp list`, `show`, `status`, `probe`, `add`, `set`,
352
+
`configure`, `tools`, `login`, `reload`, and `unset` path.
353
353
354
354
These commands do not expose OpenClaw over MCP. They manage OpenClaw-owned MCP server definitions under `mcp.servers` in OpenClaw config.
355
355
@@ -358,10 +358,14 @@ Those saved definitions are for runtimes that OpenClaw launches or configures la
358
358
<AccordionGroup>
359
359
<Accordiontitle="Important behavior">
360
360
- these commands only read or write OpenClaw config
361
-
- `status`, `list`, `show`, `set`, `tools`, and `unset` do not connect to the target MCP server
361
+
- `status`, `list`, `show`, `set`, `configure`, `tools`, `reload`, and `unset` do not connect to the target MCP server
362
362
- `probe` connects to the selected server or all configured servers, lists tools, and reports capabilities/diagnostics
363
-
- they do not validate whether the command, URL, or remote transport is reachable right now
363
+
- `add` builds a definition from flags and probes before saving unless `--no-probe` is set or OAuth authorization is needed first
364
364
- runtime adapters decide which transport shapes they actually support at execution time
365
+
- `enabled: false` keeps a server saved but excludes it from embedded runtime discovery
366
+
- `timeout` and `connectTimeout` set per-server request and connection timeouts in seconds
367
+
- `supportsParallelToolCalls: true` marks servers that adapters can call concurrently
368
+
- HTTP servers can use static headers, OAuth login, TLS verification control, and mTLS certificate/key paths
365
369
- embedded OpenClaw exposes configured MCP tools in normal `coding` and `messaging` tool profiles; `minimal` still hides them, and `tools.deny: ["bundle-mcp"]` disables them explicitly
366
370
- per-server `toolFilter.include` and `toolFilter.exclude` filter discovered MCP tools before they become OpenClaw tools
367
371
- servers that advertise resources or prompts also expose utility tools for listing/reading resources and listing/fetching prompts; those generated utility names (`resources_list`, `resources_read`, `prompts_list`, `prompts_get`) use the same include/exclude filter
-`show` without a name prints the full configured MCP server object.
406
414
-`status` classifies configured transports without connecting.
407
415
-`probe` connects and reports tool counts, resources/prompts support, list-change support, and diagnostics.
416
+
-`add` accepts stdio flags such as `--command`, `--arg`, `--env`, and `--cwd`, or HTTP flags such as `--url`, `--transport`, `--header`, `--auth oauth`, TLS, timeout, and tool-selection flags.
408
417
-`set` expects one JSON object value on the command line.
418
+
-`configure` updates enablement, tool filters, timeouts, OAuth, TLS, and parallel-tool-call hints without replacing the whole server definition.
409
419
-`tools` updates per-server tool filters. Include/exclude entries are MCP tool names and simple `*` globs.
420
+
-`login` runs the OAuth flow for HTTP servers configured with `auth: "oauth"`. The first run prints an authorization URL; rerun with `--code` after approval.
421
+
-`reload` disposes cached in-process MCP runtimes. Gateway or agent processes in another process still need their own reload or restart path.
410
422
- Use `transport: "streamable-http"` for Streamable HTTP MCP servers. `openclaw mcp set` also normalizes CLI-native `type: "http"` to the same canonical config shape for compatibility.
411
423
-`unset` fails if the named server does not exist.
openclaw mcp set docs '{"url":"https://mcp.example.com","transport":"streamable-http"}'
@@ -498,12 +532,18 @@ Sensitive values in `url` (userinfo) and `headers` are redacted in logs and stat
498
532
499
533
`streamable-http` is an additional transport option alongside `sse` and `stdio`. It uses HTTP streaming for bidirectional communication with remote MCP servers.
|`url`| HTTP or HTTPS URL of the remote server (required) |
538
+
|`transport`| Set to `"streamable-http"` to select this transport; when omitted, OpenClaw uses `sse`|
539
+
|`headers`| Optional key-value map of HTTP headers (for example auth tokens) |
540
+
|`connectionTimeoutMs`| Per-server connection timeout in ms (optional) |
541
+
|`connectTimeout`| Per-server connection timeout in seconds (optional) |
542
+
|`timeout` / `requestTimeoutMs`| Per-server MCP request timeout in seconds or ms |
543
+
|`auth: "oauth"`| Use MCP OAuth token storage and `openclaw mcp login`|
544
+
|`sslVerify`| Set false only for explicitly trusted private HTTPS endpoints |
545
+
|`clientCert` / `clientKey`| mTLS client certificate and key paths |
546
+
|`supportsParallelToolCalls`| Hint that concurrent calls are safe for this server |
507
547
508
548
OpenClaw config uses `transport: "streamable-http"` as the canonical spelling. CLI-native MCP `type: "http"` values are accepted when saved through `openclaw mcp set` and repaired by `openclaw doctor --fix` in existing config, but `transport` is what embedded OpenClaw consumes directly.
0 commit comments