0% completed
The Integration Problem MCP Solves
On This Page
The Running Example
How an Assistant Uses Another Product
The Cost of Separate Integrations
One Protocol on Both Sides
What MCP Defines
What MCP Does Not Define
When a Protocol Is Not Needed
Key Takeaways
Practice Questions
An AI assistant is far more useful when it can work with other software. It can then read a calendar, search a codebase, or file an expense. Each of those abilities needs a connection between the assistant and another product, and somebody has to build that connection.
Suppose 4 assistants each need to work with 6 products. If every connection is built separately, that is 4 times 6, or 24 connections to write and maintain. This lesson explains why that number grows so quickly, how the Model Context Protocol (MCP) reduces it, and what the protocol does and does not define.
The Running Example
Costbook is an expense reporting service that companies buy for their employees, and it appears throughout this course. Employees submit expenses, managers approve them, and finance staff export reports. Costbook already has a web application and an HTTP API.
Customers have started to ask the Costbook team whether the AI assistant they already use can work with Costbook. An employee wants to type one sentence:
Add the taxi receipt from Tuesday, 42 dollars, to my Berlin trip report.
To do that, the assistant must find the right report and create an expense on it.
How an Assistant Uses Another Product
A language model only reads text and writes text, so it cannot create an expense by itself. The program around the model does that work. This course calls that program the AI application: a chat assistant, or a code editor with an assistant built in.
A tool is a function that an AI application offers to its model, with a name, a description, and a list of inputs. The model cannot run a tool. It can only write a request to call one, such as "call submit_expense with an amount of 42". The application runs the function and returns the result to the model as text.
For the taxi receipt, the application needs code that knows three things about Costbook: which tools exist, how to call the Costbook API for each one, and how to prove who the user is. That code is called an integration.
Notice that the model never contacts Costbook. It writes a request, and the integration makes the call.
The Cost of Separate Integrations
Before a shared protocol existed, an integration worked with one AI application only. Each application had its own format for describing tools, its own way of calling them, and its own way of signing in the user. An integration written for one chat assistant could not be loaded into a code editor from another company.
Return to the count from the opening. Costbook's customers use 4 different AI applications, so the team must write 4 integrations for one product. The 5 other products that those customers use need the same work. The total is 4 applications times 6 products, or 24 integrations. Engineers often call this the M times N problem, because M applications and N products need M times N integrations.
Look at the left panel first. Every line is separate code that somebody must keep working. The count is only the first cost:
- Every change is repeated. When Costbook adds a currency field to an expense, the team updates 4 integrations written against 4 formats.
- Coverage is uneven. A team builds for the most popular application first, and users of the other applications wait.
- Security is decided 24 times. Each integration stores credentials and asks the user for permission in its own way, so each one is a separate place for a mistake.
- A new application starts with nothing. It must persuade every product team to build one more integration before its users can do real work.
One Protocol on Both Sides
A protocol is an agreed set of messages and rules that two programs use to communicate. HTTP is the protocol between a browser and a web server, which is why any browser can load any website.
The Model Context Protocol is an open standard that defines how an AI application and an outside program exchange tools, data, and results. Anthropic published it. AI applications from several vendors support it, including Claude, ChatGPT, Visual Studio Code, and Cursor.
With MCP, each side does its work once:
- The Costbook team writes one program, called an MCP server, that describes Costbook's tools and runs them when asked.
- Each AI application adds one piece of code, called an MCP client, that can talk to any MCP server.
Now look at the right panel of the diagram. The same 4 applications and 6 products need 4 clients plus 6 servers, which is 10 pieces of code. A fifth application adds 1 client and can use all 6 products at once.
| Separate integrations | With MCP | |
|---|---|---|
| <span style="white-space:nowrap">Total work</span> | 24 integrations | 4 clients and 6 servers |
| <span style="white-space:nowrap">Add a product</span> | 4 new integrations | 1 new server |
| <span style="white-space:nowrap">Add an application</span> | 6 new integrations | 1 new client |
| <span style="white-space:nowrap">Tool format</span> | A different one for each application | One for all |
| <span style="white-space:nowrap">A change in Costbook</span> | Repeated in 4 integrations | Made once, in the server |
The design is not new. The MCP specification says that it takes inspiration from the Language Server Protocol, which removed the need for a separate plugin for each pair of code editor and programming language.
What MCP Defines
MCP defines the exchange of messages between the application and the server, and nothing inside either one. It covers five things:
- The message format. Every message is a small JSON object with a fixed shape.
- Discovery. An application can ask a server what it offers, and the server answers with a list.
- Three kinds of things a server offers. Tools are functions the model can call, resources are data the application can read, and prompts are prepared requests that a person can choose.
- How messages travel. A server can run as a program on the user's own machine, or as a service reached over HTTP.
- Authorization. For a server on the network, the protocol defines how the application obtains the user's permission to act on that user's account.
Here is how the Costbook server describes one tool. Every application that supports MCP reads this same description, so the team writes it once.
{ "name": "submit_expense", "description": "Create one expense on an expense report.", "inputSchema": { "type": "object", "properties": { "report_id": { "type": "string" }, "amount": { "type": "number" }, "merchant": { "type": "string" } }, "required": ["report_id", "amount"] } }
The inputSchema field lists the inputs of the tool and their types, so the model knows what to send.
What MCP Does Not Define
The protocol leaves several decisions to the two sides, and most problems with real servers come from these decisions.
- The model. MCP never talks to a model. The application chooses the model and passes the tool descriptions to it.
- What the user sees. The application decides how to show a tool call and when to ask for approval.
- The quality of the tools. A server with confusing tool descriptions follows the protocol correctly and still works badly, because the model chooses the wrong tool.
- Whether a server deserves trust. A server is a program that somebody wrote. The protocol does not inspect what that program does with the user's data.
- The product's own rules. MCP does not replace the Costbook API. The server receives an MCP message and calls the same API that the web application uses.
Notice that the middle column contains only rules about communication. The decisions about models, screens, tool quality, and business rules stay in the outer columns.
When a Protocol Is Not Needed
A shared protocol is worth its cost when many applications must reach one product, or when the people who write the application do not own the product. When one team owns both sides and only one application is involved, a function defined directly in that application is simpler. That team has no M times N problem to solve.
Key Takeaways
- A model can only request a tool call. The AI application runs the tool, and the code that connects the application to a product is an integration.
- Without a shared protocol, M applications and N products need M times N integrations, and every change and every security decision is repeated in each one.
- MCP is an open standard for the exchange between an AI application and an outside program. Each product needs one server, and each application needs one client.
- MCP defines messages, discovery, the three kinds of things a server offers, how messages travel, and authorization. It does not define the model, the user interface, the quality of the tools, or whether a server deserves trust.
This lesson used "AI application", "client", and "server" loosely. The next lesson, Hosts, Clients, and Servers, gives each part its exact name and its exact job.
Practice Questions
1. A company uses 5 AI applications and 8 products. How many integrations does it need without a shared protocol, and how many pieces of code with MCP?
<details><summary>Show answer</summary>40 integrations without a shared protocol, and 13 pieces of code with MCP. The first number is 5 times 8. The second is 5 clients plus 8 servers.
</details>2. Costbook adds a required currency field to every expense. What must the Costbook team change with separate integrations, and what must it change with MCP?
<details><summary>Show answer</summary>With separate integrations, the team changes every integration; with MCP, it changes one server. Each integration describes the expense tool in a different format, so the field is added once for each application. The MCP server holds one description that every application reads.
</details>3. A teammate says: "After we build an MCP server, we can delete the Costbook API." Why is that wrong?
<details><summary>Show answer</summary>The server depends on the API. MCP defines how an AI application and the server communicate. The server still calls the Costbook API to create an expense, and the web application still uses that API too.
</details>4. A server follows every rule of the protocol, but the assistant often calls the wrong tool. Has MCP failed?
<details><summary>Show answer</summary>No, because MCP does not define the quality of the tools. The protocol delivers the tool descriptions to the application exactly as the server wrote them. If the names and descriptions are confusing, the model chooses badly, and the fix is in the server's tool design.
</details>Reading Progress
0%
On This Page
The Running Example
How an Assistant Uses Another Product
The Cost of Separate Integrations
One Protocol on Both Sides
What MCP Defines
What MCP Does Not Define
When a Protocol Is Not Needed
Key Takeaways
Practice Questions