01Chapter 1: Why MCP exists: from custom integrations to one protocolThis chapter assumes you can read basic Python or TypeScript and are comfortable with JSON. It also assumes you know roughly how an LLM application calls tools: the model emits a structured request, the application runs it, and the result goes back to the model. Familiarity with client-server commun3 min read
02Chapter 2: Hosts, clients, and servers: who does whatThis chapter assumes you know basic JSON, how LLM tool calling works, and how client-server communication works. It names the three roles in the Model Context Protocol (MCP) and shows how they connect. Later chapters cover the messages and the handshake in detail.3 min read
04Chapter 4: Starting a session: initialization and capability negotiationThis chapter assumes you can read JSON, know the host, client, and server roles from the earlier chapters, and understand the JSON-RPC request, response, and notification shapes. Here you will see how an MCP connection begins and how both sides agree on what they can do.3 min read
05Chapter 5: Moving messages: stdio and Streamable HTTPThis chapter assumes you have read the earlier chapters on JSON-RPC messages and the initialization handshake. You should also know basic command-line use and how HTTP requests and responses work.3 min read
06Chapter 6: Tools: actions the model can invokeThis chapter assumes you know the host, client, and server roles, the JSON-RPC message shapes, and the initialization handshake from earlier chapters. You should also be able to read short Python functions.3 min read
07Chapter 7: Resources: context the application can readThis chapter assumes you know the MCP roles (host, client, server), the JSON-RPC message shapes, and the initialization handshake from earlier chapters. You should also be comfortable reading short Python functions.3 min read
08Chapter 8: Prompts: reusable templates the user selectsThis chapter assumes you have read the chapters on the JSON-RPC wire format, session initialization, and tools. You should be able to read a simple MCP server written with the Python SDK.3 min read
09Chapter 9: Building a minimal server and connecting a clientThis chapter assumes you can read Python, know basic JSON, and have used a command line. You also need to know the roles of host, client, and server, and how the initialization handshake works. You will build one server that exposes a tool, a resource, and a prompt. Then you will write a client that2 min read
10Chapter 10: Configuring a host to launch and use serversThis chapter assumes you have read the earlier chapters on roles and transports. You should know that a host runs one client per server, and that a stdio server is a subprocess. It also assumes you can read JSON and run commands in a terminal. Here you will see how a host learns which servers to sta3 min read
11Chapter 11: Testing and debugging with MCP InspectorThis chapter assumes you have read the earlier chapters on JSON-RPC, session initialization, and building a minimal server. You should be able to run Python scripts and use a terminal. You also need Node.js installed, because the Inspector runs through npx.3 min read
12Chapter 12: What clients offer servers: sampling, roots, and elicitationThis chapter assumes you know the host, client, and server roles, the JSON-RPC message format, and the initialization handshake. Most MCP traffic flows from client to server: the client lists tools and calls them. Three features run the other way. The server sends a request, and the client answers i2 min read
13Chapter 13: Utilities: list-changed notifications, progress, cancellation, and loggingThis chapter assumes you know the JSON-RPC request/notification split and the initialization handshake from earlier chapters. It also assumes you have seen a tool call. The utilities here are small features that make long-running or changing servers easier to use.2 min read
14Chapter 14: Security, trust, and user consentThis chapter assumes you know the host, client, and server roles, the JSON-RPC message flow, and how tools, resources, and prompts work. It covers who is responsible for what when a model can call code on your machine.3 min read