DEV Community

Cover image for Model Context Protocol (MCP) Part 1: Why It Exists and What It Really Is
Nishant Gaurav
Nishant Gaurav

Posted on

Model Context Protocol (MCP) Part 1: Why It Exists and What It Really Is

If you have used Claude Code, Cursor, or Codex, you have already used MCP, because these tools rely on it behind the scenes. If you plan to build any AI application, MCP is worth knowing, since it is used in many production systems today.

This is a two part series. Part 1 (this article) explains the problem MCP solves, what the idea is, what the name means, and why it is worth using. Part 2 covers the architecture, how a request flows through it, stateful versus stateless MCP, and who builds MCP servers.

Two things run through both parts so that everything stays concrete:

  • A running example: CampusBuddy, an AI assistant app that helps college students.
  • An everyday comparison: UPI, the payment system most of us use daily. In Part 2, a hospital is used to explain the moving parts.

Each topic ends with a "Remember for the test" box, and the article finishes with common confusions and practice questions with answers.


Part A: The Problem MCP Solves

MCP was introduced by Anthropic in 2024. To see what problem it solves, imagine you are on a small team building CampusBuddy, an AI assistant for students in your college.

Every AI application has two major parts:

  • The development part: your own application code.
  • An LLM that does the thinking. This could be GPT, Gemini, Claude, or another model.

What the Assistant Has to Do

A student opens CampusBuddy and asks: "What classes do I have tomorrow?"

You send the question to the LLM. The LLM is good at language and reasoning, but it does not know your college's timetable. That information sits in a database such as MySQL or PostgreSQL. So the LLM needs a tool to look it up.

Next the student says: "Pay my exam fee." Now the LLM needs a payment gateway such as Razorpay or Stripe.

Then: "Let my class group know I'll be late." Now it needs Slack (or a similar messaging tool). Behind the scenes, the app might also store documents on AWS.

The pattern is simple. To help real users with real tasks, an LLM needs access to many tools: databases, payment gateways, messaging apps, cloud services, and more.

Life Without MCP

Without MCP, you write custom integration logic to connect your LLM to every tool. For the timetable database, for example, you would:

  1. Write code that sends requests to whatever API endpoint the database provides.
  2. Write code that processes the response and hands it to the LLM.
  3. Update all of that whenever the database API changes: change the parser, change the integration logic, and redeploy the application.

Now count the work:

  • Five tools means five custom integrations.
  • If your app uses three different LLMs, each of the five tools may need an integration per LLM, so you may need 15 integrations.

This is a classic software problem called the N × M integration problem: N tools multiplied by M models. It is hard to build, hard to maintain, and fragile. If you replace GPT with DeepSeek tomorrow, or replace MySQL with PostgreSQL, you may have to rewrite integrations all over again.

Without MCP Integrations needed
5 tools, 1 LLM 5
5 tools, 3 LLMs 15
Any change to an LLM or a tool Possible rewrite and redeploy

Remember for the test (Part A)

  • An AI app has a development part and an LLM. The LLM needs tools (databases, payment gateways, Slack, AWS) to solve real tasks.
  • Without MCP, every tool needs its own custom integration logic, which must be updated and redeployed whenever an API changes.
  • 5 tools need 5 integrations. 5 tools across 3 LLMs may need 15. This is the N × M integration problem.
  • Switching an LLM or a tool can force a rewrite.

Part B: What MCP Is, Explained Through UPI

MCP is a middleman that sits between your AI application, your LLM, and the tools you need. You write your logic once, and it stays the same even when the LLM or the tools change later.

The easiest way to feel why that matters is to think about UPI.

The UPI Comparison

Imagine, as a thought experiment, that UPI did not exist. Every payment app would need a separate arrangement with every bank. With 4 apps and 5 banks, that is 20 separate connections, and every time a bank changed something, every app would need to adapt.

UPI fixes this with one common standard. Each payment app connects to the standard once. Each bank connects to the standard once. After that, any app can pay any bank, and nobody needs a special deal with anybody else.

MCP plays exactly this role for AI:

UPI world AI world
Payment apps AI applications and LLMs
Banks Tools (databases, payment gateways, Slack, AWS)
UPI, the common standard MCP
Each app and each bank connects to UPI once Each AI app and each tool connects to MCP once

