Agentic Engineering from First Principles All chaptersLecturesLabDownload the book
Part II · Giving Agents Abilities

Chapter 10: Model Context Protocol (MCP)

Central questionHow can an agent discover and invoke external capabilities through a standard interface, instead of a custom integration for every system?

Lecture

Chapter principle

MCP standardizes capability access. It does not create agency. In lecture five, a dictionary of tools gave us local discovery and execution. Now, tools list and tools call do that through a server. The abstraction did not change. The integration boundary did.

Key takeaways

Experiments

Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.

Experiment 21: A tool over a standard protocol

How does a model use a tool it discovers over a standard protocol?

The program plays both sides of a tool protocol shaped like MCP. A client asks a server what it can do and learns of one tool, a calculator. That list becomes the model’s tool description. The model gets two tasks: a multiplication, and “Delete invoice 7”, which no listed tool can do. Two more proposals are written by hand to show the two error paths. This is a recorded run of a real model. Its reply to the second task will be worded differently in a new run.

All the code for this chapter: github.com/agentic-engineering-book/code

This is Chapter 10 of Agentic Engineering from First Principles: thirty chapters, a case study and fifty-nine executable experiments, from a single model call to controlled, self-improving agents.
Download the bookBrowse all chapters
← Chapter 9: Context CompressionChapter 11: ReAct →