Model Context Protocol is an open standard that lets AI applications connect to external tools, data sources, and workflows through a structured, interoperable interface. Before MCP, every assistant team that wanted to wire a language model into a database, a ticketing system, or a code repository wrote a one-off integration against that vendor's API, then wrote it again for the next model. The protocol replaces that N-times-M custom glue with a single wire format: a server is built once and any compliant host can speak to it. The official site describes MCP as a USB-C port for AI applications, the same physical analogy that captures the substitution it offers. Hosts such as Claude and ChatGPT, JSON-RPC messages, and three well-defined roles do the rest of the work. The result is an interoperability layer with a published specification, official SDKs, and a versioning scheme that lets clients and servers evolve without breaking each other.
What Model Context Protocol Is and Why It Exists
Model Context Protocol is an open-source standard, maintained by Anthropic, that gives any AI application a single interoperable interface for connecting to external data sources, tools, and workflow services. Anthropic announced and open-sourced the protocol so that developers building AI assistants would stop reinventing the integration plumbing for every model and every external system (Anthropic, Introducing the Model Context Protocol). The official MCP documentation frames the same idea more bluntly: MCP is an open protocol that enables seamless integration between LLM applications and external data sources and tools (MCP Specification 2025-11-25). That is the structural value, sometimes called integrate-once: a tool server written for one host runs against any other host that implements the same open standard. The protocol covers three concerns simultaneously, sharing contextual information with language models, exposing tools and capabilities to AI systems, and building composable integrations and workflows. For the wider family of systems this sits inside, see how modern generative AI systems work and how autonomous AI agents are structured and what capabilities they need.