Counted this way, CampusBuddy would need roughly 3 + 5 = 8 connections to the standard instead of 15 custom integrations. And if you swap one LLM for another, you may only need to change a single line of code, because the standard connection stays the same.

Traditional APIs Versus MCP

  • Traditional APIs were designed mainly for human developers. They let developers and applications interact with different systems.
  • MCP is designed specifically to standardize how AI models and AI based applications interact with external tools.

In short, MCP lets AI models connect to external tools, databases, and applications through a single protocol rather than custom integrations for each one.

Remember for the test (Part B)

  • MCP is a middleman between the AI application, the LLM, and the tools. Write the logic once.
  • Comparison: UPI. Apps and banks each connect to one standard instead of to each other.
  • Switching an LLM may take a single line of code.
  • Traditional APIs were designed for human developers. MCP standardizes how AI models interact with external tools.

Part C: What the Name Means

MCP stands for Model Context Protocol. Each word carries meaning, and the most important one is Protocol.

1. Protocol

A protocol is a set of rules that define how communication and interaction take place. You already know one: HTTP, the Hypertext Transfer Protocol, defines the rules for how a browser talks to a web server. UPI is another kind of standard: it defines how apps and banks talk. In the same spirit, MCP defines the rules for how an AI application talks to tools, databases, and other applications.

This leads to a misconception worth clearing up. MCP does not create brand new capabilities that were impossible through API calls. UPI does not let you spend money you do not have. It only standardizes how the payment request travels. MCP is the same: suppose you connect to GitHub, and GitHub's APIs do not allow external parties to edit or delete certain repositories. Using MCP will not magically make that possible.

MCP is a standardization of the interaction process, not a source of new capabilities. It defines a common set of rules for how your application or LLM interacts with external tools.

2. Context

The job of MCP is to bring relevant context into the AI application. That context can include:

  • Tool definitions
  • Database schemas
  • Enterprise data
  • Other relevant information the application needs

3. Model

MCP is built for AI models. It is not designed for traditional web applications or mobile applications. The reason is that the way an AI model uses tools differs from the way human written code or a human developed application uses them. Because LLMs interact with external tools differently, the process needed standardizing, and that is why MCP exists.

Word Meaning Key point
Protocol A set of rules for communication, like HTTP Standardizes interaction. Adds no new capabilities
Context Relevant information brought to the app Tool definitions, database schemas, enterprise data
Model Designed for AI models Not for traditional web or mobile apps

Remember for the test (Part C)

  • A protocol is a set of rules for communication. HTTP is the familiar example.
  • MCP does not introduce new capabilities. If an API does not allow an operation, MCP will not make it possible.
  • Context includes tool definitions, database schemas, and enterprise data.
  • MCP is for AI models, not traditional web or mobile apps, because LLMs interact with tools differently.

Part D: The Advantages of MCP

1. It Solves the N × M Integration Problem

You no longer write numerous custom integrations or extra glue code. You need only the MCP middleman, which simplifies a large number of integrations.

2. Reduced Maintenance Cost

Because integrations are standardized, you do not repeatedly modify custom integration logic whenever an LLM or an external tool changes. The whole application becomes easier to maintain.

3. Dynamic Tool Discovery

Think of a restaurant menu board. You do not memorize the dishes in advance. You read what is available today, and when the menu changes, you simply read the new one.

MCP works the same way. The interaction starts with a discovery step: the MCP client asks the MCP server, "What tools are available?" The server answers with the available tools and their capabilities, for example MySQL, Razorpay, and Slack. That information reaches the LLM through the host application, so the LLM knows which tools exist and can decide which ones to use for a task.

This also handles change gracefully. If the API behind a tool changes tomorrow, the MCP server absorbs the change and exposes the updated capabilities through the standard interface. Your application discovers what is available dynamically, at runtime, with no hardcoding.

4. Better Security and Access Control

Go back to UPI. When you pay a shopkeeper, the shopkeeper never sees your banking password or your UPI PIN. The shop only says "charge this amount," and the secure payment system does the rest. (The comparison is not exact, but the idea carries over.)

Now suppose you skip MCP and connect your LLM directly to tools over HTTP APIs. With five tools you may need five separate API keys, and because the LLM is directly connected, you might end up exposing all of those keys to the LLM. That is not reliable for a production system, especially in an organization.

