You have built servers that provide tools, resources, and prompts. You have connected them to clients and even integrated them with LLMs via API. But so far, your servers have been relatively passive—they wait for a command, execute it, and return a result.
Real-world applications require more sophistication.
What if a tool needs to ask the user for permission before deleting a database? What if you need to restrict an AI agent to a specific folder on your hard drive? What if your server needs to summarize a log file but doesn’t have its own API key?
In this lesson, you will unlock the Advanced Features of MCP that solve these specific architectural challenges:
Elicitation: You will implement “Human-in-the-loop” workflows, allowing your server to pause execution and ask the user for clarification or confirmation before proceeding with dangerous actions.
Roots: You will enforce security boundaries, ensuring that your AI agents operate strictly within a “sandbox” directory and cannot access sensitive files outside of it.
Sampling: You will implement a “Brain and Brawn” architecture, where your lightweight server “borrows” the client’s LLM connection to perform intelligent tasks without needing its own API credentials.
By the end of this lesson, you will be able to:
Design interactive tools that request user input during execution using Elicitation.
Secure your servers by validating filesystem paths against client-provided Roots.
Optimize costs and architecture by using Sampling to offload AI processing to the client.
Let’s start by adding a safety layer to your tools with Elicitation.
See forum comments
This content was released on Apr 10 2026. The official support period is 6-months
from this date.
In this lesson, you will master the advanced capabilities of the Model Context Protocol. You will learn how to implement “Human-in-the-loop” workflows with Elicitation, secure your filesystem with Roots, and leverage client-side intelligence via Sampling.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.