- Open standard: a publicly specified protocol any vendor can implement, with a permissive license and a published JSON Schema.
- LLM application: the host program that drives a language model, for example Claude Desktop, ChatGPT, or a custom AI agent runtime.
- Integration-once: the structural property that a server built against the protocol works with every compliant host, no per-vendor adapter required.
- Specification: the versioned document at modelcontextprotocol.io that defines message shapes, capabilities, and lifecycle rules in normative language.
The Three-Role Architecture: Hosts, Clients, and Servers
Model Context Protocol organizes every connection into three distinct roles: the host, the client, and the server, each with a defined responsibility in the message flow. The 2025-11-25 specification names them explicitly: hosts are LLM applications that initiate connections, clients are connectors within the host application, and servers are services that provide context and capabilities (MCP Specification 2025-11-25). The host application is the program the user actually runs, examples in the official documentation include Claude and ChatGPT. Inside that host, one MCP client is spawned per connection; the host may run many clients in parallel, one talking to a filesystem server, another to a database server, another to a search server. Each MCP client speaks to exactly one MCP server, and that server publishes a set of capabilities the language model can use. The clean split matters for security and lifecycle: the host owns user consent and the language model, the client owns the wire-level session, and the server owns the actual integration with an external system. For more on how large language models process context and produce outputs, see how large language models process context and produce outputs.
- Host application: the LLM-driven program the user interacts with directly, such as Claude Desktop or a developer's custom AI agent harness.
- MCP client: a connector inside the host that opens and manages exactly one session with one MCP server.
- MCP server: the service that exposes resources, prompts, and tools to the host through the protocol.
- Capability negotiation: the initialization step where the client and the server declare which features each side supports, so neither calls a method the other does not implement. Capability negotiation runs alongside version negotiation in the same initialize exchange.
Server and Client Capabilities: Resources, Prompts, Tools, Sampling, Roots, and Elicitation
Model Context Protocol defines six distinct capability types split between the two sides of a session: resources, prompts, and tools are features the server exposes to the client, while sampling, roots, and elicitation are features the client (host) offers to the server. The 2025-11-25 specification lists them under this two-way split, with each capability declared during negotiation so both peers know what is available before the language model issues its first call (MCP Specification 2025-11-25). On the server side, resources are read-only context the user or the model can pull in, a file's contents, a database row, or a wiki page. Prompts are templated workflows the user invokes deliberately, often surfaced as slash commands inside the host UI. Tools are the model-controlled action surface: declared functions the model itself decides when to call. On the client side, sampling lets a server ask the client to run a model completion on its behalf, enabling recursive agent behaviors where a server can reason about its own next step. Roots let the client tell the server which URI or filesystem boundaries it may operate within. Elicitation lets a server request additional information from the user through the client mid-execution, for instance asking for a confirmation or a missing parameter rather than failing the tool call.
- Resources (server): read-only context the server exposes for the host to attach to a prompt, such as files, database rows, or API responses.
- Prompts (server): reusable templates the server publishes that the user triggers deliberately, often as slash commands in the host UI.
- Tools (server): declared functions the server exposes that the language model invokes on its own based on context and the user's prompt.
- Sampling (client): a capability the client offers so a server can request a model completion from the host's language model, enabling recursive agent loops.
- Roots (client): URI or filesystem boundaries the client declares to the server as the valid operating scope for that session.
- Elicitation (client): a capability the client offers so a server can request additional information from the user through the client, used to recover from missing inputs.
How Tool Calls Work: Discovery, Invocation, and the JSON-RPC Wire Format
Model Context Protocol handles tool execution through a two-step JSON-RPC exchange: the client sends a tools/list request to discover what tools a server offers, then issues a tools/call request to invoke a specific one. The server tools specification spells the contract out, tools in MCP are designed to be model-controlled, meaning the language model can discover and invoke tools automatically based on its contextual understanding and the user's prompts (MCP Server Tools Specification 2025-11-25). Any server that supports tools must declare the tools capability during negotiation, otherwise the client refuses to issue tools/list at all. Tools themselves can interact with external systems such as databases, APIs, and computations, the same specification confirms, so a single server can wrap a Postgres connection, a REST API, or a local calculator behind one declared interface. JSON-RPC is the wire format under all of this. Every request is a JSON object with a method name, parameters, and an identifier; every response is matched back to its request by that identifier. The choice of JSON-RPC over a bespoke binary protocol is deliberate: the schema is published in TypeScript first and made available as JSON Schema as well for wider compatibility (GitHub, modelcontextprotocol repository). The contrast with proprietary function calling is sharp. OpenAI documents function calling and tool use as features inside its own API surface (OpenAI Developer Platform, Tools guide), and that pattern works only against OpenAI's models. MCP standardizes the equivalent surface so any host can drive the same server.
- Initialize: the MCP client opens a session and exchanges capability declarations with the server, with version negotiation completed in the same handshake.
- tools/list: the client requests the catalog of available tools, each described by a name, a JSON Schema for arguments, and a human-readable summary.
- Model selects: the host hands the catalog to the language model, which decides whether and which tool to call based on context.
- tools/call: the client issues the invocation with structured arguments, the server executes, and a JSON-RPC response carries the result back.
- Return to model: the host feeds the result back into the language model so it can incorporate the answer into its next response.
Transport Mechanisms and Version Negotiation
Model Context Protocol is transport-agnostic by design, supporting both stdio for local process communication and Streamable HTTP for remote service connections, with version negotiation handled at session initialization. The official versioning documentation defines the rules: MCP uses string-based version identifiers in YYYY-MM-DD format to indicate the last date backwards-incompatible changes were made, and the current protocol version is 2025-11-25 (MCP Versioning). Clients and servers may support multiple protocol versions simultaneously, but they must agree on a single version to use for the session. If no compatible version exists, the protocol specifies graceful error handling so the client can terminate the connection cleanly. For HTTP transports, a 2025-06-18 changelog entry requires the negotiated protocol version to be specified via the MCP-Protocol-Version header in subsequent HTTP requests (MCP 2025-06-18 Changelog), so the server can reject mismatched calls instead of guessing. The stdio transport, by contrast, runs the MCP server as a child process and pipes JSON-RPC over standard input and standard output, which is the right shape for desktop hosts launching a local filesystem or database server. A 2026-07-28 release candidate documents larger changes to the transport layer, including a stateless protocol layer, the removal of the initialize/initialized handshake, the removal of the Mcp-Session-Id header, and new Mcp-Method and Mcp-Name headers on Streamable HTTP (MCP 2026-07-28 Release Candidate); it is a release candidate, not the production version, and host and server adoption lags the spec.
| Aspect | stdio transport | Streamable HTTP transport |
|---|---|---|
| Process model | Server runs as a local child process of the host | Server runs as a separate remote service over HTTP |
| Message channel | JSON-RPC over standard input and standard output | JSON-RPC over HTTP requests and streaming responses |
| Typical use | Desktop hosts running local filesystem, database, or developer tools | Hosted services, multi-user backends, shared enterprise integrations |
| Version header | Negotiated once at session start | MCP-Protocol-Version sent on every HTTP request per the 2025-06-18 changelog |
| Session state | Stateful, tied to the child process lifetime | Stateful in 2025-11-25; stateless layer described in the 2026-07-28 release candidate |
Security, Consent, and Trust in MCP Deployments
Model Context Protocol places security responsibility on the host application, which must obtain user consent before exposing any server capability to the language model. The 2025-11-25 specification treats this as a design property of the protocol rather than an optional safety layer: tools are model-controlled by design, but the host is the gatekeeper that decides which servers are connected, which tools are surfaced to the model, and whether each tool call requires per-call confirmation (MCP Specification 2025-11-25). That split matters because the AI agent does not call external systems on its own authority. The MCP server holds the credentials to the database or the API, the MCP client mediates the call, and the host's consent UI is what authorizes that mediation. For sensitive operations the host can require explicit user approval before each invocation, and the elicitation capability gives the server a clean way to ask for a missing parameter rather than fail silently. The model that this resembles most is retrieval-augmented generation, where external context is fetched into the prompt rather than baked into the model weights; see how retrieval-augmented generation connects AI models to external knowledge for the parallel pattern.
- User consent at the host: the host application gates which MCP servers are installed and whether the user has approved each tool's use.
- Tool safety per call: a host can require an explicit confirmation dialog before any tools/call invocation that touches external state.
- Credential isolation: API keys and database secrets live with the MCP server, never inside the language model's prompt or the host's transcript.
- Data privacy on read: resources flow through the host, which can redact or refuse them before they reach the language model.
- Capability declaration: a server only exposes what it declares during negotiation, so the host knows in advance what the AI agent can do.
Building with MCP: SDKs, Ecosystem, and What to Adopt First
Model Context Protocol ships official SDKs for TypeScript and Python, both maintained in the modelcontextprotocol GitHub organization, giving developers a concrete starting point for building compliant servers and clients. The repository README confirms the structural detail behind those SDKs: the schema is defined in TypeScript first and made available as JSON Schema as well, for wider compatibility (GitHub, modelcontextprotocol repository). That ordering matters in practice. The TypeScript SDK is the closest thing to a reference implementation, the Python SDK closely tracks it, and SDKs in several other languages exist; check the modelcontextprotocol GitHub organization for the current list. A first MCP server is typically smaller than a first REST integration: declare a tool, write the function body, declare the tools capability during initialization, and a host like Claude or ChatGPT can call it. The protocol's interoperability story is what makes the integrate-once value real, the same server you write today against Claude works tomorrow against any host that adopts the open standard, and the same is true in reverse for clients. Compared with proprietary function calling, the trade is broader reach for the cost of speaking JSON-RPC and honoring capability negotiation, which the SDKs handle on the developer's behalf. For a host integrating one or two systems, the lift is small; for a vendor selling an enterprise connector, the addressable surface is every compliant AI agent, not one model provider.
- Pick an SDK: TypeScript SDK for the closest match to the reference schema, Python SDK for data-science and back-office integrations.
- Model a tool: define each tool with a JSON Schema for its arguments and a clear human-readable description, the same description the language model will read.
- Declare capabilities: set the tools capability (and resources or prompts if you publish them) so the MCP client knows what to ask for during negotiation.
- Choose a transport: stdio for local desktop hosts, Streamable HTTP for hosted multi-user services, governed by the MCP-Protocol-Version header.
- Test against a real host: point Claude Desktop or another compliant host at your server and confirm tools/list and tools/call round-trip with the model.
References
- Model Context Protocol Specification 2025-11-25
- Model Context Protocol Server Tools Specification 2025-11-25
- Model Context Protocol Versioning
- Model Context Protocol 2025-06-18 Changelog
- GitHub, modelcontextprotocol repository
- Anthropic, Introducing the Model Context Protocol
- OpenAI Developer Platform, Tools guide
- Model Context Protocol 2026-07-28 Release Candidate
Further reading
Frequently Asked Questions
What is the difference between an MCP server and an MCP client?
An MCP server is a service that exposes capabilities such as tools, resources, and prompts to the AI application. An MCP client is the connector embedded inside the host application that manages the connection to one specific server. The host application (for example, Claude or ChatGPT) may run multiple clients simultaneously, each connected to a different server.
Does Model Context Protocol require Anthropic's Claude to work?
MCP works with any AI application that implements the open standard, not only Claude. The official site names Claude and ChatGPT as examples of host applications that can connect to MCP servers, and the specification is published as an open-source standard that any developer can implement.
What happens if an MCP client and server support different protocol versions?
Version negotiation occurs during the initialization phase, and both parties must agree on a single version to use for the session. If no compatible version can be found, the protocol specifies graceful error handling so the client can terminate the connection cleanly without leaving the host application in an undefined state.
What can an MCP tool actually do?
An MCP tool is a declared function that the language model can discover and invoke automatically based on context and user prompts. According to the official specification, tools can query databases, call external APIs, perform computations, or interact with any other system the server exposes, provided the host application has obtained the necessary user consent.
Is Model Context Protocol the same as function calling or tool use in an AI API?
MCP is a transport-level open standard for connecting AI applications to external servers, not a single-API feature. Standard function calling or tool use is a capability defined within one provider's API; MCP provides the interoperability layer so that a tool server built once can be connected to any compliant AI host, regardless of the underlying model provider.









