Model Context Protocol (MCP): Explained

| Reading Time: 3 minutes

Article written by Rishabh Choudhary under the guidance of Jacob Markus, senior Data Scientist at Meta, AWS, and Apple, now coaching engineers to crack FAANG+ interviews. Reviewed by Mrudang Vora, an engineering leader and former CTO specializing in digital innovation, product development, and tech-driven business growth.

| Reading Time: 3 minutes

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.
Practical note: Most real-world MCP servers only implement tools. Resources and Prompts are part of the spec but have very low adoption in production systems as of 2026. If you are building your first MCP server, focus on tools only.

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
Interview implication: In agentic AI system design interviews, candidates are increasingly asked to design systems where AI agents call external tools. Understanding when to use MCP (for reusable, portable tools) vs direct function calling (for single-model integrations) is exactly the kind of architectural decision-making that FAANG system design rounds test.

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.

  1. Install the MCP SDK using this command “pip install mcp”
  2. Create a server instance and register tools using the @server.tool() decorator.
  3. Implement the tool function with type-annotated return values.
  4. Configure the transport. stdio is the simplest for local development.
  5. 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 in system design interviews: When asked to design an AI agent that integrates with multiple external services, a strong answer will reference a standardised tool interface layer. MCP is the industry standard for this in 2025/2026. Candidates who propose MCP as part of their agentic system design architecture signal awareness of current industry practice.

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:

FREE IK TOOLS

Fine tune your profile with insights from FAANG+ recruiters.

See how your resume scores and what to fix before you apply.

Analyse my resume →

Takes ~30 seconds · no spam

Benchmark your pay against FAANG+ offers and see where you stand.

Analyse my salary →

Takes ~60 seconds · no spam

Discover your AI-Readiness Score and what to learn next.

Get my AI score →

Takes ~30 seconds · no spam

Free Tools · No Credit Card Needed

Find out if you’re FAANG+ ready — in under two minutes

Three free analysers, benchmarked against real FAANG+ hiring data.

FREE

Resume Analyser

See your resume the way an ATS and a FAANG+ recruiter do - parse score, keyword gaps, seniority signals.

Score my resume
FREE

Salary Analyser

Know your true market value, where you rank against peers, and the hike AI skills unlock.

Check my band
FREE

AI Quotient

Your AI-Readiness Score, the skill gaps behind it, and a personalised roadmap to close them.

Get my AIQ score

IK courses Recommended

Master ML interviews with DSA, ML System Design, Supervised/Unsupervised Learning, DL, and FAANG-level interview prep.

Fast filling course!

Get strategies to ace TPM interviews with training in program planning, execution, reporting, and behavioral frameworks.

Course covering SQL, ETL pipelines, data modeling, scalable systems, and FAANG interview prep to land top DE roles.

Course covering Embedded C, microcontrollers, system design, and debugging to crack FAANG-level Embedded SWE interviews.

Nail FAANG+ Engineering Management interviews with focused training for leadership, Scalable System Design, and coding.

End-to-end prep program to master FAANG-level SQL, statistics, ML, A/B testing, DL, and FAANG-level DS interviews.

Select a course based on your goals

Learn to build AI agents to automate your repetitive workflows

Upskill yourself with AI and Machine learning skills

Prepare for the toughest interviews with FAANG+ mentorship

Register for our webinar

How to Nail your next Technical Interview

Loading_icon
Loading...
1 Enter details
2 Select slot
By sharing your contact details, you agree to our privacy policy.

Select a Date

Time slots

Time Zone:

Almost there...
Share your details for a personalised FAANG career consultation!
Your preferred slot for consultation * Required
Get your Resume reviewed * Max size: 4MB
Only the top 2% make it—get your resume FAANG-ready!

Registration completed!

🗓️ Friday, 18th April, 6 PM

Your Webinar slot

Mornings, 8-10 AM

Our Program Advisor will call you at this time

Register for our webinar

Transform Your Tech Career with AI Excellence

Transform Your Tech Career with AI Excellence

Join 25,000+ tech professionals who’ve accelerated their careers with cutting-edge AI skills

25,000+ Professionals Trained

₹23 LPA Average Hike 60% Average Hike

600+ MAANG+ Instructors

Webinar Slot Blocked

Interview Kickstart Logo

Register for our webinar

Transform your tech career

Transform your tech career

Learn about hiring processes, interview strategies. Find the best course for you.

Loading_icon
Loading...
*Invalid Phone Number

Used to send reminder for webinar

By sharing your contact details, you agree to our privacy policy.
Choose a slot

Time Zone: Asia/Kolkata

Choose a slot

Time Zone: Asia/Kolkata

Build AI/ML Skills & Interview Readiness to Become a Top 1% Tech Pro

Hands-on AI/ML learning + interview prep to help you win

Switch to ML: Become an ML-powered Tech Pro

Explore your personalized path to AI/ML/Gen AI success

Your preferred slot for consultation * Required
Get your Resume reviewed * Max size: 4MB
Only the top 2% make it—get your resume FAANG-ready!
Registration completed!
🗓️ Friday, 18th April, 6 PM
Your Webinar slot
Mornings, 8-10 AM
Our Program Advisor will call you at this time

Get tech interview-ready to navigate a tough job market

Best suitable for: Software Professionals with 5+ years of exprerience
Register for our FREE Webinar

Next webinar starts in

00
DAYS
:
00
HR
:
00
MINS
:
00
SEC

Your PDF Is One Step Away!

The 11 Neural “Power Patterns” For Solving Any FAANG Interview Problem 12.5X Faster Than 99.8% OF Applicants

The 2 “Magic Questions” That Reveal Whether You’re Good Enough To Receive A Lucrative Big Tech Offer

The “Instant Income Multiplier” That 2-3X’s Your Current Tech Salary

Transform Your Tech Career with AI Excellence

Join 25,000+ tech professionals who’ve accelerated their careers with cutting-edge AI skills

Join 25,000+ tech professionals who’ve accelerated their careers with cutting-edge AI skills

Webinar Slot Blocked

Loading_icon
Loading...
*Invalid Phone Number
By sharing your contact details, you agree to our privacy policy.
Choose a slot

Time Zone: Asia/Kolkata

Build AI/ML Skills & Interview Readiness to Become a Top 1% Tech Pro

Hands-on AI/ML learning + interview prep to help you win

Choose a slot

Time Zone: Asia/Kolkata

Build AI/ML Skills & Interview Readiness to Become a Top 1% Tech Pro

Hands-on AI/ML learning + interview prep to help you win

Switch to ML: Become an ML-powered Tech Pro

Explore your personalized path to AI/ML/Gen AI success

Registration completed!

See you there!

Webinar on Friday, 18th April | 6 PM
Webinar details have been sent to your email
Mornings, 8-10 AM
Our Program Advisor will call you at this time