What is MCP sampling?
MCP sampling is a client feature that lets a server request a language model generation through the client, so the client keeps control of model access, selection and permissions.
Also written: Model Context Protocol sampling, sampling/createMessage
Explained
Sampling reverses the usual direction of an MCP interaction. Normally a client asks a server for something. With sampling, a server asks the client to get a completion from its language model, which lets the server run nested LLM calls inside its own features without holding any model API key. The server returns an InputRequiredResult containing a sampling/createMessage request with messages and optional settings. The client gets the completion from its model and retries the original call with the assistant message, model name and stop reason attached. Servers can also pass a tools array so the model can use specially defined tools during that single flow, but only if the client declared the sampling.tools capability.
Because servers cannot pick a model by name for certain, they describe preferences: priorities for cost, speed and intelligence, plus optional model hints. The client makes the final choice. The client may also change or ignore the system prompt, and it must respect the maximum token limit.
The specification says there should always be a human in the loop who can deny sampling requests, review prompts before they are sent, and check responses before delivery.
Status note: as of the 2026-07-28 revision (checked 2026-10-26), the page marks sampling as deprecated. It stays in the specification for at least twelve months, and new implementations should not adopt it. Existing ones should move to calling LLM provider APIs directly.
Primary source
Sampling (modelcontextprotocol.io), read Oct 26, 2026
This entry paraphrases the page above. Sources change; check it for the current wording.
Listings that use this
The 5 top-ranked listings tagged for MCP sampling. Rank weighs adoption, freshness, documentation and publisher identity; how we rank and grade. Money never changes the order.
- 0.652score

NoClick
noclickapp
Build agents to automate any background task.
ConnectorAFreshness: ARemote★ 12Claude Code +3 - 0.587score
Stamp
theoddden
Concierge MCP for agentic workflows: verified time + drift, uuid, diff, calc, attest, verify.
ConnectorBFreshness: BRemoteLocal↓ 119/wkClaude Code +5 - 0.587score
LoopingAgent
loopingagent.comOfficial
English blog + agentic workflows architect profile (Paris): search, full text, projects, booking.
ConnectorAFreshness: ARemoteClaude Code +3 - 0.577score
Rapp Agent Builder
kody-w
Turn an idea or meeting transcript into a working single-file AI agent, check it, use it right away.
ConnectorAFreshness: ARemoteClaude Code +3 - 0.577score
Raptr Agent Builder
kody-w
Turn an idea or meeting transcript into a working single-file AI agent, check it, use it right away.
ConnectorAFreshness: ARemoteClaude Code +3
Related
Cite this page
What is MCP sampling?. Agent Mart. https://agentmart.dev/glossary/mcp-sampling (last updated 2026-10-26)
Written Oct 26, 2026, updated Oct 26, 2026. All glossary terms