MCP, the Model Context Protocol, is an open standard for connecting AI applications to the tools and data they need. It is what lets an assistant go from telling you how to order something to placing the order itself.
Why AI needed a connection
A language model on its own produces text. Ask a chat assistant to order tuna and, with no tools, the best it can do is give you instructions: open the shop's site, search the menu, add to cart, check out. You do the clicking and report back so the model can tell you the next step. Every step goes through you.
The fix is to give the model tools: functions the application runs on its behalf, such as 'search the menu' or 'add to cart'. Applications did this before MCP, but each one wired up its own integrations. A chat app, an IDE and a desktop assistant that all wanted to use the same shop each needed custom code for it, and the shop had no single way to offer itself to all of them. Many AI apps times many services adds up to a lot of one-off glue.
MCP replaces that glue with one protocol. A service describes its tools once, in a standard format, and any AI application that speaks MCP can use them. Anthropic released it as an open standard in November 2024. The idea comes from the Language Server Protocol, which did the same for code editors: one language server works in every editor that speaks LSP.
Hosts, clients and servers
MCP has three roles.
- The host is the AI application you use: a desktop chat app, an IDE, a coding agent in your terminal. It runs the conversation with the model and decides what the model may do.
- A client lives inside the host. The host creates one client for each server it connects to, and each client keeps its own connection.
- A server is a program that offers capabilities: a shop's ordering tools, your files, a database, an issue tracker.
The model is not one of the three. It never talks to a server directly. It sees a list of tools, and when it wants one, it writes a request that the host carries out. That split matters when we get to safety.
A server can run locally or remotely. A local server is a process the host starts on your machine and talks to over standard input and output, the stdio transport; a server that reads your files is usually one of these. A remote server runs somewhere else and is reached over HTTP, the Streamable HTTP transport, usually behind a login. Either way the messages are the same: JSON-RPC 2.0, a small format for requests and responses written as JSON.
Wondering how this was made? How we make these