All lessons in AI Engineering: From Foundation Models to Evaluated Applications

MCP and Tool Interoperability

Explain MCP roles and connect a model application to a bounded tool service with explicit lifecycle and authorization rules.

90 minutes · Members lesson · preview

What you will learn

  • Explain the roles and lifecycle of an MCP host, client, and server.
  • Specify a bounded tool service with discovery, schema validation, and explicit trust boundaries.
  • Diagnose protocol, tool, and uncertain-action failures using a reproducible local test plan.

You have two applications that need the same order lookup and simulated ticket tools. Copying the tool implementation into each application creates two places to fix ownership checks, update schemas, and repair duplicate-action protection. A standard interface can let the applications call one capability through a shared protocol while keeping each application's approval policy explicit.

This core knowledge lesson follows T14's tool contracts. It introduces Model Context Protocol, or MCP, as an interoperability layer. You will distinguish the protocol connection from the business rules of a tool, then design a complete local interaction. Required practice P13 implements the server, client, and failure tests; this lesson prepares the reasoning behind that build.

The course reference implementation uses the official Python MCP SDK version 1 family, constrained below version 2. The initialization walkthrough describes this pinned implementation and the older protocol lifecycle. The 2026-07-28 specification changes that lifecycle; the version-comparison section below explains the distinction. Version-specific names are not an instruction to copy the newest main-branch example into any environment. The lesson's arithmetic and traces are invented teaching cases; no paid model call is required to understand or test the local protocol boundary.

Choose another lesson