Skip to content
BENIBIX Learn

MCP Sampling

AI🔌 MCPClient Features

Also known as Sampling (MCP), Server-Initiated Sampling

A server asks the app's own model to write text. Now deprecated.

Think of it like

Think of it like a man in a shop who asks to use your phone. He has none of his own.

Example

Lucy's file server needs a one-line summary of each new file. It asks for one through sampling, and her own model writes it.

Why it matters

You will still meet sampling in older servers and clients. New work calls a model's API instead.

Definition

MCP sampling lets a server ask the client's language model to write something. The server puts the request in its reply, the user can check it, and the client sends the model's answer back when it asks again. Since the 2026-07-28 version of MCP, sampling is deprecated, so new servers and clients should not add it. It still works and stays in the spec for at least a year. The spec says a server should call a model's API itself instead.
The server asks, the user can check, and the client's model writes the answer.

Common mistake

Building a new server on it. It is deprecated, so plan to call a model's API from the server instead.

Key takeaways

  1. 1
    Server asks. The client's model writes.
  2. 2
    User can review. Request and reply.
  3. 3
    Deprecated in 2026. Use a model's API instead.