Claude Code
What is MCP? The Model Context Protocol for developers
What MCP is and how it works: hosts, clients and servers, tools, resources and prompts, stdio and HTTP, and what the stateless 2026-07-28 revision changed.
MCP, the Model Context Protocol, is an open protocol that lets AI applications use external tools and data through one standard interface. An application such as Claude Code (the host) connects to MCP servers; each server exposes tools the model can call, resources it can read and prompts the user can pick. Messages are JSON-RPC 2.0, carried over stdio for local servers or HTTP for remote ones. Write a server once and every compatible client can use it.
Why MCP exists
Before MCP, every AI application had its own plugin format. A team that wanted its database, its ticket tracker or its design tool available to a model wrote one integration per application, and each one broke on its own schedule.
MCP takes its idea from the Language Server Protocol, which did the same for programming languages and editors: define the conversation once, and any editor can talk to any language server. The MCP specification describes itself in those terms. For a developer, the payoff is simple: a server that exposes your system works in Claude Code, Claude Desktop and every other compatible client.
The components of an MCP system
| Component | What it is | Example |
|---|---|---|
| Host | The AI application the user works in, which starts connections | Claude Code, Claude Desktop |
| Client | A connector inside the host, one per server | Claude Code’s connection to a server named github |
| Server | A program or service that exposes features | A server for your database, your issue tracker, a design canvas |
The host keeps control: it decides which servers to connect, asks the user before running tools, and passes results to the model. The specification puts consent at the center: users must understand and approve what data is shared and which tools run, and tool descriptions from a server you do not trust should be treated as untrusted.
What a server offers: tools, resources and prompts
Tools are functions the model can call. Each has a name, a description written for the model, and a JSON Schema for its arguments. A tool might be search_issues, run_query or create_frame. Tools are the feature most servers are built for, and the one that needs the most care, because a tool call is code that runs.
Resources are context the model or the user can read: files, records, documents, each with a URI.
Prompts are templates the user picks, such as a ready-made “review this pull request” workflow.
On the client side, the current revision keeps elicitation: a way for a server to ask the user for missing information through the host. The older client features, roots and sampling, are deprecated.
How the messages travel
Two standard transports carry the same JSON-RPC messages:
- stdio: the host launches the server as a subprocess and they exchange newline-delimited JSON over standard input and output. Typical for local servers that read your files.
- Streamable HTTP: every message is an HTTP POST to one endpoint, and the reply is a JSON object or a short-lived event stream. Typical for remote servers, with OAuth 2.1 for authorization.
The older HTTP+SSE transport is deprecated. Custom transports are allowed as long as they keep the message format.
What the 2026-07-28 revision changed
The changelog of the 2026-07-28 revision is the biggest change since MCP was published. In short:
- MCP is stateless. The
initializehandshake is gone. Every request carries its protocol version and client capabilities in_meta, and protocol-level sessions (theMcp-Session-Idheader) are removed. A server that needs state across calls passes its own handle as an ordinary tool argument. server/discoveris required: a server advertises its versions, capabilities and identity, and a client may call it first.- Standard HTTP headers
Mcp-MethodandMcp-Namemirror the request, so gateways can route without reading the body. - Servers no longer send requests to clients. When a server needs input, it returns an
input_requiredresult and the client retries with the answers. - Tasks moved to an extension, and roots, sampling and logging are deprecated.
Servers written for earlier revisions still work: clients detect the older, handshake-based era and fall back.
Add an MCP server to Claude Code
In Claude Code, one command adds a remote server:
claude mcp add --transport http my-server https://example.com/mcp
A server is loaded when a session starts, so restart Claude Code (or resume with claude --continue) before your agent can use the new tools. Scope, keys, checking status and removal are covered step by step in Claude Code MCP server setup.
Before you add one, decide what the server may do. A server receives what the model sends it, and its tool results flow back into the conversation, which is how prompt injection reaches agent tools. Prefer servers that use scoped keys, one project or resource per key, over keys that open a whole account.
When MCP is the right choice
- Use MCP when several AI clients should reach the same system, or when the model should discover the tools itself.
- Plain HTTP is enough when one agent calls a known API once in a session: it can call
curlwith a key, no configuration change needed. Many services offer both, with the same tools behind them. - An instructions file such as llms.txt tells an agent which of the two to use, and how.
agentappbuilder is an example of both: a canvas where Claude Code draws your app’s screens, reachable through an MCP server at app.agentappbuilder.com/mcp and through a plain HTTP mirror of the same tools, so your agent can start in the current session without restarting.
Frequently asked questions
What does MCP stand for?
Model Context Protocol: an open protocol, based on JSON-RPC 2.0, that standardizes how AI applications connect to external tools and data. A server written once works with every compatible client, such as Claude Code or Claude Desktop.
What are the components of an MCP system?
A host (the AI application, such as Claude Code), one client per connection inside the host, and servers that expose features. Servers offer tools the model can call, resources it can read, and prompts the user can pick.
What is the difference between an MCP server and an API?
An MCP server usually wraps an API, but describes it in a form a model can discover and call: each tool has a name, a description and a JSON Schema for its arguments. The client lists the tools and the model decides when to call them.
Is MCP stateless?
Since the 2026-07-28 revision, yes. The initialize handshake and protocol-level sessions are gone: every request carries its protocol version and client capabilities, and servers advertise theirs through server/discover.
agentappbuilder
See your screens before Claude Code changes them
Send Claude Code one sentence. It draws every screen state on a canvas you can open, and codes only the version you pick.

Tell Claude Code:
Connect this project to agentappbuilder.com and show me its screens.
Prototype a new feature with Claude Code before it codesHow it works, step by step