Model Context Protocol is to AI models what USB is to computers: a single standard interface so that any model can plug into any tool without writing custom integration code for every combination. Anthropic released MCP as an open standard in November 2024. Before MCP, connecting an AI model to an external tool required custom integration code for every model-tool pair. With MCP, any MCP-compatible model can use any MCP server.
This article covers how MCP works, its three primitives, how it compares to function calling, how to build a basic MCP server, popular MCP servers in use today, and the interview questions engineers are encountering as agentic AI becomes a standard system design topic.
Key Takeaways
- MCP is a universal interface for connecting AI models to external tools: any MCP-compatible model can use any MCP server without custom integration code.
- It was created by Anthropic (November 2024) to solve the N x M integration problem: N models times M tools becomes N plus M with MCP.
- MCP has three primitives: Tools, Resources, and Prompts. In practice, nearly all production MCP servers only implement Tools.
- MCP and function calling are complementary: MCP provides portability across models; function calling provides the execution mechanism within a model.
- MCP is increasingly relevant to system design interviews as agentic AI becomes a standard architecture topic at FAANG companies.
What Is the Model Context Protocol?
What is the Model Context Protocol (MCP)?
The Model Context Protocol (MCP) is an open standard created by Anthropic and released in November 2024. It provides a universal interface for connecting AI language models to external tools, resources, and data sources. Think of it the way you think of USB: before USB, every device needed a custom cable and custom driver. After USB, any device can connect to any computer with the same connector. MCP does the same for AI models and external tools: any MCP-compatible model can use any MCP server without custom integration code for the specific model-tool pair.
Why was MCP created?
Before MCP, connecting N AI models to M external tools required N x M custom integrations. Every model-tool combination needed its own bespoke code. MCP reduces this to N + M: each AI model implements the MCP client once, each tool implements the MCP server once, and they automatically work together. For a team maintaining integrations across multiple models and data sources, this is the difference between maintaining dozens of one-off connectors and maintaining a single standard interface.
How MCP Works: The Three Primitives
What are the three MCP primitives?
MCP exposes three types of capabilities that a server can offer to a connected AI model. In practice, adoption is uneven across the three.
| Primitive | What It Is | Example | Adoption |
| Tools | Callable functions the AI model can invoke to take actions or retrieve data | A function that queries a database, sends a Slack message, or searches the web | High. Most MCP servers are tools-only. This is the core practical use case. |
| Resources | Data pointers that expose content the AI can read (files, database rows, API responses) | A file in a filesystem, a row in a database, a URL endpoint | Low. Most MCP hosts have not built strong UX around resource discovery yet. |
| Prompts | Reusable prompt templates the AI can load and use | A standardised code review prompt, a summarisation template | Low. Prompt adoption is minimal in real-world MCP servers as of 2026. |
How does an MCP server communicate with an AI model?
MCP uses JSON-RPC over either HTTP or stdin/stdout (standard input/output). The MCP client, which is the AI application, sends a tools/list request to discover what tools are available on a connected server, then sends a tools/call request to invoke a specific tool with arguments. This same request-response pattern works regardless of which AI model and which external tool are being connected, which is what makes the protocol reusable.
MCP vs Function Calling
Transform Your Tech Career with AI Excellence
Join 25,000+ tech professionals who’ve accelerated their careers with cutting-edge AI skills
What is the difference between MCP and function calling?
These two are complementary, not competing. Function calling is a capability built into specific AI model APIs. MCP is a transport protocol layer above function calling. Understanding the distinction is important for anyone designing agentic AI systems.
| Aspect | Function Calling | Model Context Protocol (MCP) |
| What it is | A capability built into AI models (GPT-4, Claude) to call predefined functions | A standardised protocol for exposing tools, prompts, and resources to any MCP-compatible model |
| Scope | Specific to the model API where it is defined | Cross-model: any MCP-compatible model can use any MCP server |
| Transport | Handled by the model API itself (HTTP to the LLM endpoint) | JSON-RPC over HTTP or stdio; model-agnostic |
| Reusability | The function definition must be rewritten for each model you want to use it with | Write the MCP server once; any MCP-compatible model can use it without changes |
| Best for | Single-model integrations where portability is not needed | Reusable tools that need to work across multiple models or be shared across teams |
| Relationship | MCP uses function calling as the execution mechanism within a model | MCP is the portability layer that sits above function calling |
MCP Architecture: Hosts, Clients, and Servers
What are MCP hosts, clients, and servers?
MCP has three architectural roles. Every MCP deployment involves all three, though in simple local setups, they may run on the same machine.
| Role | What It Is | Example |
| MCP Host | The AI application that orchestrates the model and manages connections to MCP servers | Claude Desktop, a custom AI agent, an IDE with AI features like Cursor |
| MCP Client | The component inside the host that speaks the MCP protocol to servers; manages the connection lifecycle | The MCP client library embedded in Claude Desktop or in your agent code |
| MCP Server | A process that exposes tools, resources, or prompts to any connected MCP client via the MCP protocol | A GitHub MCP server, a Postgres MCP server, a filesystem MCP server |
How to Build Your First MCP Server
How do you build a basic MCP server in Python?
Building a minimal MCP server in Python requires the MCP SDK and about 15 lines of code. The example below exposes a single tool that returns the current time. This is the simplest possible MCP server and a good starting point for understanding the structure.
- Install the MCP SDK using this command “pip install mcp”
- Create a server instance and register tools using the @server.tool() decorator.
- Implement the tool function with type-annotated return values.
- Configure the transport. stdio is the simplest for local development.
- Test locally by adding the server to Claude Desktop’s config or another MCP host.
from mcp.server import Server from mcp.server.stdio import stdio_server server = Server('my-first-mcp-server') @server.tool() async def get_current_time() -> str: """Return the current ISO timestamp.""" from datetime import datetime return datetime.now().isoformat() if __name__ == '__main__': import asyncio asyncio.run(stdio_server(server))
Popular MCP Servers and Use Cases
What are the most popular MCP servers and what do they do?
The MCP ecosystem has grown rapidly since the November 2024 release. These are the most widely adopted servers as of 2026.
| MCP Server | What It Does | Use Case |
| GitHub MCP | Creates issues, opens pull requests, searches code, manages repositories via GitHub’s API | AI coding assistants that interact directly with GitHub without leaving the AI interface |
| Postgres MCP | Runs SQL queries against a Postgres database and returns results | AI agents that need to query, analyse, or update database records as part of a workflow |
| Slack MCP | Sends messages, reads channels, creates threads in Slack workspaces | AI agents that need to communicate or report results to a Slack workspace |
| Filesystem MCP | Reads and writes files in a specified local or remote directory | AI coding assistants that need to access, edit, or create files as part of a task |
| Brave Search MCP | Performs web searches and returns results via the Brave Search API | AI agents that need current web information beyond their training data |
| Memory MCP | Stores and retrieves information across sessions using a knowledge graph | Agents that need persistent context between conversations or long-running tasks |
MCP in Agentic AI Systems
How does MCP fit into agentic AI system design?
In agentic AI systems, a language model needs to interact with external tools, APIs, databases, and services autonomously over multiple steps. MCP provides the standardised interface layer that allows the agent to discover and invoke these tools without hardcoded integrations for each one. An agentic system built on MCP can add new capabilities by simply connecting a new MCP server rather than rewriting the agent’s tool integration code. This makes the system extensible by default: the agent discovers available tools at runtime via tools/list rather than having them hardcoded at build time.
MCP Interview Questions for Engineers
Transform Your Tech Career with AI Excellence
Join 25,000+ tech professionals who’ve accelerated their careers with cutting-edge AI skills
What MCP questions come up in agentic AI and system design interviews?
The following questions are appearing with increasing frequency in senior engineering and AI system design interviews as MCP becomes an industry standard. Each is followed by a model answer.
Q1. What is the Model Context Protocol and why was it created?
MCP is an open standard created by Anthropic (released November 2024) that provides a universal interface for connecting AI models to external tools, resources, and data sources. It was created to solve the N x M integration problem: before MCP, connecting N AI models to M tools required N x M custom integrations. MCP reduces this to N + M by having each model and each tool implement the protocol once.
Q2. How does MCP differ from function calling in OpenAI or Claude APIs?
Function calling is a capability within a specific model’s API for invoking predefined functions. MCP is a transport-agnostic protocol layer above function calling: an MCP server exposes tools that any MCP-compatible model can use via its function calling capability. MCP adds portability and reusability across models; function calling provides the execution mechanism within a specific model.
Q3. Design an AI agent that needs to query a database, send a Slack message, and search the web. How would you architect the tool integrations?
Use MCP to provide a standardised interface layer. Deploy a Postgres MCP server, a Slack MCP server, and a Brave Search MCP server. The agent connects to all three via its MCP client and discovers available tools dynamically via tools/list at startup. This approach avoids hardcoding tool schemas into the agent and makes the system extensible: adding a new capability means deploying a new MCP server, not modifying the agent code.
Q4. What are the three MCP primitives and which is most commonly used in practice?
Tools (callable functions), Resources (data pointers), and Prompts (prompt templates). Tools are by far the most commonly used in practice. Most real-world MCP servers are tools-only. Resources and Prompts have low adoption as of 2026 because most MCP hosts have not built strong UX around them.
Q5. What are the security risks of using MCP in a production AI system?
Key security risks of using MCP in a production AI system are:
- Tool permission scope: MCP servers should expose the minimum required capabilities, not broad access to all functions of an underlying service.
- Input validation: MCP servers must validate all inputs from the AI model since the model can be prompted to call tools with malicious or unexpected inputs.
- Credential management: MCP servers often need API keys or database credentials which must be stored in environment variables or secrets managers, never hardcoded.
Q6. When would you NOT use MCP? When is direct function calling a better choice?
Direct function calling is preferable when:
- You are building a single-model integration with no portability requirement.
- Startup latency matters, and you want to avoid the MCP server process overhead; and
- Your tool set is small, stable, and unlikely to be reused across models or teams. MCP overhead is worth paying when portability, ecosystem reuse, or dynamic tool discovery are priorities.
Conclusion
MCP is the standard interface that makes AI agents extensible without custom integration code for every model-tool pair. As agentic AI systems become a standard part of software architecture, understanding MCP is moving from optional knowledge to a practical engineering expectation. This shift is closely tied to areas like Agentic AI for Software Engineers, where building and orchestrating intelligent systems is becoming a core skill. Candidates who can discuss MCP’s architecture, its trade-offs against direct function calling, and its role in production systems are signalling exactly the kind of current awareness that agentic system design interviews reward.
FAQs: Model Context Protocol
Q1. Who created the Model Context Protocol?
Anthropic created and released MCP as an open standard in November 2024.
Q2. What problem does MCP solve?
It eliminates the need for custom integration code every time an AI model connects to a new external tool.
Q3. Is MCP the same as function calling?
No, MCP is a portability layer that sits above function calling and works across multiple AI models.
Q4. Do I need to implement all three MCP primitives to build an MCP server?
No, most production MCP servers only implement Tools, which is the only primitive with widespread real-world adoption.
Q5. Is MCP relevant to system design interviews?
Yes, as agentic AI becomes a standard topic in architecture, MCP knowledge is increasingly expected in senior engineering interviews.
Recommended Reads: