AI & ML October 25, 2026

How Does Model Context Protocol Work?

A 8-minute read

Every AI tool you connect to a chatbot used to need its own bespoke plumbing. A standard released in 2024 is quietly making that problem obsolete.

In the early days of the AI application boom, a company that wanted its chatbot to read files, query a database, and post to Slack had to build three separate connectors. Each one was custom-made. When the company switched AI providers, it often had to rebuild all three from scratch. A team connecting ten tools to two different AI systems faced twenty integration projects. The technical name for this is the N-times-M problem: N applications multiplied by M tools equals an enormous, duplicated engineering burden. That burden is what Anthropic set out to eliminate on November 25, 2024, when it published the Model Context Protocol.

The short answer

Model Context Protocol (MCP) is an open standard that defines how an AI application connects to external tools and data sources. Instead of every application building its own custom connector for every tool, both sides follow a shared protocol: the tool exposes a server, the application connects a client, and they communicate using JSON-RPC 2.0 messages over a standard transport. Any MCP-compatible application can connect to any MCP-compatible server.

The full picture

The problem it was built to solve

Before MCP, the integration landscape looked like a bowl of spaghetti. Connecting an AI assistant to five external services meant five bespoke connectors, each requiring a developer to learn the service’s API, handle its authentication scheme, and map its data into a format the model could use. OpenAI’s 2023 function-calling API and the ChatGPT plugin framework were early attempts at standardization, but both were vendor-specific. Code written for one provider did not transfer to another.

Anthropic’s November 2024 announcement described MCP’s goal plainly: replace fragmented integrations with a single protocol, the same way USB standardized device connections and TCP/IP standardized network communication. Write an MCP server once, and any MCP-capable application can use it, regardless of which AI model powers it.

Hosts, clients, and servers

MCP divides the world into three participants, each with a specific role.

The host is the AI application or agent runtime: a chat interface, a coding assistant, or an autonomous agent pipeline. The host manages the AI model and controls the connections to external capabilities. Claude Desktop and Claude Code are both MCP hosts. So is Visual Studio Code with Copilot enabled.

The client lives inside the host. When the host wants to connect to an external service, it creates an MCP client for that service. Each client maintains exactly one connection to exactly one server. A single host can run many clients simultaneously, one per connected service.

The server is the program that exposes capabilities. It might wrap a file system, a database, a web search engine, or a custom internal API. The server does not know or care which AI model is on the other end. It just follows the MCP protocol and responds to standard messages.

This structure matters for security. Because each client-server pair is a dedicated, isolated connection, a misbehaving or compromised server cannot directly affect other servers or the host’s core operations. The isolation is a deliberate design choice, not a side effect.

What servers can expose

An MCP server can advertise three types of capabilities, and each type has a different principal.

Tools are functions the AI model can decide to call. Searching the web, writing a file, or running a database query are all tools. The model sees the tool’s name and description, decides when to invoke it, and provides the necessary arguments. Tools are model-controlled.

Resources are data that the application makes available as context. A resource might be the contents of a file, a database row, or a live data feed. The application decides which resources to include in a given interaction, not the model. Resources are application-controlled.

Prompts are reusable prompt templates that the user can select and invoke. A prompt might be a structured workflow for code review or a templated briefing format. Prompts are user-controlled.

The spec draws these lines explicitly so developers know exactly who initiates each type of action. That clarity simplifies building consent flows and audit trails.

How messages flow

MCP uses JSON-RPC 2.0 as its underlying message format. JSON-RPC is a lightweight remote procedure call protocol that serializes calls and their responses as JSON objects. MCP adds its own request types on top: tools/list to discover what a server offers, tools/call to invoke a specific tool, resources/list and resources/read for fetching data, and prompts/list and prompts/get for retrieving templates.

A typical interaction follows a predictable sequence. The client connects and both sides exchange an initialization handshake, establishing which protocol version they share and which capabilities each side supports. The client then calls tools/list to see what the server can do. When the model decides it needs a tool, the client sends a tools/call request with the tool name and arguments. The server executes the function and returns the result as a JSON-RPC response.

This design closely mirrors the Language Server Protocol (LSP), the standard that lets code editors communicate with language-specific tools for autocompletion and error detection. One of MCP’s creators previously worked on LSP-style integrations, and the structural resemblance is intentional. LSP proved that a single protocol could decouple editors from language tools at scale. MCP applies the same idea to AI applications and external capabilities.

How the connection is made

MCP supports two transport mechanisms, one for local servers and one for remote.

For local servers running on the same machine as the application, MCP uses standard input and output (stdio). The host launches the server as a child process and communicates by writing to its stdin and reading from its stdout. This is simple, fast, and requires no network configuration. Most developer tooling and desktop applications use stdio.

For remote servers, MCP uses HTTP with a streaming mechanism called Streamable HTTP. As explained in the official MCP documentation, Streamable HTTP is the current recommendation for remote deployments. It replaced an older pair of transports (plain HTTP plus Server-Sent Events) that handled requests and streaming separately. The consolidated Streamable HTTP transport handles both in a single connection, making remote deployments simpler and more reliable.

Security and trust

The MCP specification is explicit on one point that often gets overlooked: MCP does not itself provide security guarantees. It defines a communication protocol, not a trust model. Whether a server is allowed to perform a particular action, whether a user has consented to a tool invocation, and whether data leaving an organization is appropriate are all questions that the host application must answer for itself.

The spec does define consent primitives and recommends that hosts implement human-in-the-loop approval before executing sensitive tool calls. But implementing those flows is the application developer’s responsibility. A thoughtful MCP host builds explicit consent workflows; a careless one does not, and the spec cannot stop it.

Why it matters

By December 2025, when Anthropic donated MCP to the Agentic AI Foundation under the Linux Foundation, there were already more than 10,000 active public MCP servers. ChatGPT, Cursor, Visual Studio Code, Gemini, and Microsoft Copilot had all added support. That pace of adoption reflects how real the underlying problem was: developers across the industry were solving the same N-times-M integration problem independently, and they moved quickly to stop.

For companies building AI products, MCP shifts the economics of integration. Before the standard, connecting a new data source to an AI application meant weeks of custom engineering. With MCP, any organization that publishes an MCP server becomes instantly compatible with every MCP-capable application. The server is written once. The integration overhead for the second, third, and hundredth client is effectively zero.

For end users, the practical consequence is that AI agents become more capable faster, because the ecosystem of connectable services grows independently of any single application’s development roadmap. A user of a chat application benefits from every new MCP server published anywhere, without waiting for the chat application’s developers to build native support.

Common misconceptions

“MCP is an Anthropic product that locks you into Claude.”

MCP was created at Anthropic, but it was designed as a vendor-neutral open standard from day one. As of December 2025, governance moved entirely to the Agentic AI Foundation, an independent body under the Linux Foundation with Anthropic, OpenAI, and Block as co-founders. OpenAI added MCP support to ChatGPT. Google DeepMind added it to Gemini. The specification is published openly, and any developer can implement it.

“MCP handles security for you.”

It does not, and the spec says so directly. MCP is a communication protocol, not a security framework. It does not authenticate users, authorize tool calls, or enforce data boundaries. Those responsibilities stay with the application developer. Using MCP without implementing appropriate consent flows and access controls is like installing a door without a lock.

“MCP is only useful for autonomous or agentic AI workflows.”

Most early coverage focused on MCP’s role in autonomous agents, but the protocol works equally well in simple chat applications. Any AI assistant that needs to access a file, run a query, or fetch live data benefits from MCP, regardless of whether the workflow is autonomous or fully human-directed. The 10,000-plus public servers built by late 2025 cover everything from basic file access to complex enterprise data pipelines, serving applications from single-turn assistants to multi-step autonomous systems.

Key terms

MCP (Model Context Protocol): An open standard that defines how an AI application connects to external tools and data sources using a shared message format and transport mechanism.

Host: The AI application or agent runtime that manages one or more MCP clients and runs the AI model. Examples include Claude Desktop, Visual Studio Code, and custom agent frameworks.

MCP client: A component inside the host that maintains a single dedicated connection to one MCP server. One host can run multiple clients simultaneously.

MCP server: A program that exposes capabilities (tools, resources, or prompts) to any MCP-compatible client. Servers are typically written to wrap a specific service or data source.

JSON-RPC 2.0: A lightweight remote procedure call protocol that serializes function calls as JSON objects. MCP uses it as the underlying message format for all client-server communication.

Tools, resources, and prompts: The three capability types an MCP server can expose. Tools are model-invoked functions, resources are application-provided context data, and prompts are user-selectable templates.

Streamable HTTP: The transport mechanism MCP recommends for remote server deployments, handling both request and streaming response in a single HTTP connection.

Common questions

What is MCP in simple terms?

MCP (Model Context Protocol) is an open standard that defines how an AI application connects to external tools and data sources. The tool exposes a server, the application runs a client, and they communicate using JSON-RPC 2.0 messages. Any MCP-compatible application can connect to any MCP-compatible server.

Who created MCP and who controls it now?

Anthropic engineers David Soria Parra and Justin Spahr-Summers created MCP, and Anthropic published it as an open standard on November 25, 2024. In December 2025, Anthropic donated it to the Agentic AI Foundation, a directed fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI.

What can an MCP server expose?

An MCP server can expose three types of capabilities: tools (functions the AI model can invoke, like running a search or writing a file), resources (data the application makes available as context, like a document or database record), and prompts (reusable templates that users can select). Tools are model-controlled, resources are application-controlled and prompts are user-controlled.

Is MCP only for Claude?

No. MCP was created at Anthropic but designed as a vendor-neutral open standard. By December 2025, ChatGPT, Cursor, Visual Studio Code, Gemini and Microsoft Copilot had all added MCP support.

How is MCP different from just calling an API?

With a regular API, a developer builds a bespoke connector for each service, handling its authentication and data format. MCP provides a shared protocol: the server advertises what it can do during initialization, and the client discovers and calls those capabilities through standard messages. One integration pattern works for every server that follows the spec.

That's the distilled version.