← All sessions, cheat sheets & labs
Week 4 · Field guide · Interop standard

Model Context Protocol (MCP)

The open standard for wiring tools and data to agents through one interface instead of bespoke glue per integration.

open standardtools + context2026 default

What it is

One interface for tools and context.

MCP is an open protocol, originating at Anthropic and now broadly adopted, that standardizes how applications expose tools, data, and context to LLMs. MCP servers publish tools with typed schemas; agents consume them over a uniform interface, so the same server works across different agents and clients. An MCP gateway sits in the middle to add authentication and guardrails, giving you a single place to enforce least-privilege access to whatever the agent can reach.

The one job

Standardize the tool interface.

Instead of writing custom glue for every tool and every framework, you connect through one contract. A tool published once as an MCP server is usable by any MCP-speaking agent, and access to it can be governed centrally rather than per integration.

Reach for it when

Skip it when

A minimal look

Connect, list, and call a tool.

import { Client } from "@modelcontextprotocol/sdk/client";

// schematic: a client connecting to one MCP server
const client = new Client({ name: "agent", version: "1.0" });
await client.connect(transport);   // stdio or HTTP transport

const { tools } = await client.listTools();   // discover what the server exposes
const result = await client.callTool({
  name: "search_docs",
  arguments: { query: "guardrails" },
});

The principle it teaches

Course principle

Tools are contracts (Session 7). MCP is the industry turning that contract into a standard, with least-privilege enforced at the protocol level: exactly the Week 4 security posture, generalized beyond a single app.

Where it fits your labs

This is a Week 4 tool that sits where agent tooling meets security. The tool contracts you write by hand become MCP servers, and a gateway in front of them is where you enforce which tools the agent may actually call.

Use in
Lab 4, wiring agent tools and enforcing least-privilege access.
week 4
Pairs with
An MCP gateway (for example Portkey) for authentication and guardrails.