With MCP:

  • All API keys, secrets, and tokens are stored inside the MCP server.
  • The responsibility for making the actual API calls belongs to the MCP server, not the LLM.
  • The LLM simply invokes the available functions or tools.

So the LLM gets every capability it needs without ever seeing the sensitive credentials.

Direct API connections With MCP
Where keys and tokens live Possibly exposed to the LLM Stored inside the MCP server
Who makes the API calls The LLM side The MCP server
What the LLM does Handles credentials and endpoints Only invokes functions or tools

Remember for the test (Part D)

  • Four advantages: solves N × M, reduced maintenance cost, dynamic tool discovery, better security and access control.
  • Discovery: the MCP client asks the MCP server which tools are available. The server returns tools and capabilities. The LLM learns about them through the host application.
  • If a tool's API changes, the MCP server absorbs it and exposes updated capabilities. Applications discover capabilities dynamically at runtime.
  • Security: keys, secrets, and tokens stay in the MCP server. The MCP server makes the API calls. The LLM only invokes functions or tools.

Common Confusions to Avoid

  • MCP versus new capabilities. MCP standardizes how tools are accessed. It does not unlock operations an API forbids, just as UPI does not create money.
  • Protocol versus API. An API is a specific interface to a system. A protocol is the set of rules for communication. MCP is a protocol for how AI models use tools.
  • MCP versus traditional APIs. Traditional APIs were designed for human developers and applications. MCP is designed for AI models.
  • N × M versus N + M. Without MCP, every tool needs an integration for every model. With MCP, each side connects to the standard once.
  • Who holds the credentials. With MCP the MCP server holds them. The LLM does not.
  • Who makes the API calls. The MCP server, not the LLM.
  • Discovery versus hardcoding. The client asks the server for available tools at runtime instead of hardcoding them.

Practice Questions

1. Who introduced MCP, and when?
Anthropic, in 2024.

2. What problem does MCP solve?
The N × M integration problem: custom integrations for every combination of LLM and tool.

3. If an app uses 5 tools and 3 LLMs, how many custom integrations might it need without MCP?
15.

4. Why can switching from GPT to DeepSeek be painful without MCP?
Custom integrations may need to be rewritten.

5. What does MCP stand for?
Model Context Protocol.

6. What is a protocol?
A set of rules that define how communication and interaction take place. HTTP is an example.

7. Does MCP add new capabilities that an API did not allow?
No. It standardizes the interaction. If GitHub does not allow an operation through its APIs, MCP will not make it possible.

8. What kinds of information does "context" include?
Tool definitions, database schemas, enterprise data, and other relevant information.

9. Is MCP designed for traditional web and mobile applications?
No. It is designed for AI models, since LLMs interact with tools differently.

10. In the UPI comparison, what do the banks and the payment apps correspond to?
Banks correspond to tools. Payment apps correspond to AI applications and LLMs. UPI corresponds to MCP.

11. Traditional APIs were designed mainly for whom?
Human developers and applications.

12. What may you need to change to use a different LLM with MCP?
Possibly just a single line of code.

13. Name the four advantages of MCP.
Solves the N × M integration problem, reduced maintenance cost, dynamic tool discovery, and better security and access control.

14. How does dynamic discovery start?
The MCP client asks the MCP server what tools are available, and the server returns the tools and their capabilities.

15. What happens when a tool's API changes under MCP?
The MCP server absorbs the change and exposes the updated capabilities through the standard interface, so the app discovers them at runtime.

16. Where are API keys, secrets, and tokens stored with MCP?
Inside the MCP server.

17. Who makes the actual API calls under MCP?
The MCP server. The LLM simply invokes the available functions or tools.

18. Why is connecting an LLM directly to five tools risky?
You may need five API keys and might expose them to the LLM, which is unreliable for production systems.


Where This Leaves You

MCP exists because AI applications need many tools, and wiring each tool to each model by hand does not scale. Like UPI, it works by giving everyone one standard to connect to, so you write your logic once, keep credentials in one safe place, and let your application discover tools at runtime. It does not make impossible things possible. It makes the possible things consistent.

Part 2 opens up the machinery using a hospital as the comparison: what a "tool" is in MCP, the three core components (host, client, and server), the full step by step flow of a CampusBuddy request, stateful versus stateless MCP, and who builds MCP servers.

Top comments (0)