In this lesson, you moved beyond simple request-response patterns and implemented the sophisticated behaviors required for production-grade AI agents.
You mastered Elicitation: You transformed a dangerous “delete” command into a safe, interactive conversation. You learned that by implementing a custom client handler, you can keep humans in the loop for high-stakes decisions.
You secured your system with Roots: You recognized the risks of giving AI access to files. By implementing path validation logic in your server and defining a sandbox in your client, you ensured that your agents can only touch what they are supposed to.
You leveraged Sampling: You optimized your architecture by letting the server “borrow” the client’s brain. You built a system where a tool could perform intelligent analysis without needing its own API key, keeping your backend lightweight and cost-effective.
These three features, Interactivity (Elicitation), Security (Roots), and Distributed Intelligence (Sampling), are what separate basic chatbots from robust, professional AI systems.
You now possess a comprehensive understanding of the Model Context Protocol, from the basic building blocks of Tools and Resources to the advanced coordination of client-server interactions.
See forum comments
This content was released on Apr 10 2026. The official support period is 6-months
from this date.
This lesson concludes your exploration of the advanced capabilities of the Model Context Protocol. It summarizes how Elicitation, Roots, and Sampling transform passive servers into secure, interactive, and intelligent agents.
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!
Previous: Sampling with Real AI
Next: Introduction to ChatGPT Apps
All videos. All books.
One low price.
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.