Repository navigation
fix(mcp): keep resource-only servers available after unknown methods - #115169
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 7:55 AM ET / 11:55 UTC. ClawSweeper reviewWhat this changesThis PR recognizes Merge readinessKeep this PR open for normal maintainer review. The provided evidence describes a narrow MCP compatibility repair with real spawned-server proof, but the protected Priority: P2 Review scores
Verification
How this fits togetherOpenClaw builds an MCP catalog by initializing configured MCP servers and attempting optional tool discovery. The resulting catalog feeds agent utility tools and diagnostics, so an unsupported optional discovery method must not remove otherwise usable resource or prompt capabilities. flowchart LR
A[Configured MCP server] --> B[MCP initialization]
B --> C[Optional tools list request]
C --> D{Unsupported method?}
D -->|Yes, server has no tools| E[Keep resource or prompt server]
D -->|No or server advertises tools| F[Report catalog diagnostic]
E --> G[Agent MCP catalog]
F --> G[Agent MCP catalog]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +64. Total +64 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh the PR against current Do we have a high-confidence way to reproduce the issue? Yes, at source level: configure a resource-only or prompt-only stdio MCP server to return JSON-RPC Is this the best way to solve the issue? Yes, provisionally: extending the existing unsupported-method classifier is narrower than adding a new fallback path, and the stated capability gate preserves diagnostics for tool-advertising servers. A maintainer should still confirm that conclusion against the current caller and MCP SDK behavior after the branch refresh. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 89b6d85cdd86. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
|
ClawSweeper rank-up move reviewed: main has advanced, but neither src/agents/agent-bundle-mcp-runtime.ts nor its regression test changed since the PR merge base. All 83 hosted checks passed for the exact reviewed head, the real 82-test MCP suite and full changed gate already passed on Blacksmith, and scripts/pr prepare-run verified the current-head hosted proof. Skipping an unnecessary branch refresh because it would invalidate green exact-head CI without changing the merge result or exercised MCP behavior. |
|
Merged via squash.
|
Closes #111940
What Problem This Solves
Fixes an issue where users configuring resource-only or prompt-only MCP servers would lose access to the server when it reports unsupported tools/list requests as -32000 Unknown method.
Why This Change Was Made
Recognize the common nonstandard Unknown method spelling only through the existing unsupported-method classifier. The current capability gate remains authoritative, so servers advertising tools still surface their tools/list failures instead of being silently accepted.
User Impact
Resource-only and prompt-only MCP servers remain connected and available for utility tools when they do not implement optional tool discovery. Errors from tools-capable MCP servers continue to appear in catalog diagnostics.
Evidence
pnpm test src/agents/agent-bundle-mcp-runtime.test.ts— all 82 tests passed after the fix.pnpm check:changed— passed, including core and core-test type checks, formatting, lint, plugin boundaries, dependency pins, and database guards.autoreview --mode uncommitted— clean, no actionable findings.