惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
博客园 - 叶小钗
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
Last Week in AI
Last Week in AI
罗磊的独立博客
量子位
Jina AI
Jina AI
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
美团技术团队
雷峰网
雷峰网
爱范儿
爱范儿
S
SegmentFault 最新的问题
小众软件
小众软件
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(cli): clarify MCP list registry scope (#87487) · open...
Alix-007 · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -11,13 +11,17 @@ sidebarTitle: "MCP"

1111

`openclaw mcp` has two jobs:

1212
1313

- run OpenClaw as an MCP server with `openclaw mcp serve`

14-

- manage OpenClaw-owned outbound MCP server definitions with `list`, `show`, `status`, `doctor`, `probe`, `add`, `set`, `configure`, `tools`, `login`, `logout`, `reload`, and `unset`

14+

- manage OpenClaw-managed outbound MCP server definitions with `list`, `show`, `status`, `doctor`, `probe`, `add`, `set`, `configure`, `tools`, `login`, `logout`, `reload`, and `unset`

1515
1616

In other words:

1717
1818

- `serve` is OpenClaw acting as an MCP server

1919

- the other subcommands are OpenClaw acting as an MCP client-side registry for MCP servers its runtimes may consume later

2020
21+

<Note>

22+

`list`, `show`, `set`, and `unset` only read and write OpenClaw-managed `mcp.servers` entries in OpenClaw config. They do not include mcporter servers from `config/mcporter.json`; use `mcporter list` for that registry.

23+

</Note>

24+
2125

Use [`openclaw acp`](/cli/acp) when OpenClaw should host a coding harness session itself and route that runtime through ACP.

2226
2327

## Choose the right MCP path

@@ -368,7 +372,7 @@ For broader testing context, see [Testing](/help/testing).

368372

This is the `openclaw mcp list`, `show`, `status`, `doctor`, `probe`, `add`, `set`,

369373

`configure`, `tools`, `login`, `logout`, `reload`, and `unset` path.

370374
371-

These commands do not expose OpenClaw over MCP. They manage OpenClaw-owned MCP server definitions under `mcp.servers` in OpenClaw config.

375+

These commands do not expose OpenClaw over MCP. They manage OpenClaw-managed MCP server definitions under `mcp.servers` in OpenClaw config. They do not read mcporter servers from `config/mcporter.json`.

372376
373377

Those saved definitions are for runtimes that OpenClaw launches or configures later, such as embedded OpenClaw and other runtime adapters. OpenClaw stores the definitions centrally so those runtimes do not need to keep their own duplicate MCP server lists.

374378
Original file line numberDiff line numberDiff line change

@@ -161,6 +161,24 @@ describe("mcp cli", () => {

161161

});

162162

});

163163
164+

it("labels listed MCP servers as OpenClaw-managed", async () => {

165+

await withTempHome("openclaw-cli-mcp-home-", async () => {

166+

const workspaceDir = await createWorkspace();

167+

vi.spyOn(process, "cwd").mockReturnValue(workspaceDir);

168+
169+

await runMcpCommand(["mcp", "set", "context7", '{"command":"uvx","args":["context7-mcp"]}']);

170+

mockLog.mockClear();

171+
172+

await runMcpCommand(["mcp", "list"]);

173+
174+

const output = mockLog.mock.calls.map((call) => String(call[0])).join("\n");

175+

expect(output).toContain("OpenClaw-managed MCP servers (");

176+

expect(output).toContain("- context7");

177+

expect(output).toContain("OpenClaw-managed mcp.servers entries");

178+

expect(output).toContain("does not include mcporter servers from config/mcporter.json");

179+

});

180+

});

181+
164182

