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.

BeginnerIntermediateExpert · 12 min read · Last updated:

In short

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.

Beginner Why it exists and who does what

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.

AI applicationsChat app, code editor, internal agent
MCPCommon messages and rules
ServersCode, tickets, database, documents
Each side is written to the protocol, not to every partner.

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

RoleWhat it isResponsibilities
HostThe AI application the person usesRuns the model, manages clients, asks for consent, decides what reaches the model
ClientA component in the host that speaks MCP to one serverDiscovers capabilities, sends requests, returns results
ServerA program that exposes capabilitiesDescribes what it offers, validates requests, enforces access, does the work
Host applicationModel, user interface, consent and policy
Client ALocal connection
Client BRemote connection
Files serverRuns on your computer
Tickets serverRuns as a web service

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.

FeatureWhat it isControlled byExample
ToolsFunctions that can be called, possibly changing thingsThe model, within the host's rulescreate_ticket, search_orders
ResourcesReadable data identified by a URIThe application, which decides what to includeA policy file, a database schema
PromptsReusable message templates with argumentsThe 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 itemTypeWhat the person experiences
search_books(query)Tool"Do you have anything about agents?" leads the assistant to search
reserve_book(book_id)ToolThe assistant asks to reserve; the host can request approval
library://rulesResourceThe lending rules can be attached to the conversation
recommend(topic)PromptA 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.

Intermediate Transports and messages

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.

AspectstdioStreamable HTTP
Where the server runsA subprocess on the same machineA web service, local or remote
How messages moveLines on standard input and outputHTTP POST to one endpoint; replies as JSON or a server-sent event stream
Who starts itThe client launches the programIt is already running
CredentialsUsually from the environmentOAuth-based authorization
Typical useLocal files, developer toolsShared team and company services
Main cautionThe program runs with your rights; logs must go to standard errorAuthenticate 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.

DiscoverVersions and features
ListTools with schemas
ChooseModel requests a tool; host checks
CallServer validates and runs
UseResult enters the context

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.

AreaChange
Connection setupThe initialize handshake and session id are retired; each request states its version, client identity and capabilities. Discovery is optional.
Server asking the clientHandled by returning "input required" and having the client retry with the answers
CachingList and resource-read results say how long they stay fresh and who may cache them
HTTP routingHeaders name the method and, where relevant, the tool or resource
NotificationsChange notices are requested through a subscription
DeprecationsRoots, sampling and logging features, with at least twelve months' notice
ExtensionsOptional 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:

CallClient reaches the server without a token
ChallengeServer points to its authorization service
ConsentUser signs in and approves scopes
TokenIssued for this server
RequestsServer validates every one

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.

Expert Trust, design and limits

What MCP does not guarantee

A server is third-party code and third-party text
  • 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

SituationSuggestion
Several AI applications need the same systemA server pays off quickly
You want users to plug integrations into a product you shipSupport MCP as a host
One application, two private functionsPlain function calling is simpler
Ordinary service-to-service traffic with fixed logicUse a normal API
Independent agents that negotiate tasks with each otherLook 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:

QuestionGood 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.

Expert tip

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.

  1. Configure. The user or an administrator adds a server: a command for a local one, an address for a remote one.
  2. Consent. The host explains what will run or be contacted. For a remote server, the user may sign in.
  3. Connect. The client starts the process or reaches the endpoint, and agrees a protocol revision.
  4. Discover. It lists tools, resources and prompts, caching them for as long as the server allows.
  5. Use. The host offers selected tools to the model and runs approved calls.
  6. Update. When lists change, the host refreshes them. A changed description deserves a fresh look.
  7. Disconnect. Local processes are closed; access tokens are revoked when no longer needed.

Terms at a glance

TermMeaning
CapabilityA feature a client or server declares it supports
URIThe address that identifies a resource
Input schemaJSON Schema describing a tool's arguments
Structured contentMachine-readable part of a tool result
ExtensionAn 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

Next steps