New to Rust? Grab our free Rust for Beginners eBook Get it free →
Model Context Protocol (MCP): What It Does

An AI-enabled editor may need issue details from a tracker as well as information from a code repository. Model Context Protocol (MCP) gives AI applications a shared way to connect to external data and tools.
This article explains what MCP does and walks through how a host connects to a server and uses its capabilities.
TL;DR
Model Context Protocol (MCP) is an open standard that lets AI applications connect to external data and tools through a shared interface.
- A host is the AI application, a client connects that host to a server, and the server offers capabilities.
- Servers can expose resources, tools and prompts.
- MCP standardizes the exchange. It does not choose the model’s answer or grant safe permissions by itself.
What Is Model Context Protocol (MCP)?
MCP gives AI applications a common way to connect to services. The application, called a host, uses a client to communicate with each server.
Without a shared protocol, each application may need its own connector for every service. A server adapts one service to the messages its clients understand.
Teams still maintain each server and decide which credentials and operations it may use.
Think of a development environment that needs issue details from a tracker and repository information from GitHub. The host can connect to separate servers that expose those capabilities. The host decides how returned data fits its conversation or workflow.
MCP messages use JSON-RPC. Its data layer defines requests and capabilities, and a transport moves messages between participants.
Anthropic introduced MCP in 2024. The project is now maintained as an open protocol. The official architecture documentation says MCP handles context exchange, not how an AI application manages its model.
How Does an MCP Connection Work Step by Step?
The host connects its client to a server, then the two sides initialize and discover what each supports. The host can request data or call a tool after that exchange.
Step 1: The host creates a client connection
The host is the AI application a person interacts with, such as an AI-enabled editor. Its MCP client manages a connection to a server and keeps that protocol work out of the model-facing application logic.
A local server can run as a process on the same machine and communicate over standard input and output. A remote server can run elsewhere and communicate over HTTP, so check network and authentication controls for that deployment.
Step 2: The client and server discover capabilities
Initialization checks protocol compatibility and shares supported features in both directions. The client can then present only the server functions available to that host.
A server may offer resources without tools, so capability discovery helps the host avoid presenting unsupported operations.
The exact discovery messages depend on the protocol version. Consult the matching MCP specification when implementing a client or server.
Step 3: The server exposes resources, tools or prompts
A resource supplies data, a tool performs a callable operation, and a prompt provides a reusable interaction template. A repository server might expose project documentation, issue search, and a bug-report template.
These features have different jobs. A repository server could provide project documentation as a resource. It could also offer a tool to search issues and a prompt for preparing a bug report.
The server defines available functions, while the host determines how they are presented to the person using the application.
Keep read access separate from operations that change state, and apply the server authorization policy to both.
A tool schema describes its inputs, not the safety of its implementation. Review the server before connecting a sensitive system.
Step 4: The host routes a request and returns the result
For an issue search, the model can select a discovered tool and provide structured arguments. The host’s client sends them to the server, which queries the tracker and returns results. The host passes those results to the model to form a response.
The host mediates each request, so the model does not connect directly to the service. A server may return an error or ask for user input when the client supports it. Before a consequential action, the host should show what the tool will do.
Common MCP Limits and What to Do Next
Choose an integration boundary based on who needs the capability and how often it changes. The table compares the trade-offs that matter when selecting one.
MCP and an API solve different layers of the problem
An API defines how software calls a service. MCP lets an AI host discover tools that may call that API. A direct call suits one fixed operation, while shared discovery can justify an MCP server for several compatible hosts.
MCP and RAG can work together
RAG retrieves relevant passages from an indexed collection, while MCP connects an AI host to server capabilities. A workflow can use both when it needs document search and access to live services.
Choose MCP, APIs and RAG by task
Use an API for a fixed service call. MCP provides discovery for AI hosts, while retrieval-augmented generation (RAG) searches indexed documents. A workflow can pair RAG with MCP when it needs both documents and live actions.
Review server code and tool descriptions before use because a server may expose sensitive data or perform consequential actions. For a team handbook plus live issue lookup, pair indexed document search with an MCP tracker tool. A single fixed service call can use the API directly instead.
Grant only task-specific access and require approval for side effects. The official MCP security guidance covers confused-deputy behavior and excessive access.
| Case | Symptom | Fix |
|---|---|---|
| MCP versus API | One application calls one fixed service operation | Use the direct API for one fixed call. MCP suits compatible hosts that need shared discovery or tools |
| MCP with RAG | Indexed documents and live service data are both needed | Use RAG for document retrieval and MCP for live resources or actions |
| Server access | A capability requests broader access than the task needs | Restrict credentials and permissions, then verify host approval behavior |
Check the host documentation and server declarations before relying on a feature. Support varies by host and protocol version.
| Situation | What to check | Next move |
|---|---|---|
| A server feature is missing | Declared capabilities and protocol version | Use a supported feature or another server |
| A tool call fails | Input schema, permissions and server response | Correct arguments or narrow the access |
| A connection is unavailable | Transport configuration and authentication | Check local process or remote service access |
Pick one concrete task first, such as reading issue details. The server should expose only the data and actions that task needs.
Before enabling tools that change state, test with a non-sensitive resource. Confirm accepted arguments and the host approval shown for consequential calls.
Because clients and servers come from different projects, verify the exact version and feature pairing.
Use the official introduction and the specification version your implementation targets. Keep the first server narrow and document its permissions.
Conclusion: MCP Standardizes the Connection
MCP is one option for connecting an AI application to external services. Its value depends on whether its capabilities fit the systems and clients you use.
Review the implementation and permissions before connecting a server. For a related look at workflows that coordinate tools, see Understanding Agentic Workflows. For the text units models process, read What Are Tokens in ChatGPT?
FAQ
These answers cover the basic terms readers often ask about after learning how MCP connects an AI application to a server.
What is Model Context Protocol used for?
MCP gives AI applications a standard way to discover and use data and capabilities exposed by external servers.
What is an MCP server?
An MCP server is a program that offers capabilities such as resources, tools or prompts to an MCP client. It can run locally or remotely.
Who created MCP?
Anthropic introduced MCP in 2024. The launch announcement credits David Soria Parra and Justin Spahr-Summers as its creators.
Does MCP replace APIs?
No. MCP standardizes how AI applications discover and use capabilities, and an MCP server may call an API behind that interface.




