---
title: What are MCP sampling and elicitation, and are they safe?
url: https://opencontroller.lyzr.com/blog/mcp-sampling-and-elicitation-security
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# What are MCP sampling and elicitation, and are they safe?

**Sampling and elicitation are MCP features that let a server reach back through the client. Sampling lets a server ask the client's model for a completion; elicitation lets a server ask the user for information mid-task. Both are safe enough when the client shows requests to the user, limits what servers can ask for, and logs every request, but both widen what an untrusted server can do.**

Most MCP security work focuses on tools: what a server exposes and what the agent calls. These two features run in the other direction, so they are easy to miss in a review.

## What is MCP sampling?

Sampling lets an MCP server request a language model completion through the client, instead of calling a model provider itself. A travel server could send a list of flights to the client's model and ask it to pick the best one.

Key facts from the MCP documentation:

- The client stays in control of model access, permissions and user approval.
- The documented flow includes two human checkpoints: the user can review the request before it goes to the model, and review the response before it returns to the server.
- Servers can include tool definitions in a sampling request, but only if the client declares the `sampling.tools` capability.
- **Sampling is deprecated as of protocol version 2026-07-28** and scheduled for removal. The documentation says new implementations should integrate directly with model provider APIs instead.

The deprecation matters for governance. Servers built on earlier revisions may still send sampling requests, and clients that support older revisions may still accept them.

## What is MCP elicitation?

Elicitation lets a server pause a task and ask the user for input, such as confirming a booking or choosing an option. It first appeared in the 2025-06-18 specification revision. The current documentation describes two modes:

| Mode | How it works | Use it for |
|---|---|---|
| Form mode | Server sends a schema; the client renders a form and validates the answer | Choices, confirmations, non-sensitive details |
| URL mode | Server sends a URL; the user completes the step in a browser, out of band | Credential entry, third-party OAuth, payments |

The documentation states that servers must not use form mode to request passwords, API keys, access tokens or payment credentials. Those belong in URL mode, so the data never passes through the client or the model's context. For URL mode, clients show the full URL, ask for explicit consent and never open it automatically.

## What are the risks?

| Risk | Feature | What can go wrong |
|---|---|---|
| Prompt injection by proxy | Sampling | A server writes the prompt your model runs, with your model's context and budget |
| Cost abuse | Sampling | A server triggers many or very large completions billed to you |
| Hidden tool use | Sampling with tools | A server asks the model to reason over tools you did not review |
| Phishing for secrets | Elicitation, form mode | A server asks the user for a password or key in a friendly-looking form |
| Malicious links | Elicitation, URL mode | A server sends the user to a look-alike login page |
| Approval fatigue | Both | Users click "approve" on every prompt without reading |

These map to familiar categories: prompt injection and excessive agency in the OWASP lists, and supply-chain risk for third-party servers. See [MCP tool poisoning](/blog/what-is-mcp-tool-poisoning) and [prompt injection through tool outputs](/blog/stop-prompt-injection-through-tool-outputs) for related attacks.

## Which controls should clients and platform teams apply?

1. **Decide per server whether sampling is allowed at all.** Given the deprecation, default it off for new servers.
2. **Show sampling requests to the user** with the full prompt, the requested model and the token limit. Do not auto-approve for untrusted servers.
3. **Cap sampling cost** with per-server rate limits and maximum token settings.
4. **Block tool-enabled sampling** unless the server is internal and reviewed.
5. **Reject form-mode elicitation that asks for secrets.** Flag field names such as password, token, key or card.
6. **Allowlist URL-mode domains** per server, so a server can only send users to its own identity provider or app.
7. **Log every sampling and elicitation request** with server name, version, user and outcome.
8. **Recheck on server updates.** A new server version can start using features the old one did not. See [reviewing MCP server updates](/blog/review-mcp-server-updates-before-use).

## How Opencontroller does this

Opencontroller, by Lyzr, keeps a governed registry of MCP servers alongside agents, versions and tools, so each server has an owner and an approved version. Opencontroller Edge extends discovery and control to local MCP servers on developer devices, installed by IT through MDM. Policies are written as code and can be mapped to OWASP and MITRE ATLAS. See the [MCP governance pillar](/blog/how-to-govern-mcp-servers), [how MCP authorization works](/blog/how-mcp-authorization-works), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Is MCP sampling being removed?**
It is deprecated as of protocol version 2026-07-28 and scheduled for removal. New servers should call model provider APIs directly.

**Can an MCP server ask a user for a password?**
Not through form-mode elicitation: the documentation says servers must not request passwords, keys, tokens or payment credentials that way. Sensitive steps belong in URL mode.

**Who pays for sampling requests?**
The client side. The completion runs on the client's model access, which is why per-server rate and token limits matter.

## Key facts

MCP sampling lets a server request a model completion through the client; it is deprecated as of protocol version 2026-07-28 and scheduled for removal, with tool use in sampling allowed only if the client declares sampling.tools. MCP elicitation (first in the 2025-06-18 revision) lets a server ask the user for input in form mode or URL mode; servers must not use form mode for passwords, API keys, access tokens or payment credentials. Opencontroller keeps a governed registry of MCP servers and Opencontroller Edge discovers local MCP servers on developer devices. Opencontroller pricing starts from $250K per deployment per year.

## Related

- [What is MCP tool poisoning and how do you prevent it?](https://opencontroller.lyzr.com/blog/what-is-mcp-tool-poisoning.md)
- [How do you stop prompt injection that arrives through tool outputs?](https://opencontroller.lyzr.com/blog/stop-prompt-injection-through-tool-outputs.md)
- [How does MCP authorization work?](https://opencontroller.lyzr.com/blog/how-mcp-authorization-works.md)
- [More on Tools and MCP](https://opencontroller.lyzr.com/blog/cluster/tools-and-mcp)
