chapter three

3 Actions with Model Context Protocol for AI agents

 

This chapter covers

  • Understanding MCP fundamentals for agent development
  • Getting Started with MCP Servers
  • Actioning MCP Servers with Agents
  • Building MCP Servers for Agents

In the last chapter, we examined an agent's core components. This chapter discusses the Model Context Protocol (MCP), the connector that empowers agents. MCP is often described as the USB-C for agents and LLMs because it provides a standard protocol for agent tools. More importantly, for us and our journey to developing complex research agent workflows, it opens up a landscape of tools our agents can use.

MCP adoption in the AI space has been so quick and widespread that almost anything we want our agents to do is likely supported by an MCP server. Not only that, but we can also build our agents as consumable MCP servers, allowing us to connect multiple complex agentic workflows as tools to other agent workflows so we can build agent specific workflows that can be reused like components.

In the following sections, we will examine the fundamentals of MCP architecture and then explore building and consuming servers with agents to understand how MCP transforms agent capabilities.

3.1 Understanding MCP fundamentals for agent development

3.1.1 The standardization problem MCP solves

3.1.2 MCP architecture: Clients, servers, and services

3.1.3 Core components: Tools, resources, and prompts

3.1.4 MCP deployment patterns for agents

3.1.5 MCP powers the functional agent layers

3.2 Getting started with MCP Servers

3.2.1 Coding up an MCP Server for Claude

3.2.2 Using the MCP inspector

3.2.3 Understanding MCP transport types

3.2.4 From desktop to agents: the key differences

3.3 Actioning MCP servers for Agents

3.3.1 Actioning local MCP servers over STDIO with agents

3.3.2 Actioning local MCP servers over SSE with agents

3.3.3 Connecting to the standard MCP servers

3.4 Building MCP servers for agents

3.4.1 Converting tools to an MCP server

3.4.2 Consuming MCP servers locally or remotely

3.5 Exercises

3.6 Summary