Field guide · Layer 05

MCP, for people building on top of an LLM

The AI Agent guide covers how a model decides to call a tool. This is the standard that determines where that tool actually lives, how it's discovered, and how much of the ecosystem can reach it without a bespoke integration.

00 — The M×N problem

Every app, every tool, one integration each — instead of every pair

Before the Model Context Protocol, every AI application that wanted to connect to an external tool or data source needed its own bespoke integration for that specific pairing. With M applications and N tools, that's M×N custom integrations — every chat app, IDE, and agent framework re-implementing its own connector to Slack, GitHub, Postgres, Google Drive, and everything else, one at a time.

MCP replaces that with a single, shared protocol: each application implements the client side once, each tool or data source implements the server side once, and the combinatorial cost collapses from M×N down to M+N. The comparison used across the ecosystem is a USB-C port — a common connector standard, rather than a proprietary cable per device.

01 — Origin & adoption

An open standard, adopted fast

Anthropic released MCP as an open standard on November 25, 2024, alongside the spec, SDKs, local server support in Claude Desktop, and an open-source reference-server repo (Google Drive, Slack, GitHub, Postgres, and more). Adoption since then has moved quickly and broadly:

WhenWhat happened
Mar 2025OpenAI adopts MCP across ChatGPT desktop, the Agents SDK, and the Responses API; the spec adds Streamable HTTP transport and OAuth 2.1
Apr–May 2025Google DeepMind confirms MCP support for Gemini models and SDKs
May 2025Microsoft announces Windows 11 MCP integration and joins the steering committee alongside GitHub
Jun 2025Salesforce anchors its Agentforce 3 platform around MCP
Nov 2025One-year mark: over 16,000 MCP servers exist; roughly 70% of major SaaS brands offer a remote MCP server

The protocol itself keeps evolving — the current spec has moved past the "v1" shape most 2024–2025 tutorials describe, restructuring the handshake into a stateless, per-request capability negotiation and adding new primitives. Treat any MCP tutorial's exact wire format as a snapshot in time, not a fixed target.

02 — Hosts, clients, servers

Three roles, one connection each

RoleWhat it is
HostThe AI application that coordinates and manages one or more MCP clients — Claude Desktop, Claude Code, VS Code, ChatGPT desktop
ClientA component inside the host maintaining a dedicated connection to exactly one MCP server, fetching context from it for the host to use
ServerA program that provides tools, resources, or prompts to clients — local or remote

The connection model is strictly 1:1 — a host talking to four different servers instantiates four separate client objects, one per server. A local (stdio) server typically serves a single client this way; a remote (HTTP-based) server typically serves many clients concurrently, the way a SaaS vendor's official hosted MCP server serves every one of its customers' agents at once.

03 — Transports & primitives

How the bytes move, and what's actually on offer

Two transports cover essentially all deployments: stdio — direct process communication on the same machine, no network overhead, used for local servers spawned as a subprocess — and Streamable HTTP — HTTP with optional server-sent events for streaming, used for remote servers, carrying OAuth 2.1-based authorization since the March 2025 spec revision. Both transports carry the identical JSON-RPC message format underneath; the protocol layer is deliberately indifferent to which one is moving the bytes.

On top of that transport, MCP exposes three primitives, each with a different trust boundary:

PrimitiveControlled byWhat it is
ToolsThe modelExecutable functions the model decides to invoke — file operations, API calls, database queries
ResourcesThe applicationContextual, read-only data the app pulls in without side effects — file contents, database records, API responses
PromptsThe userReusable, pre-defined templates a user selects before inference — closer to a saved macro than a tool call

The separation exists because these three carry genuinely different risk. A tool is arbitrary code execution the model itself decides to trigger, so it needs an explicit consent gate. A resource is read-only context the application decides to pull in automatically — lower risk, but the spec still requires hosts to get explicit user consent before exposing user data to a server. A prompt is explicitly user-invoked, never something the model reaches for unprompted — keeping it distinct from open-ended tool use is a deliberate design choice, not an oversight.

04 — MCP vs. function calling

A transport standard, not a new way to reason

This is worth stating plainly, since it's a common point of confusion: MCP doesn't replace tool/function calling — the mechanic covered in the AI Agent guide, where the model decides to call a function and your code executes it, is completely unchanged. What MCP standardizes is the layer around that mechanic: where the tool's logic lives, how it's discovered, and how many different applications can reach it without each writing their own connector.

With plain function calling, a tool's definition is embedded directly in a specific application's API request payload — any change to the tool means updating that application's code, and the app executes the function in-process immediately after the model asks for it. With MCP, the tool's logic lives in an independently-running server, decoupled from any one host application; discovery and invocation happen through the standardized protocol, so the same server works unmodified across Claude, ChatGPT, Gemini-based agents, and any IDE that speaks MCP — build once, use anywhere. Credentials and secrets are isolated at the server rather than scattered through every calling application's code, which is itself a meaningful security simplification.

05 — Message lifecycle

JSON-RPC underneath, a simple handshake on top

MCP's data layer is built on JSON-RPC 2.0 — requests carry an ID and a method name, responses carry a matching ID and a result or error, and notifications (like "my tool list changed") omit the ID entirely and expect no reply. The classic, still-widely-implemented lifecycle most current tutorials and SDKs describe: the host spins up a client per server, client and server exchange protocol version and capabilities, the client asks what's available (tools/list, resources/list, prompts/list), and then invokes what it needs (tools/call, resources/read, prompts/get).

The current spec has since moved this toward an explicitly stateless model — every request, not just the first, carries its own capability metadata — which matters if you're reading an MCP tutorial and the wire format doesn't quite match what you see in a fresh SDK. The primitives and trust model in §03 have stayed stable; the exact handshake mechanics are what's still moving.

