What is an MCP server?
Checked on 28 Nov 2026
Definition
The Model Context Protocol (MCP) is an open protocol that standardizes how an LLM application connects to external data sources and tools. Messages use JSON-RPC 2.0 and flow between three roles:
- Host: the LLM application that initiates connections (IDE, chat assistant, agent).
- Client: the connector inside the host that talks to one server.
- Server: the service that provides context and capabilities.
An MCP server is therefore a program, local or remote, that exposes features to an MCP client.
The three server primitives
The specification defines three kinds of features a server can offer:
| Primitive | Role per the specification | Main methods |
|---|---|---|
| Tools | Functions for the AI model to execute | tools/list, tools/call |
| Resources | Context and data, for the user or the model | resources/list, resources/read |
| Prompts | Templated messages and workflows for users | prompts/list, prompts/get |
On the client side, revision 2026-07-28 lists elicitation (asking the user for additional information). Roots, Sampling and Logging are marked Deprecated in that revision.
Discovery: initialize and server/discover
Behavior depends on the protocol revision.
- Up to 2025-11-25 (legacy revisions): a session starts with an
initialize/notifications/initializedhandshake that negotiates version and capabilities. - From 2026-07-28 (the current revision): the handshake is removed. Every request carries its protocol version and the client's capabilities in
_meta(io.modelcontextprotocol/protocolVersion,io.modelcontextprotocol/clientCapabilities). Servers must implementserver/discover, which returns supported versions, capabilities and server identity. Calling it is optional for clients.
A server that does not support the requested version answers with UnsupportedProtocolVersionError (code -32022) listing the versions it accepts. A server may support both eras at once (dual-era).
Example: listing tools
A tools/list request under revision 2026-07-28 (example from the specification):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" },
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}
The response holds a tools array. Each tool has a name (unique identifier) and optionally title, description, icons, an inputSchema (JSON Schema, required), an outputSchema and annotations. Results now carry a resultType field ("complete" or "input_required") plus ttlMs and cacheScope for caching. Pagination uses cursor / nextCursor.
A server that declares the tools capability must answer tools/list; the list must not vary per connection, but may vary with the authorization presented.
Transports
Two standard transports are defined:
- stdio: the client launches the server as a subprocess; newline-delimited JSON-RPC messages over
stdin/stdout. - Streamable HTTP: each message is an HTTP POST to a single endpoint; the reply is a JSON object or an SSE stream scoped to that request.
The older HTTP+SSE transport (revision 2024-11-05) has been deprecated since 2025-03-26. Details, and OAuth authorization for HTTP servers, are covered in Remote or local MCP.
Security
The specification stresses that tools represent arbitrary code execution: hosts must obtain explicit user consent before invoking a tool, and tool annotations should be treated as untrusted unless they come from a trusted server.
To compare existing servers, see the MCP catalog and How to choose.