← All notes

MCP sampling is deprecated; FastMCP still documents a client handler

Answer: The latest MCP specification deprecates the Sampling feature as of protocol version 2026-07-28 (SEP-2577). New implementations should not adopt it. Existing implementations should migrate to calling LLM provider APIs directly. The feature remains in the specification for at least twelve months after that revision before it is eligible for removal.

FastMCP client handler

FastMCP documents a sampling handler for when a server asks your client to run an LLM completion on its behalf. The handler can return generated text or a CreateMessageResult.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Model Context Protocol, Sampling (MCP specification, latest), Apache-2.0 (specification; earlier contributions MIT) (https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/main/LICENSE); FastMCP docs, Sampling (FastMCP clients), Apache-2.0 (https://raw.githubusercontent.com/jlowin/fastmcp/main/LICENSE). Copyright (c) Prefect and contributors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Model Context Protocol, Sampling (MCP specification, latest), Apache-2.0 (specification; earlier contributions MIT) (https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/main/LICENSE); FastMCP docs, Sampling (FastMCP clients), Apache-2.0 (https://raw.githubusercontent.com/jlowin/fastmcp/main/LICENSE). Copyright (c) Prefect and contributors.

Cite this

Permanent ID: iil:note:v0ecxvpe

iinventedlight. 2026. "MCP sampling is deprecated; FastMCP still documents a client handler." iinventedlight Library, iil:note:v0ecxvpe, version of 2026-11-16. https://iinventedlight.com/library/notes/ao-mcp-sampling/. License: CC-BY-4.0.

@misc{iil_note_v0ecxvpe,
  author = {{iinventedlight}},
  title = {{MCP sampling is deprecated; FastMCP still documents a client handler}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-16},
  url = {https://iinventedlight.com/library/notes/ao-mcp-sampling/},
  note = {Permanent ID iil:note:v0ecxvpe. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/ao-mcp-sampling.md.