You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Servers can also request an LLM completion from the client with [`sampling/createMessage`](https://modelcontextprotocol.io/specification/2025-11-25/client/sampling),
2352
+
letting a server leverage the client's model access without its own API keys.
2353
+
2354
+
> MCP Sampling is deprecated as of protocol version `2026-07-28` (SEP-2577), while remaining fully supported under `2025-11-25`.
2355
+
> Register this handler to interoperate with servers that still send sampling requests during the deprecation window;
2356
+
> new servers should call LLM provider APIs directly.
2357
+
2358
+
Register a handler and advertise the capability on `connect`:
Use `capabilities: { sampling: { tools: {} } }` to receive tool-enabled sampling requests. Like elicitation, this uses the same standalone GET SSE listening stream.
2386
+
2349
2387
#### HTTP Authorization
2350
2388
2351
2389
By default, the HTTP transport layer provides no authentication to the server, but you can provide custom headers if you need authentication. For example, to use Bearer token authentication:
0 commit comments