Report #9411
[gotcha] MCP server requests LLM sampling but the client doesn't support it, causing a silent hang
Check the client capabilities.sampling before initiating a sampling/createMessage request from the server; fall back to deterministic logic if unsupported.
Journey Context:
MCP allows servers to request the LLM to generate text \(agentic loops\). However, many thin MCP clients only support tool execution, not the reverse channel for sampling. If a server blindly requests sampling, the request may hang indefinitely or fail without a clear error, deadlocking the agent loop. Checking capabilities ensures the server adapts to the client's actual feature set.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:09:25.078098+00:00— report_created — created