Roots, Sampling, and Elicitation

Roots, Sampling, and Elicitation -- three advanced MCP features still rolling out. What they do, which clients support them, and why Sampling in particular will be a game-changer.

April 1, 20266 min read7 / 7

These three features extend what MCP servers can do beyond tools, resources, and prompts. They're currently in varying states of client support -- but understanding them tells you where MCP is heading.


Where MCP Features Come From

Anthropic develops MCP with a specific philosophy:

"What are our coding tools doing -- Cursor, VS Code Agent Mode, Claude Code -- that we should expose as a generic primitive everyone can use?"

Each of these three features follows that pattern: a capability that already exists in some clients, now being formalized as a first-class protocol feature.


Roots -- Filesystem Access

What It Is

Roots formally declare a directory (or set of directories) that the MCP server and LLM have permission to operate on.

Diagram

Think of it like opening VS Code in a directory. VS Code can read and modify any file inside that folder. Anything outside is off-limits. Roots makes this formal and exposable via the MCP protocol.

Why It Matters

Without roots, when a coding agent like Claude Code operates on your project, the boundaries of what it can touch are implicit. Roots makes them explicit and shareable:

"Here are the directories I'm authorizing you to operate on. Nothing else."

Current Support

As of now, Roots is supported in Cursor and Claude Code, but not yet in Claude Desktop. It makes more sense in code editor contexts anyway -- you want a coding agent to know which repo it's operating on.

ℹ️ Real example: When Brian adds context7 or playwright to Claude Code, those tools have implicit access to the current working directory. Roots formalizes that access control so multiple MCP servers can't accidentally bleed into each other's scopes.

Sampling -- LLM-to-LLM Calls

What It Is

Sampling lets your MCP server prompt the LLM directly and get a response back -- without the user in the direct loop for each step.

Diagram

The key: you approve both the outgoing prompt and the incoming response before they complete the cycle.

Why This Is Exciting

Currently, if an MCP tool needs the LLM's intelligence to do its job, it has to return a result to the user, who then has to send another message. Sampling cuts out that step -- your tool can ask the LLM directly.

Practical example: a code-quality MCP server that:

  1. Receives code as input
  2. Uses sampling to ask the LLM: "What are the issues with this code?"
  3. Receives the analysis
  4. Formats it into a structured report
  5. Returns the report to the user

No user back-and-forth required for step 2.

⚠️ The name is confusing. "Sampling" in other AI contexts means something completely different (token sampling during generation, temperature-based randomness). This Sampling is entirely unrelated -- it's specifically about MCP servers initiating LLM requests. Don't confuse the two.

Current Support

Sampling isn't widely supported yet. But it's coming, and it will significantly expand what MCP servers can do on their own.


Elicitation -- Mid-Task User Input

What It Is

Elicitation lets an MCP server pause mid-task and ask the user a question, then continue with the answer.

Without elicitation:

Plain text
User: "Fill out this form for me" Tool: "I need your name, email, and preferred date. Please re-run with that info." User: "Ugh, I have to start over."

With elicitation:

Plain text
User: "Fill out this form for me" Tool: → pauses → Tool asks: "What name should I use?" User: "Durgesh" Tool asks: "What email?" User: "hi@durgesh.dev" Tool: → continues → form filled
Diagram

Why It Matters

Many real tasks need information the user didn't provide upfront. Without elicitation, the LLM has to guess, ask the user to start over, or fail. Elicitation enables conversational tools -- tools that gather what they need mid-execution.

Current Support

Also not widely supported yet. But the use case is clear and it will land.


Client Support Matrix

Diagram

This matrix changes frequently. Check the official MCP client docs for current status.


Lab -- Think Through the Feature Value

JavaScript · Live Editor
Loading editor...
✅ The pattern: Roots matters when file/directory scope matters. Sampling matters when your tool needs LLM intelligence mid-execution. Elicitation matters when user input is needed mid-task to complete it correctly.

Key Takeaways

  • Roots -- formal file system scope declarations. LLMs can only touch what you expose. Supported in Claude Code and Cursor.
  • Sampling -- MCP servers can prompt the LLM directly and get responses. Human approval at each step. Not widely supported yet, but coming.
  • Elicitation -- tools can pause and ask users follow-up questions. Not widely supported yet.
  • The name "Sampling" is misleading -- it has nothing to do with token sampling or temperature
  • Check client support tables -- features roll out at different rates across clients

What's Next

Enough theory. Time to build a real-world MCP server for a full issue tracker -- 16 tools, API authentication, and the realization that one-tool-per-endpoint is usually the wrong approach.