

























@@ -348,8 +348,8 @@ For broader testing context, see [Testing](/help/testing).
348348349349## OpenClaw as an MCP client registry
350350351-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.
353353354354These commands do not expose OpenClaw over MCP. They manage OpenClaw-owned MCP server definitions under `mcp.servers` in OpenClaw config.
355355@@ -358,10 +358,14 @@ Those saved definitions are for runtimes that OpenClaw launches or configures la
358358<AccordionGroup>
359359 <Accordion title="Important behavior">
360360- 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
362362- `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
364364- 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
365369- 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
366370- per-server `toolFilter.include` and `toolFilter.exclude` filter discovered MCP tools before they become OpenClaw tools
367371- 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
@@ -395,8 +399,12 @@ Commands:
395399- `openclaw mcp show [name]`
396400- `openclaw mcp status`
397401- `openclaw mcp probe [name]`
402+- `openclaw mcp add <name> [flags]`
398403- `openclaw mcp set <name> <json>`
404+- `openclaw mcp configure <name> [flags]`
399405- `openclaw mcp tools <name> [--include csv] [--exclude csv] [--clear]`
406+- `openclaw mcp login <name> [--code code]`
407+- `openclaw mcp reload`
400408- `openclaw mcp unset <name>`
401409402410Notes:
@@ -405,8 +413,12 @@ Notes:
405413- `show` without a name prints the full configured MCP server object.
406414- `status` classifies configured transports without connecting.
407415- `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.
408417- `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.
409419- `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.
410422- 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.
411423- `unset` fails if the named server does not exist.
412424@@ -417,9 +429,13 @@ openclaw mcp list
417429openclaw mcp show context7 --json
418430openclaw mcp status
419431openclaw mcp probe context7 --json
432+openclaw mcp add memory --command npx --arg -y --arg @modelcontextprotocol/server-memory
420433openclaw mcp set context7 '{"command":"uvx","args":["context7-mcp"]}'
421434openclaw mcp tools context7 --include 'resolve-library-id,get-library-docs'
422435openclaw mcp set docs '{"url":"https://mcp.example.com","transport":"streamable-http"}'
436+openclaw mcp configure docs --timeout 20 --connect-timeout 5 --include 'search,read_*'
437+openclaw mcp configure docs --auth oauth --oauth-scope 'docs.read'
438+openclaw mcp login docs
423439openclaw mcp unset context7
424440```
425441@@ -436,6 +452,16 @@ Example config shape:
436452"docs": {
437453"url": "https://mcp.example.com",
438454"transport": "streamable-http",
455+"timeout": 20,
456+"connectTimeout": 5,
457+"supportsParallelToolCalls": true,
458+"auth": "oauth",
459+"oauth": {
460+"scope": "docs.read"
461+ },
462+"sslVerify": true,
463+"clientCert": "/path/to/client.crt",
464+"clientKey": "/path/to/client.key",
439465"toolFilter": {
440466"include": ["search_*"],
441467"exclude": ["admin_*"]
@@ -469,11 +495,17 @@ If your MCP server genuinely needs one of the blocked variables, set it on the g
469495470496Connects to a remote MCP server over HTTP Server-Sent Events.
471497472-| Field | Description |
473-| --------------------- | ---------------------------------------------------------------- |
474-| `url` | HTTP or HTTPS URL of the remote server (required) |
475-| `headers` | Optional key-value map of HTTP headers (for example auth tokens) |
476-| `connectionTimeoutMs` | Per-server connection timeout in ms (optional) |
498+| Field | Description |
499+| ------------------------------ | ---------------------------------------------------------------- |
500+| `url` | HTTP or HTTPS URL of the remote server (required) |
501+| `headers` | Optional key-value map of HTTP headers (for example auth tokens) |
502+| `connectionTimeoutMs` | Per-server connection timeout in ms (optional) |
503+| `connectTimeout` | Per-server connection timeout in seconds (optional) |
504+| `timeout` / `requestTimeoutMs` | Per-server MCP request timeout in seconds or ms |
505+| `auth: "oauth"` | Use MCP OAuth token storage and `openclaw mcp login` |
506+| `sslVerify` | Set false only for explicitly trusted private HTTPS endpoints |
507+| `clientCert` / `clientKey` | mTLS client certificate and key paths |
508+| `supportsParallelToolCalls` | Hint that concurrent calls are safe for this server |
477509478510Example:
479511@@ -483,6 +515,8 @@ Example:
483515"servers": {
484516"remote-tools": {
485517"url": "https://mcp.example.com",
518+"auth": "oauth",
519+"timeout": 20,
486520"headers": {
487521"Authorization": "Bearer <token>"
488522 }
@@ -498,12 +532,18 @@ Sensitive values in `url` (userinfo) and `headers` are redacted in logs and stat
498532499533`streamable-http` is an additional transport option alongside `sse` and `stdio`. It uses HTTP streaming for bidirectional communication with remote MCP servers.
500534501-| Field | Description |
502-| --------------------- | -------------------------------------------------------------------------------------- |
503-| `url` | HTTP or HTTPS URL of the remote server (required) |
504-| `transport` | Set to `"streamable-http"` to select this transport; when omitted, OpenClaw uses `sse` |
505-| `headers` | Optional key-value map of HTTP headers (for example auth tokens) |
506-| `connectionTimeoutMs` | Per-server connection timeout in ms (optional) |
535+| Field | Description |
536+| ------------------------------ | -------------------------------------------------------------------------------------- |
537+| `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 |
507547508548OpenClaw 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.
509549@@ -516,7 +556,8 @@ Example:
516556"streaming-tools": {
517557"url": "https://mcp.example.com/stream",
518558"transport": "streamable-http",
519-"connectionTimeoutMs": 10000,
559+"connectTimeout": 10,
560+"timeout": 30,
520561"headers": {
521562"Authorization": "Bearer <token>"
522563 }
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。