What Is MCP? Hosts, Clients, Servers and Capabilities
One open protocol for connecting AI applications to tools and data, so each integration is written once.
The Model Context Protocol (MCP) is an open standard for connecting AI applications to external capabilities. An MCP server offers tools, data and reusable prompts. An MCP client inside an AI application (the host) discovers and uses them. Build a server once, and any compatible application can work with it.
What you will learn: the problem MCP solves, its three roles, what servers can offer, how messages travel, what changed in the 2026-07-28 revision and where MCP does not help.
Prerequisites: Agent Tools, Function Calling and Tool Registries.
The problem: every application times every system
Suppose three AI applications need to reach four systems: a code host, a ticket system, a database and a document store. Written separately, that is twelve integrations, each with its own tool descriptions, login handling and bugs. With a shared protocol, each application implements the client side once and each system gets one server: seven pieces instead of twelve. The gap widens as either number grows.
Anthropic introduced MCP in November 2024. In December 2025 it moved under the Linux Foundation's Agentic AI Foundation, and it is developed openly. The current specification revision at the time of writing is 2026-07-28.
Hosts, clients and servers
| Role | What it is | Responsibilities |
|---|---|---|
| Host | The AI application the person uses | Runs the model, manages clients, asks for consent, decides what reaches the model |
| Client | A component in the host that speaks MCP to one server | Discovers capabilities, sends requests, returns results |
| Server | A program that exposes capabilities | Describes what it offers, validates requests, enforces access, does the work |
The model does not speak MCP. The host turns the tools a server lists into the tool definitions its model understands, and turns the model's tool requests into MCP calls. This is why MCP works with different models: it sits between the application and the system, not between the model and its weights.
What a server can offer
Three core features cover most needs. The specification describes them by who is expected to control their use.
| Feature | What it is | Controlled by | Example |
|---|---|---|---|
| Tools | Functions that can be called, possibly changing things | The model, within the host's rules | create_ticket, search_orders |
| Resources | Readable data identified by a URI | The application, which decides what to include | A policy file, a database schema |
| Prompts | Reusable message templates with arguments | The user, often through a menu or command | "Review this pull request" |
Servers also support smaller conveniences, such as listing resource templates (patterns like orders://{id}), argument completion and notifications that a list has changed. Hosts differ in which features they surface, so check the hosts you care about.
Asking the user for more
Sometimes a server needs something in the middle of a request: a missing value or a confirmation. This is called elicitation. In the current revision the server answers with an "input required" result, the client gathers the answer and sends the request again with it. The host stays in charge of what is shown and shared.
A concrete server, feature by feature
The library server used in this site's tutorial shows all three features in a few lines each.
| Offered item | Type | What the person experiences |
|---|---|---|
search_books(query) | Tool | "Do you have anything about agents?" leads the assistant to search |
reserve_book(book_id) | Tool | The assistant asks to reserve; the host can request approval |
library://rules | Resource | The lending rules can be attached to the conversation |
recommend(topic) | Prompt | A ready-made command that starts a recommendation request |
Notice who decides in each row. The model may suggest tool calls. The application decides whether the rules are included. The person picks the prompt. Putting a capability in the right category gives the host a better chance of treating it well. Reading data that should always be present as a tool, for example, forces the model to remember to ask for it.
What a tool looks like on the wire
Listing tools returns, for each one, the information the model will see and the host will check. This entry was generated by the SDK from a Python function's type hints and docstring:
{"name": "reserve_book",
"description": "Reserve one available book by its id. Changes library records.",
"inputSchema": {"type": "object",
"properties": {"book_id": {"title": "Book Id", "type": "string"}},
"required": ["book_id"]},
"outputSchema": {"type": "object",
"properties": {"result": {"title": "Result", "type": "string"}},
"required": ["result"]}}
The description is the most influential text here. It is how the model learns that this call changes records. A vague description leads to wrong calls; a hostile one can try to steer the model, which is why hosts and users should read it.
Transports: how messages travel
MCP messages use JSON-RPC 2.0: requests with an id and a method, and responses with a result or an error. Two standard transports carry them.
| Aspect | stdio | Streamable HTTP |
|---|---|---|
| Where the server runs | A subprocess on the same machine | A web service, local or remote |
| How messages move | Lines on standard input and output | HTTP POST to one endpoint; replies as JSON or a server-sent event stream |
| Who starts it | The client launches the program | It is already running |
| Credentials | Usually from the environment | OAuth-based authorization |
| Typical use | Local files, developer tools | Shared team and company services |
| Main caution | The program runs with your rights; logs must go to standard error | Authenticate requests, validate the Origin header, protect the network path |
An older transport based on HTTP with server-sent events is deprecated. New work should use Streamable HTTP.
Real messages
The messages below were captured from a small lending-library server, built in Build an MCP Server and Client, using the official Python SDK. Long metadata is trimmed. First the client asks what the server supports:
{"jsonrpc": "2.0", "id": 1, "method": "server/discover",
"params": {"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": {"name": "mcp", "version": "0.1.0"},
"io.modelcontextprotocol/clientCapabilities": {}}}}
{"jsonrpc": "2.0", "id": 1, "result": {
"resultType": "complete",
"supportedVersions": ["2026-07-28"],
"capabilities": {"tools": {"listChanged": true},
"resources": {"listChanged": true, "subscribe": true},
"prompts": {"listChanged": true}},
"ttlMs": 0, "cacheScope": "private"}}
Then it calls a tool. The request carries the tool name and arguments, plus the same metadata (omitted here):
{"jsonrpc": "2.0", "id": 3, "method": "tools/call",
"params": {"name": "search_books", "arguments": {"query": "agents"}}}
{"jsonrpc": "2.0", "id": 3, "result": {
"resultType": "complete", "isError": false,
"content": [{"type": "text", "text": "{ \"id\": \"B1\", ... }"}],
"structuredContent": {"result": [
{"id": "B1", "title": "Designing Agents", "available": true}]}}}
A result has two views: content for the model to read and structuredContent for programs. A tool that fails for an expected reason returns isError: true with an explanation the model can use. A protocol problem, such as an unknown method, returns a JSON-RPC error instead.
What changed in 2026-07-28
If you learned MCP earlier, several habits need updating. The release announcement and the changelog give the full list.
| Area | Change |
|---|---|
| Connection setup | The initialize handshake and session id are retired; each request states its version, client identity and capabilities. Discovery is optional. |
| Server asking the client | Handled by returning "input required" and having the client retry with the answers |
| Caching | List and resource-read results say how long they stay fresh and who may cache them |
| HTTP routing | Headers name the method and, where relevant, the tool or resource |
| Notifications | Change notices are requested through a subscription |
| Deprecations | Roots, sampling and logging features, with at least twelve months' notice |
| Extensions | Optional additions such as long-running Tasks, interactive MCP Apps and enterprise-managed authorization |
Removing per-connection state means any server instance can answer any request, which makes ordinary load balancing much simpler. Clients and servers in the field will use different revisions for some time, so SDKs negotiate and fall back. Check which revision each side supports.
Authorization for remote servers
A remote server usually acts for a particular person, so it must know who is asking and what they allowed. The specification's authorization approach for HTTP builds on OAuth. In outline:
The 2026-07-28 revision tightens several points, including checking which issuer an authorization response came from, and it prefers client identity documents over dynamic client registration, which is now deprecated. Use a maintained identity platform and the SDK's support. Do not design your own token handling.
What MCP does not guarantee
- A local server runs with your operating-system rights. Install it as carefully as any program.
- Tool descriptions and results reach your model. A malicious or compromised server can hide instructions in them.
- A server's claim that a tool is read-only is a hint, not proof.
- A token meant for one service must not be passed through to another.
The protocol defines how to communicate and, for HTTP, how to authorize. Your host still decides what to allow, and your server still checks every request. Study MCP Authentication and Security before connecting anything that matters.
When to use MCP, and when not
| Situation | Suggestion |
|---|---|
| Several AI applications need the same system | A server pays off quickly |
| You want users to plug integrations into a product you ship | Support MCP as a host |
| One application, two private functions | Plain function calling is simpler |
| Ordinary service-to-service traffic with fixed logic | Use a normal API |
| Independent agents that negotiate tasks with each other | Look at A2A; see MCP vs A2A vs REST |
Adopting MCP in an organization
The protocol makes connecting easy, which means someone has to decide what may be connected. A modest starting process:
| Question | Good practice |
|---|---|
| Who owns this server? | A named team that patches it and answers incidents |
| Where does its code come from? | Reviewed source, pinned versions, no automatic updates into production |
| What can it read and change? | A written list, matched to the permissions it actually holds |
| Which hosts may use it? | An approved catalog, not personal copies of unknown servers |
| What is recorded? | Caller, tool, time and outcome, with sensitive values removed |
| How is it switched off? | A tested way to revoke access quickly |
Larger organizations often place a gateway between hosts and servers to apply these rules in one place; see MCP Gateways, Catalogs and Governance.
Design principles for servers
- Offer tools shaped around tasks, not a mirror of every API endpoint.
- Keep the list short. Every definition costs context in the host.
- Separate reading tools from changing tools so hosts can apply different rules.
- Return compact results with identifiers the next call can use.
- Authorize on the server using the real user's identity.
- Version carefully: names and descriptions are an interface models depend on.
The full treatment is in MCP Tool Design and MCP vs APIs and MCP Deployment and Production Readiness.
Working across versions
Revisions are named by date. A client and a server may support different ones, particularly while a large change such as the 2026-07-28 revision spreads. Good SDKs try the newer discovery request and fall back to the older handshake when a server does not understand it. As a builder, record which revisions you test against, keep the SDK current within a major version and try your server with each host your users rely on. As a user, treat "connects successfully" as the start of checking, since an older host may ignore newer features such as input requests or extensions without saying much.
An end-to-end picture
An illustrative support agent connects to a tickets server over HTTP. At start, the client lists tools and gets search_tickets and add_comment. A user asks about an open fault. The model requests a search; the host allows it, because it only reads. The server checks that this user may see those tickets and returns three summaries. The model drafts a comment and requests add_comment. The host shows the text to the user, who approves. The server records who asked, through which client, and adds the comment.
The same flow with a local server differs mainly in trust and credentials: the host starts a program on the user's machine, which reads its access key from the environment. There is no sign-in screen to remind anyone what was granted, so the configuration file itself deserves review.
Before adopting a server, list its tools and read the full descriptions yourself. Note which can change data, what credentials it needs and where it sends traffic. Five minutes here prevents most unpleasant surprises.
Life of a connection in a host
Knowing the sequence helps you find faults.
- Configure. The user or an administrator adds a server: a command for a local one, an address for a remote one.
- Consent. The host explains what will run or be contacted. For a remote server, the user may sign in.
- Connect. The client starts the process or reaches the endpoint, and agrees a protocol revision.
- Discover. It lists tools, resources and prompts, caching them for as long as the server allows.
- Use. The host offers selected tools to the model and runs approved calls.
- Update. When lists change, the host refreshes them. A changed description deserves a fresh look.
- Disconnect. Local processes are closed; access tokens are revoked when no longer needed.
Terms at a glance
| Term | Meaning |
|---|---|
| Capability | A feature a client or server declares it supports |
| URI | The address that identifies a resource |
| Input schema | JSON Schema describing a tool's arguments |
| Structured content | Machine-readable part of a tool result |
| Extension | An optional, separately versioned addition to the protocol |
Frequently asked questions
Does MCP replace APIs?
No. Most servers call ordinary APIs. MCP adds a standard way for AI applications to discover and use them.
Do I need a particular model?
No. The host adapts server tools to whatever model it uses, provided that model can request tool calls or the host handles it another way.
Which languages can I use?
Official SDKs exist for several languages, including Python and TypeScript.
Is MCP only for local tools?
No. Streamable HTTP serves remote, multi-user services, with authorization.
References and further reading
- MCP specification, revision 2026-07-28
- Changelog for 2026-07-28
- Release announcement (MCP blog)
- JSON-RPC 2.0 specification
Next steps
Build an MCP Server and Client
Write and test your own.
MCP Messages, Transports and Advanced Features
Messages and advanced features.
MCP Authentication and Security
Threats and defenses.