An MCP server is a program that exposes capabilities such as functions, data and prompt templates to AI applications through the Model Context Protocol (MCP). “Server” names a role in the protocol, not a specific machine. It can run on a laptop next to the AI application or as a service on the web.
At a glance
- Publisher
- Anthropic, since 2025-12-09 at the Agentic AI Foundation (Linux Foundation)
- Connects
- AI applications with servers that provide tools, resources and prompts
- Status
- current MCP specification 2026-07-28
- Transport
- stdio (local servers), Streamable HTTP (remote servers)
- Specification
- MCP Specification
Last checked:
How does an MCP server work?
The AI application, called the host in MCP, opens one client connection per server. Through that connection it asks the server what it offers and requests what the model needs. The MCP documentation describes three building blocks:
- Tools are functions the model can call, such as a database query, an API request or a file edit.
- Resources are read-only data sources, such as file contents or database schemas. Each has a URI.
- Prompts are reusable instruction templates that a user invokes explicitly.
Clients discover these through list methods like tools/list and run a tool with tools/call. Local servers typically talk to the host over stdio. Remote servers use Streamable HTTP and can serve many clients, with OAuth as the recommended way to authenticate.
Example
A host calls a flight search tool on a travel server. The request is a JSON-RPC message, shortened here.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "searchFlights",
"arguments": { "origin": "NYC", "destination": "Barcelona", "date": "2026-06-15" }
}
}
The server returns the flight options as structured content, and the host passes them to the language model. The documentation notes that tools may require user consent before they run, for example through an approval dialog.
Well-known MCP servers
The project maintains reference servers in the modelcontextprotocol/servers repository on GitHub, including a file system server. Many services publish their own servers for tasks like code management, messaging or calendars.
Common mistakes
- Not checking inputs. According to the specification, servers must validate all tool inputs, enforce access controls, rate limit invocations and sanitize outputs.
- Reporting invalid input as a protocol error. Input errors such as a wrong date format belong in the tool result as a tool execution error with
isError: true, so the model can correct the request. - Unsuitable tool names. The specification calls for 1 to 128 characters from letters, digits, underscore, hyphen and dot, without spaces, unique within a server.
FAQ
What is the difference between MCP and an MCP server? MCP is the protocol. An MCP server is a program that speaks it and offers tools, resources or prompts.
What is the difference between an MCP server and an API? A web API is an interface for software in general. An MCP server wraps functions in a standard format that AI applications can discover and call. It can call regular APIs behind the scenes.
Sources
- Understanding MCP servers – modelcontextprotocol.io (spec version 2026-07-28)modelcontextprotocol.io
- Architecture overview – modelcontextprotocol.iomodelcontextprotocol.io
- MCP Reference Server Implementations – GitHubgithub.com
- WebMCP – Draft Community Group Report, W3C Web Machine Learning Community Groupwebmachinelearning.github.io
- Tools – MCP Specification (version 2026-07-28)modelcontextprotocol.io
Last updated: