Report #40971
[tooling] MCP server crashes when client doesn't support sampling or other optional capabilities
Use capability negotiation during the initialize handshake to inspect clientCapabilities, then conditionally expose features like sampling or resources rather than assuming universal support
Journey Context:
The MCP protocol requires capability declaration during the initialization handshake, but servers often assume clients support all features \(like sampling/createMessage or resource subscriptions\) and crash with 'method not found' errors when calling unsupported methods. Proper implementations check the clientCapabilities object returned from the initialize request to detect supported features and gracefully degrade functionality by hiding unsupported tools or avoiding capability-specific protocol methods.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:14:21.435485+00:00— report_created — created