Repository navigation
fix(mcp): discover enabled plugin servers in the CLI - #160245
Patrick-Erichsen wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 28, 2026, 3:40 AM ET / 07:40 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch makes the Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain This PR remains useful because current main does not expose enabled plugin MCP servers through the CLI. The pinned head still has the blocking OAuth compatibility regression identified in the earlier review. Priority: P2 Review scores
Verification
How this fits togetherEnabled plugins and operator config supply MCP server definitions that OpenClaw merges for agent runtimes. The CLI uses those definitions to display, diagnose, probe, and authorize servers. flowchart LR
A[Enabled plugin manifests] --> C[Effective MCP inventory]
B[Saved MCP config] --> C
C --> D{CLI command}
D --> E[List and diagnose]
D --> F[Probe server]
D --> G[OAuth credentials]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +164, Tests +318, Docs +1. Total +483 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the shared plugin and config inventory for CLI reads while retaining OAuth login for saved disabled servers and rejecting plugin declarations that are unavailable. Do we have a high-confidence way to reproduce the issue? Yes. The current-main test establishes the disabled saved-server login sequence, and the introduced guard rejects it; this read-only review did not execute the command. Is this the best way to solve the issue? No, not as submitted. Reusing the shared inventory fits the subsystem, but login must distinguish a saved disabled server from an unavailable plugin declaration. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ff8c752d852f. LabelsLabel changes: No label changes. Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing: #167090 remains open for the same CLI discovery of plugin-contributed MCP servers. Closed by Roboclaw at the author's request after an audit of his open PRs. The branch is kept, so this can be reopened if needed. |
What Problem This Solves
Enabled plugins can contribute MCP servers to the agent runtime while
openclaw mcp list, diagnostics and login only see manually configured servers.User Impact
The CLI now discovers enabled plugin MCP servers, supports their OAuth login/logout, and preserves user overrides and disabled entries. Users can enable a built-in service and connect it without copying its URL into config.
Why This Change Was Made
Use the existing merged MCP inventory for reads. Probe and doctor retain original plugin ownership, including preparation of Agent bundle data directories. Mutations remain config-owned. Displayed headers and sensitive command arguments are redacted; login rechecks its source immediately before code completion. Doctor inspects authored header references so environment-backed credentials are not mistaken for hard-coded tokens, while mixed literal credentials, escaped references, and nonempty fallback secrets still warn.
A source change during the token-exchange request is not revalidated at save time; this existing lifecycle limitation is unchanged. Authored user-config environment references also retain the existing CLI behavior.
Evidence
Stack-head validation
node scripts/check-changed.mjs --base 1fe560c198c2917154e2e1b130b0df3352ac5114passed: static guards, dependency/lock checks, generated metadata, all typecheck graphs, dead-code scans, lint and runtime import cycles.pnpm test src/agents/mcp-oauth.test.ts src/plugins/bundle-mcp.test.ts src/agents/bundle-mcp-config.test.ts src/cli/mcp-cli.test.ts src/cli/mcp-cli.plugins.test.ts src/cli/mcp-cli.oauth.test.ts src/plugins/contracts/package-manifest.contract.test.ts src/plugins/contracts/extension-runtime-dependencies.contract.test.ts --maxWorkers=1passed: 729 tests / 8 files / 5 routed shards in 420.34s. The new CLI plugin suite took 54.31s including cold transformation (3 tests); the infra suite took 200.74s (67 tests). Hosted CI timing was not yet available.Package and upgrade proof
Validated stack head
5859d7c3d184e80cfed01304a93681ff69d64036on macOS arm64 / Node 24.19.0:node scripts/package-openclaw-for-docker.mjs --allow-unreleased-changelog --output-dir .artifacts/claw-723/packagepassed (19m47.6s), including declaration builds, UI build, package inventory and extracted runtime import-graph checks.openclaw-2026.9.6.tgz, 99,082,240 bytes, SHA-2560ee3ab0c8d43e777431ce557797c9609dbeb10bef9fbaf40a0d5dcf4954bcb04. All 35 compiled entries are present; packed manifests match source exactly.plugins list --jsonfinds all 35 under the installed package, originbundled, disabled. Enabling GoDaddy/Excalidraw exposes native MCP servers without manual config; livemcp probereturns 2/5 tools. Authenticated GitHub returns 45 tools; output is redacted. Missing-key fail-closed behavior and regional endpoint overrides pass. npm lifecycle-script approvals are limited to this disposable fixture; no user/global npm policy changed.[email protected]ranupdate --tag <candidate.tgz> --yes --json --no-restart --timeout 900. Resultstatus: ok, installed build2026.9.6-5859d7c3d184-2026-09-28T06-43-34.310Z; maintained upgrade-survivor helper verified baseline, candidate and installed application-byte identities. Existing disabled MCP config and enabledmemory-coresurvived unchanged; all 35 additions remain disabled.An earlier package attempt correctly refused a namespace change caused by concurrent generated-doc work. The final build ran after generation and checks finished, on stable inputs. OAuth consent/account tools and ten additional key-service accounts remain unverified; discovery-only inclusion is the approved milestone.
Stack order
Review only; no merge or release is authorized.
Hosted CI follow-up
Hosted CI is not green. Local validation above passed on the pinned stack; GitHub's later merge-ref/stack runs reported:
service-operation-lock.retained-custody.test.tscases (missing,unknown-phase,unknown-version,relative-source); sibling jobs were cancelled. The newer merge base includes upstream b107d4af, whose handoff-store refactor makesrelease()throw for malformed custody where the unchanged test expectsfalse. The OAuth PR changes neither that owner nor its tests. A local replay of the same test-group order on pure upstreamc136ec631464reproduced all four failures with no CLAW-723 code present: 900 passed, 4 failed, 5 skipped across the same 18-file group in 112.43s (macOS; hosted run was Linux). The first archive attempt stopped before tests because scoped dependency links were missing; the corrected prerequisite setup is the reproducing run.These hosted outcomes remain review/landing context, not passing evidence. No merge is authorized.