Chapter 9. The Model Context Protocol (MCP): Standardizing Tool Interaction
In the previous chapters, we have built complete AI agents. We learned how to give them memory, an orchestration engine, and even how to connect them to custom-built tools. The systems we’ve created work, allowing an agent to call a function and get a result.
This approach is fine for a few simple tools. But what happens when we try to build more complex, production-ready systems? What happens when our agent needs to use ten tools, or a hundred? Our simple, custom-built connections start to create serious problems, turning our clean agent code into a fragile and unmanageable system.
This chapter is about moving from building isolated tools to creating a scalable ecosystem of tools. It’s about the difference between a custom solution that works for a demo and a professional, standardized architecture that works in the real world.
First, we will diagnose the specific problems that arise when we try to scale our current ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access