Short answer
An MCP server is a small program that exposes tools and data to AI applications through the Model Context Protocol (MCP), an open standard Anthropic introduced in November 2024. Build the server once, and any MCP-compatible AI app can discover and call what it offers, without a custom integration for each app.
What problem does MCP solve?
Before MCP, connecting an AI app to a database, an internal API or a file system meant writing a separate integration for each app and each model provider. Ten apps and ten data sources could mean a hundred integrations.
MCP replaces that with one shared protocol. A data source is wrapped once as an MCP server, and every app that speaks MCP can use it. It is often compared to USB-C: one connector instead of a drawer of cables.
How does an MCP server work?
MCP has three roles. The host is the AI application a person uses, such as a desktop assistant or an IDE. Inside it, a client keeps a connection to each server. The server is the program that offers capabilities. They exchange JSON-RPC 2.0 messages, over standard input and output for a local server or over HTTP for a remote one.
- Tools: functions the model can call, such as looking up a train arrival or creating a ticket.
- Resources: data the application can read, such as files, records or documents.
- Prompts: reusable prompt templates the server offers to the user.
How is it different from function calling or a REST API?
Function calling is how one model in one app calls a function you defined for that app. MCP standardizes how those functions are described, discovered and called, so the same server works across apps and model providers.
A REST API is built for programs that already know its endpoints. An MCP server describes its tools in a form a model can read and choose from at run time. Many MCP servers are thin wrappers around an existing REST API.
What should you watch out for?
An MCP server gives a model the ability to act, so it widens what can go wrong when the model is misled. Tool descriptions and returned data are read by the model, which makes them a path for prompt injection.
- Give each server the least privilege it needs, and keep secrets out of what the model can read.
- Require a person's approval for tools that change or delete things.
- Install third-party servers with the same care as any dependency that runs code.
When should you build one?
Build an MCP server when you want AI assistants, your own or your users', to work with a system you own: an internal API, a dataset or a service. If only one app will ever call the function, plain function calling may be enough.