Report #46217
[gotcha] MCP server uses sampling/createMessage to request LLM completions from the client, but the client doesn't support it
Before calling sampling/createMessage, check the client's capabilities from the initialization response \(capabilities.sampling\). If not supported, implement a fallback that works without server-side LLM calls. Don't design your server to require sampling as a critical path.
Journey Context:
The MCP spec defines a sampling capability where servers can request the client to perform LLM completions on their behalf. This is powerful for agentic servers that need to reason. However, many popular MCP clients do NOT implement this capability. A server that depends on sampling will fail silently or throw unhelpful errors on these clients. The failure mode is subtle: the server works perfectly in testing with a compliant client, then breaks in production with a different client. The spec makes this opt-in via capabilities, but server authors often don't check, assuming all clients support the full spec.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:02:56.352829+00:00— report_created — created