it("updates per-server MCP tool filters", async () => {

165183

await withTempHome("openclaw-cli-mcp-home-", async (home) => {

166184

const workspaceDir = await createWorkspace();

@@ -640,7 +658,9 @@ describe("mcp cli", () => {

640658
641659

mockLog.mockClear();

642660

await runMcpCommand(["mcp", "list"]);

643-

expect(lastLogLine()).toContain("No MCP servers configured in ");

661+

const output = mockLog.mock.calls.map((call) => String(call[0])).join("\n");

662+

expect(output).toContain("No OpenClaw-managed MCP servers configured in ");

663+

expect(output).toContain("does not include mcporter servers from config/mcporter.json");

644664

});

645665

});

646666
Original file line numberDiff line numberDiff line change

@@ -563,8 +563,13 @@ async function probeMcpServersOrFail(params: {

563563

}

564564

}

565565
566+

const OPENCLAW_MCP_REGISTRY_SCOPE_NOTE =

567+

"Note: this command only shows OpenClaw-managed mcp.servers entries and does not include mcporter servers from config/mcporter.json.";

568+
566569

export function registerMcpCli(program: Command) {

567-

const mcp = program.command("mcp").description("Manage OpenClaw MCP config and channel bridge");

570+

const mcp = program

571+

.command("mcp")

572+

.description("Manage OpenClaw mcp.servers config and channel bridge");

568573
569574

mcp

570575

.command("serve")

@@ -610,7 +615,7 @@ export function registerMcpCli(program: Command) {

610615
611616

mcp

612617

.command("list")

613-

.description("List configured MCP servers")

618+

.description("List OpenClaw-managed MCP servers from mcp.servers")

614619

.option("--json", "Print JSON")

615620

.action(async (opts: { json?: boolean }) => {

616621

const loaded = await listConfiguredMcpServers();

@@ -624,19 +629,22 @@ export function registerMcpCli(program: Command) {

624629

const names = Object.keys(loaded.mcpServers).toSorted();

625630

if (names.length === 0) {

626631

defaultRuntime.log(

627-

`No MCP servers configured in ${loaded.path}. Add one with ${formatCliCommand('openclaw mcp set <name> \'{"command":"uvx","args":["context7-mcp"]}\'')}.`,

632+

`No OpenClaw-managed MCP servers configured in ${loaded.path}. Add one with ${formatCliCommand('openclaw mcp set <name> \'{"command":"uvx","args":["context7-mcp"]}\'')}.`,

628633

);

634+

defaultRuntime.log(OPENCLAW_MCP_REGISTRY_SCOPE_NOTE);

629635

return;

630636

}

631-

defaultRuntime.log(`MCP servers (${loaded.path}):`);

637+

defaultRuntime.log(`OpenClaw-managed MCP servers (${loaded.path}):`);

632638

for (const name of names) {

633639

defaultRuntime.log(`- ${name}`);

634640

}

641+

defaultRuntime.log("");

642+

defaultRuntime.log(OPENCLAW_MCP_REGISTRY_SCOPE_NOTE);

635643

});

636644
637645

mcp

638646

.command("show")

639-

.description("Show one configured MCP server or the full MCP config")

647+

.description("Show one OpenClaw-managed MCP server or the full mcp.servers config")

640648

.argument("[name]", "MCP server name")

641649

.option("--json", "Print JSON")

642650

.action(async (name: string | undefined, opts: { json?: boolean }) => {

@@ -655,9 +663,9 @@ export function registerMcpCli(program: Command) {

655663

return;

656664

}

657665

if (name) {

658-

defaultRuntime.log(`MCP server "${name}" (${loaded.path}):`);

666+

defaultRuntime.log(`OpenClaw-managed MCP server "${name}" (${loaded.path}):`);

659667

} else {

660-

defaultRuntime.log(`MCP servers (${loaded.path}):`);

668+

defaultRuntime.log(`OpenClaw-managed MCP servers (${loaded.path}):`);

661669

}

662670

printJson(value ?? {});

663671

});

@@ -983,7 +991,7 @@ export function registerMcpCli(program: Command) {

983991
984992

mcp

985993

.command("set")

986-

.description("Set one configured MCP server from a JSON object")

994+

.description("Set one OpenClaw-managed MCP server from a JSON object")

987995

.argument("<name>", "MCP server name")

988996

.argument("<value>", 'JSON object, for example {"command":"uvx","args":["context7-mcp"]}')

989997

.action(async (name: string, rawValue: string) => {

@@ -1309,7 +1317,7 @@ export function registerMcpCli(program: Command) {

13091317
13101318

mcp

13111319

.command("unset")

1312-

.description("Remove one configured MCP server")

1320+

.description("Remove one OpenClaw-managed MCP server")

13131321

.argument("<name>", "MCP server name")

13141322

.action(async (name: string) => {

13151323

const loaded = await listConfiguredMcpServers();