i Informopedia.com
Artificial Intelligence Tier 1 · Public

How Model Context Protocol (MCP) Works: A Complete Guide

2,812 words 14 min read Updated December 2, 2026

Model Context Protocol (MCP) is an open standard that lets AI applications connect to outside systems — files, databases, tools and services — through one shared set of rules instead of a custom integration for each one. Its creators describe it as a USB-C port for AI applications: just as USB-C gives every device one standard connector, MCP gives every AI application one standard way to reach the tools and data it needs. This guide explains how MCP works, from its three roles and three primitives to its 2026 redesign, its security risks and its limits.

What Is the Model Context Protocol?

Before MCP, connecting an AI application to an external system meant building a bespoke integration. A chatbot that needed your calendar, your files and your issue tracker needed three separate connections, each written against a different API, and each one had to be rebuilt for every new model or application. With M AI applications and N data sources, that meant M × N integrations — a matrix that grew out of control as both sides multiplied.

MCP collapses that matrix to M + N: each application implements the protocol once, each data source implements it once, and any compliant application can then reach any compliant server. The protocol defines how the two sides discover each other, describe what is available, and exchange structured messages — all built on JSON-RPC 2.0, a widely used format for remote procedure calls.

MCP was created at Anthropic by David Soria Parra and Justin Spahr-Summers and announced as an open standard on 25 November 2024. In December 2025 Anthropic donated it to the Agentic AI Foundation (AAIF), a directed fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI — putting MCP under the same neutral governance model as Kubernetes and Linux. The specification and SDKs (Python, TypeScript, C# and Java) are open source. Within roughly a year of its release, MCP had more than 10,000 active public servers and more than 97 million monthly downloads across its SDKs, according to Snowflake’s MCP overview.

It is worth being precise about what MCP is and is not. It is a protocol, not a product, a model or a memory system. It does not make an AI smarter, and it does not remember anything between sessions. What it does is standardise the connection between an AI and the outside world — the plumbing that lets an agent read your files, query a database or send a message without a custom-built bridge for each task.

The Three Roles: Host, Client and Server

Every MCP setup has three participants. Getting them straight makes the rest of the protocol fall into place.

Role What it is Examples
Host The AI application you interact with. It holds the model, manages the conversation and decides when to use a tool. Claude Desktop, Claude Code, VS Code, Cursor, ChatGPT
Client A component inside the host that maintains a dedicated one-to-one connection with a single server and handles the protocol-level communication. One client per server, created by the host
Server A lightweight program that exposes tools, resources and prompts wrapping some underlying system. Filesystem server, GitHub server, Sentry server, Postgres server

The host creates one client for each server it connects to, so a single host can run many clients in parallel. A server is simply the program that serves context — regardless of where it runs. A local filesystem server runs on your own machine and talks to its client over the stdio transport; the official Sentry server runs on Sentry’s platform and talks over Streamable HTTP. Both are “MCP servers” in exactly the same sense.

The Three Primitives: Tools, Resources and Prompts

Servers expose three kinds of capability, called primitives. The difference between them is who is in control.

Primitive Controlled by What it does Example
Tools The model Executable actions the AI can invoke query_sql on a database, create_issue in Jira, send_email
Resources The application Read-only data the AI can consult A file’s contents, a database schema, a log file
Prompts The user Reusable templates that structure an interaction A code-review template, few-shot examples for a database tool

Each primitive has methods for discovery (tools/list, resources/list, prompts/list) and for use (tools/call to execute a tool, resources/read to fetch data, prompts/get to retrieve a template). Tools carry a JSON Schema describing their inputs, which is how the model knows what arguments to send. Listings are dynamic: a server can change what it offers, and the client re-discovers it. A database server, for example, might expose a query_sql tool, a resource holding the database schema, and a prompt with few-shot examples for querying it — all three primitives working together.

Clients can expose primitives too. The most important is elicitation, which lets a server ask the user for more information or for confirmation before acting, via the elicitation/create method. Three older client and server features — Roots, Sampling and Logging — were deprecated in protocol version 2026-07-28; new implementations are told to pass directories through tool parameters, call LLM provider APIs directly, and log to stderr or OpenTelemetry instead.

How an MCP Request Works, Step by Step

Here is what happens when you ask an agent to do something that needs a tool. Take the request “create a Jira ticket for the login bug” typed into a host such as Cursor:

  1. Discovery. When the client first connects, it asks the server what it offers — the mandatory server/discover request returns the server’s supported protocol versions and capabilities, including its tools, prompts and resources.
  2. Listing. The client calls tools/list and receives the server’s tool definitions: names, descriptions and JSON Schemas for their parameters.
  3. Decision. The host passes your prompt plus the list of available tools to the model. The model decides it needs the Jira server’s create_issue tool and what arguments to send.
  4. Invocation. The host routes the call through the client, which sends a tools/call JSON-RPC request to the server with the tool name and structured parameters.
  5. Execution. The server validates the parameters, runs the tool against the underlying system — in this case, Jira’s API — and returns a structured result.
  6. Response. The client hands the result back to the host, the model reads it, and you see the answer: the ticket number, the link, and a summary of what was created.

That separation is the whole point: the model never talks to Jira directly, never sees its API keys, and never needs to know how the server is implemented.

Discovery and the End of the Handshake

One of the biggest changes in MCP’s short history arrived with the July 2026 release, protocol version 2026-07-28. Earlier versions opened every session with an initialize handshake that negotiated the protocol version and capabilities up front, and kept session state on the server. The current version is stateless: there is no handshake and no session to maintain.

Instead, every request carries its protocol version and client identity in a _meta field (on HTTP, the version is also sent in an MCP-Protocol-Version header), so the server can process each request on its own. Any request can land on any server instance behind a standard load balancer, which makes MCP deployments horizontally scalable without shared state. If a server does not support the requested version, it must reply with an UnsupportedProtocolVersionError listing the versions it does support, and the client retries with a mutually supported one. The server/discover request lets a client learn a server’s versions and capabilities up front, but it is optional — a client may simply send a request and handle the error if its version is not supported.

Older versions (2025-11-25 and earlier) still use the handshake, and the specification defines how dual-era implementations support both. This matters because tutorials written before July 2026 describe a handshake that no longer exists in the current protocol — if a guide tells you to negotiate a session, it is describing the old version.

Transports: Stdio and Streamable HTTP

MCP’s data layer — the JSON-RPC messages — is the same on every connection. The transport layer underneath it comes in two forms:

  • Stdio transport. The server runs as a local process and communicates over standard input and output. This is how local servers work — Claude Desktop launching a filesystem server on your own machine, for example. It is fast, with no network overhead, and a stdio server typically serves a single client.
  • Streamable HTTP transport. The server runs remotely and communicates over HTTP POST, with optional Server-Sent Events for streaming. This is how remote servers work — the Sentry server, or a company database exposed to a whole team. One remote server typically serves many clients, and standard HTTP authentication applies: bearer tokens, API keys or custom headers. The specification recommends OAuth 2.1 for obtaining tokens.

An earlier HTTP+SSE transport was deprecated and replaced by Streamable HTTP. When choosing a server, the transport tells you where the code runs and who else can reach it: a stdio server runs on your machine under your account, while a remote server is a service you are trusting with whatever its tools can touch.

What MCP Can Do in Practice

The protocol’s own documentation gives a flavour of what becomes possible once the plumbing is standard. An agent can reach into Google Calendar and Notion and act as a genuinely personal assistant. Claude Code can generate an entire web app from a Figma design. An enterprise chatbot can query several databases across an organisation in plain language. An AI model can create a 3D design in Blender and send it to a 3D printer. In development tools, VS Code can connect to a Sentry server to pull error reports into the editor, and to a filesystem server to work with local code, at the same time.

Two optional extensions show where the protocol is heading: Tasks, which lets a server return a durable handle for a long-running request so a client can poll for the result later, and MCP Apps, which lets servers ship interactive interfaces that run inside the AI client. Neither is part of the core protocol — support is negotiated, and a party that lacks one falls back to core behaviour.

None of this makes the model itself any more capable. What changes is the range of things an existing model can reach, and how cheaply a new connection can be added. A team that once budgeted weeks for each integration can now add a server in an afternoon — and, just as importantly, swap models without rebuilding the integrations, because the servers do not care which model is on the other end.

MCP vs A2A: Two Protocols, Two Jobs

MCP is often confused with the Agent2Agent (A2A) protocol, and the two are closely related — both were donated to the Agentic AI Foundation, A2A in August 2026 — but they solve different problems. MCP connects one agent to the tools and data it needs: it is the vertical link between an agent and the systems it acts on. A2A connects agents to each other: it is the horizontal link that lets an agent built by one company discover, delegate to and exchange results with an agent built by another. In a real deployment they work together — an agent might use A2A to hand a task to a specialist agent, which then uses MCP to query the database and file the result. If you want the full picture of how agents cooperate, read our guide to A2A protocol explained.

Security: What Can Go Wrong

MCP’s power is also its risk: a server’s tools are, in the specification’s own words, arbitrary code execution, and tool descriptions should be treated as untrusted unless they come from a trusted server. The most studied attack is tool poisoning, described by Invariant Labs on 1 April 2025. A malicious server hides instructions inside a tool’s description — text the user never sees but the model reads as part of its context. In Invariant’s proof of concept, an innocent-looking add tool carried hidden instructions to read the user’s SSH keys and configuration files and pass them out through an extra parameter; the Cursor agent did exactly that, while its confirmation dialog showed only a summary of the tool call.

Two variants make the problem worse. In a rug pull, a server changes its tool descriptions after you have already approved it — the thing you vetted is no longer the thing running. (CVE-2025-54136 was a rug pull in Cursor’s handling of MCP configuration: an attacker with write access to a shared repository could swap an approved server’s command for a malicious one without triggering a new warning.) In shadowing, one server’s description changes how the model uses a different, trusted tool — in Invariant’s second experiment, a bogus add tool told the model to send every email through the trusted email server to the attacker instead. OWASP lists tool poisoning as MCP03 in its MCP Top 10.

The defences are unglamorous but effective: install servers only from publishers you trust, read the actual tool descriptions before connecting (and again after every update), pin or hash tool definitions so changes are flagged, give each server the least privilege it needs — a read-only database credential rather than an admin key — and require human approval before destructive actions such as sending messages or deleting data. The current specification requires OAuth 2.1 with tokens bound to the specific server when authorisation is used over HTTP, and forbids passing tokens through to other systems — but authorisation itself is optional, so a carelessly configured server may run with no authentication at all.

Limitations of MCP

MCP standardises connection, not capability, and its limits are worth stating plainly. First, it adds no memory: an agent that connects to your tools through MCP still forgets everything between sessions unless a separate memory system is built on top. Our guide to the limitations of AI agent memory systems explains why that problem is unsolved, and short-term vs long-term memory in AI agents covers the systems trying to fix it. Second, MCP does not judge quality: a server can expose badly designed, misleading or malicious tools, and the protocol will faithfully deliver them to the model. Third, every tool a server advertises consumes context — connect dozens of servers and the tool descriptions alone can crowd out the conversation. Fourth, the protocol is still young and moving fast: the July 2026 redesign removed the handshake and deprecated three features, so documentation goes stale within months. And finally, MCP provides no built-in directory of trustworthy servers; finding and vetting them is still the user’s job.

Should You Use MCP?

If you use an AI assistant and want it to work with your own data — your files, your calendar, your code, your databases — MCP is now the default way that happens, and it is supported by Claude, ChatGPT, VS Code and Cursor among others. MCP is one of the core protocols of the modern AI agent stack; for the wider picture, see our complete guide to artificial intelligence. If you build AI applications, it is the difference between writing one integration and writing dozens. And if you run a service that AI agents should be able to reach, exposing an MCP server is how you make that happen without negotiating a separate deal with every AI vendor.

The honest caveat is that MCP is infrastructure, not magic. It will not make a weak model strong, it will not remember what you told it yesterday, and it will not protect you from a server you should not have trusted. What it does — one standard connector between AI applications and the systems they need — is the kind of boring, foundational work that whole ecosystems get built on. The USB-C analogy is apt precisely because it is unglamorous: nobody celebrates a connector, but everybody notices when one is missing.

What does MCP stand for?

Model Context Protocol — an open standard created by Anthropic in November 2024 for connecting AI applications to external tools, data sources and workflows.

Is MCP only for Claude?

No. MCP is model-agnostic and open. Claude, ChatGPT, VS Code, Cursor and many other applications support it, and any compliant client can connect to any compliant server.

What is the difference between MCP and A2A?

MCP connects one agent to the tools and data it needs; A2A connects agents to each other so they can discover, delegate and share results. They work together in real deployments.

Is MCP secure?

Not by default. Tool descriptions are untrusted input, and attacks such as tool poisoning and rug pulls have been demonstrated. Use servers only from trusted publishers, read tool descriptions, pin definitions, and give each server least-privilege credentials.

Do I need to be a developer to use MCP?

No. Many AI applications let you add MCP servers through settings, with no coding. Building your own server does require programming, using one of the official SDKs in Python, TypeScript, C# or Java.

More in Artificial Intelligence

Artificial Intelligence Tier 1 · Public

Short-Term vs Long-Term Memory in AI Agents: A Complete Guide

Ask an AI agent a question, close the tab, and come back tomorrow: it will not remember you. The language model underneath is stateless — every call starts from zero. And yet…

2,858 words 14 min read December 1, 2026