What is MCP Sampling?
MCP sampling is a Model Context Protocol capability that lets a server request a language-model completion through the connected client, effectively borrowing the client's model access rather than needing its own.
Normally, data flows from server to client to model: the server exposes tools and data, and the client's model decides what to do with them. Sampling inverts this for a specific case — a server can, mid-task, ask the client to run a piece of text through its model and return the completion, and the client, with the user's oversight, executes that request and returns the result to the server. This lets servers implement sub-tasks that themselves need LLM reasoning, such as summarizing a large fetched document before returning it, without bundling their own model API keys and billing.
Because this hands a server real influence over what gets sent to a model on the user's account, the spec requires the client to mediate every sampling request: the user can typically see and approve the prompt being sent and the completion coming back, and the client can enforce rate limits or reject requests it considers unsafe. This keeps a compromised or buggy server from silently running unbounded, costly, or manipulative completions.
Sampling is one of the newer and less universally implemented parts of MCP, so support varies by host, but it addresses a real gap: letting servers offload cognitive sub-steps without becoming their own model providers.
In practice with Neotask
A Neotask research skill that needs to condense a long fetched webpage before handing it back to the main agent can use MCP sampling to request that summarization from the same model session already running the user's conversation, instead of standing up a separate LLM call and API key of its own.
Related terms
- mcp-elicitation
- mcp-tools
- mcp-host
- model-alignment
Plans
Free
$0/mo
Download without a card and start for free.
Individual
$50/mo
The full personal agent platform for one person.
Business
$100/mo
One company workspace with room to add your team.
Enterprise
$200/mo
Multiple workspaces and capacity for larger teams.
Continue