Repository navigation
Improve MCP operability - #88399
Improve MCP operability#88399
Conversation
|
Codex review: found issues before merge. Reviewed May 30, 2026, 2:41 PM ET / 18:41 UTC. Summary PR surface: Source +866, Tests +784, Docs +34. Total +1684 across 16 files. Reproducibility: yes. from source inspection: a configured Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the feature only after the filter contract is explicitly settled and encoded in code, docs, and tests across embedded and native MCP projection paths. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: a configured Is this the best way to solve the issue? No: the feature direction is useful, but the current implementation is not the best merge shape until the public filter contract is enforced consistently or explicitly scoped. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 6399b6a4455d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +866, Tests +784, Docs +34. Total +1684 across 16 files. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 374a0905dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| z.union([z.string().register(sensitive), z.number(), z.boolean()]).register(sensitive), | ||
| ) | ||
| .optional(), | ||
| toolFilter: z | ||
| .object({ | ||
| include: z.array(z.string().trim().min(1)).min(1).optional(), | ||
| exclude: z.array(z.string().trim().min(1)).min(1).optional(), | ||
| }) |
There was a problem hiding this comment.
Apply MCP filters outside embedded runtime
When mcp.servers.<name>.toolFilter is set, it is only enforced in the embedded createSessionMcpRuntime path; the same cfg.mcp.servers entries are still projected to CLI/app-server MCP backends through loadMergedBundleMcpConfig/Codex thread config without applying the include/exclude list. In those contexts a filtered server still exposes all of its MCP tools (or relies on a downstream client ignoring this OpenClaw-only key), which defeats the new config contract for users who configure the filter as a tool restriction. Please either apply the filter before projecting to these backends or fail closed/document that those backends cannot enforce it.
Useful? React with 👍 / 👎.
374a090 to
7ccf32d
Compare
7ccf32d to
8da3b79
Compare
|
Verification before merge: Behavior addressed: MCP operability hardening: status/probe/tools CLI, per-server tool filters, resource/prompt utility projection, listChanged invalidation, request-failure backoff, metadata sanitization, and docs. Real environment tested: local macOS source checkout plus GitHub Actions on PR branch. Exact steps or command run after this patch:
Evidence after fix: focused local tests passed 3 Vitest shards with 124 tests; local lint, prod types, build, and whitespace check passed. GitHub Actions passed dependency-guard, real behavior proof, changed-path scan, security high lanes including mcp-process-tool-boundary, critical quality config/network lanes, build, lint, prod types, test types, guards, docs, dependency checks, gateway-core, plugin-sdk, and the MCP-adjacent Node shards. Observed result after fix: required check dependency-guard is green on head 881acc6. What was not tested: checks-node-agentic-commands-doctor still hits the existing 5-minute no-output watchdog after doctor-config-flow.include-warning; the same exact doctor shard was reproduced locally and stalls at the same point, and the PR diff does not touch src/commands/doctor*, src/infra*, or test/vitest/vitest.commands*. checks-node-core-runtime-infra-state remained pending after the doctor failure while its sibling infra-process lane passed; the PR diff does not touch infra state files. |
Summary
Verification
Real behavior proof
Behavior addressed: MCP operators can inspect configured transports without connecting, probe configured servers with live diagnostics, filter per-server tools, see resource/prompt utilities, and avoid stale or runaway failing MCP operations.
Real environment tested: local source checkout on macOS with the built OpenClaw CLI and a real temporary stdio MCP server process.
Exact steps or command run after this patch: built the CLI, configured a temp stdio MCP server with openclaw mcp set, checked openclaw mcp status --json, wrote a filter with openclaw mcp tools, verified config with openclaw mcp show --json, and connected with openclaw mcp probe --json.
Evidence after fix: probe reported one exposed tool, one filtered tool, resources=true, prompts=true, listChanged true for tools/resources/prompts, and projected tools ["live__search_docs"].
Observed result after fix: the filtered MCP tool remained available under a provider-safe OpenClaw tool name while admin and generated utility tools were hidden by the filter; status remained non-connecting.
What was not tested: remote Testbox changed-gate execution; the delegated Testbox checkout failed before checks with no merge base for origin/main...HEAD, while the same changed gate passed locally without Testbox delegation.