O'Reilly Media · 332 pages
Model Context Protocol for Building Clients, Servers, and End-to-End Agents
Anthropic released the Model Context Protocol at the end of 2024, and it quickly became the standard way to turn a chatbot into an agent that can act, plan, and use tools on its own. This book goes deep on MCP, well beyond the documentation. You’ll build up your own client and then a server, both supporting the full spec in Python, and get a real feel for how the protocol works along the way.
Inside the book
Where MCP came from, why it exists, and how clients, servers, and transports fit together to make it work.
You'll build up a working client, then a server that provides tools, prompts, and resources, built the way you'd actually ship it.
Test and secure your servers, share them with others, dig into how transports really work, and, if you're up for it, contribute back to MCP itself.
Praise
“Kyle Stratis has written the definitive guide to MCP that's also very readable. He provides the blueprint needed to build production-grade agents that actually function in the real world”
— Joe Reis, coauthor of Fundamentals of Data Engineering
“The guidance on evaluations and tool-list design is worth the price of admission. This is the book for anyone who wants to build MCP servers that hold up outside a demo.”
— Austin Parker, director of AI strategy, Honeycomb
“Just about finished with this book. Really good stuff. Very timely as I am working on enterprise MCP at my current position. This book covers both the client and server side. Really approachable. Great code examples. 5/5.”
— Christopher Thompson, Architect at Insight Enterprises
Contents