06 — Security risks

Standardizing tool access standardizes the attack surface too

MCP's own spec states its security principles directly, and is equally direct that the protocol cannot enforce them itself — that responsibility falls on whoever implements the host and client. The three stated principles: explicit user consent before any tool invocation, no transmitting resource data elsewhere without consent, and treating tool descriptions from untrusted servers as untrusted content by default.

Risk patternWhat actually happens
Confused deputyA server acts using its own credentials rather than the requesting user's — a manipulated model can cause a high-privilege server to take an action the user never authorized
Tool poisoningMalicious instructions hidden inside a tool's description or schema — content the model reads in full but a client UI may only show a truncated summary of to the human approving it. Demonstrated concretely against Cursor, exfiltrating SSH keys via a fake "add" tool's hidden instructions
Tool shadowingA malicious server's tool description doesn't attack directly — it injects instructions that change how the agent behaves toward a different, otherwise-trusted tool or server
Rug pullsA server changes its tool definitions after a user already approved it, turning a previously-vetted tool malicious without a fresh consent prompt
Supply-chain riskInstalling unvetted third-party servers from public registries — typosquatted names, compromised dependencies, unreviewed code

Mitigations converge on a consistent set: least-privilege, short-lived credentials scoped per server; sandboxing local servers with restricted filesystem and network access; showing full (not truncated) tool descriptions before approval; pinning/hashing tool definitions to catch rug pulls; and reviewing a third-party server's actual source rather than trusting its registry listing. This is also exactly the threat surface the next guide, Guardrails, exists to police at runtime.

07 — Where it sits in the stack

The bridge between the agent loop and the outside world

The AI Agent guide already covers the core loop — the model decides to call a tool, gets a result back. MCP is what lets that loop reach a large, growing ecosystem of external tools and data sources through one common client implementation, instead of a bespoke connector per tool.

AI Agent (Layer 04)

The decision to call a tool, and the loop that surrounds it, is covered in full in the AI Agent guide — MCP standardizes how that call actually reaches the tool.

Guardrails (Layer 06)

MCP's own security model — untrusted tool descriptions, confused-deputy risk, consent requirements — is precisely the threat surface the next guide covers policing at runtime.

A Guardrails deep dive is next — back to the hub to check what's published.

08 — Practical guidance

When to reach for MCP, and when not to

  • Use plain function calling when you control both sides — the integration is single-purpose, won't be reused across other AI applications, and the overhead of running a separate server isn't worth it for one trivial API call.
  • Build or adopt an MCP server when the tool needs to be reusable — across multiple AI applications, multiple LLM providers, or multiple teams inside an org that would otherwise each write their own bespoke connector to the same system.
  • Treat credential isolation as a real benefit, not a footnote — secrets living server-side instead of scattered through every calling application's code is a meaningful reduction in attack surface on its own.
  • Vet a third-party server before installing it: read the actual source, check what permissions/OAuth scopes it requests, and confirm your client shows full tool descriptions rather than a truncated summary.
  • Don't assume server-level trust composes safely — a single well-behaved-looking server can still manipulate how your agent behaves toward a different, otherwise-trusted server (tool shadowing).
09 — Getting started

Before you adopt MCP

  • Confirm the integration actually needs to be reusable across applications — if it's genuinely single-purpose, plain function calling may be simpler and sufficient.
  • Check whether an official MCP server already exists for the tool or SaaS platform you need before building one from scratch.
  • Scope every server's credentials to the minimum permissions the task actually needs — never a broad API key "just in case."
  • Sandbox any local server you run, especially third-party ones, with restricted filesystem and network access.
  • Confirm your host/client actually surfaces full tool descriptions to a human approver — a truncated summary is exactly what tool poisoning depends on.
  • Read the Guardrails guide before wiring an agent to any tool with real-world side effects — the stakes of a compromised tool call go up sharply once the agent can actually act.
MCP doesn't make tool calling smarter. It makes the same tool reachable from anywhere, which is exactly why the trust model around it matters as much as the mechanics.
10 — Sources

What this guide draws on

Read in full and used to shape the structure and claims of this guide.

SourcePublisherUsed for
Introducing the Model Context Protocol Anthropic Official launch announcement, the M×N problem framing, launch bundle (§00, §01)
Architecture overview Model Context Protocol (official docs) Hosts/clients/servers, 1:1 connection model, transport layer, JSON-RPC examples (§02, §03, §05)
Specification (latest) Model Context Protocol Authoritative primitive list and the official Security and Trust & Safety principles (§03, §06)
Model Context Protocol (MCP): an overview philschmid.de Model/application/user-controlled framing for tools, resources, prompts (§03)
Why the Model Context Protocol Won The New Stack Dated adoption timeline across OpenAI, Google DeepMind, Microsoft, Salesforce (§01)
One Year of MCP Zuplo Ecosystem growth statistics — server count, SaaS adoption rate (§01)
MCP vs. Function Calling: How They Differ and Which to Use Descope Direct comparison of MCP against native function calling (§04, §08)
MCP Security Cheat Sheet OWASP Confused deputy, rug pulls, supply-chain risk, and mitigation checklist (§06)
MCP Security Notification: Tool Poisoning Attacks Invariant Labs Original tool poisoning and tool shadowing research, with a concrete Cursor exploit (§06)

Compiled 2026. Adoption dates and ecosystem figures reflect the cited sources' publication dates — MCP's spec and ecosystem continue to move quickly, so treat specifics as a snapshot rather than a permanent state.