IndiaIndian Nationals
1800 210 2020
ForiegnForeign Nationals
+918068792934
logologo
Home
About
Director's Message
Blogs
HomeAbout
Director's MessageBlogs
Limited Seats Available

Model Context Protocol (MCP): Architecture, Working, Components, and Use Cases

  1. Home
  2. Blog
  3. Model Context Protocol (MCP): Architecture, Working, Components, and Use Cases

By Rahul Singh

Updated on Nov 23, 2026

Share:

Quick Overview:

  • The Model Context Protocol (MCP) is an open protocol that allows for connectivity between AI applications with various tools, data sources, and services through an interface.

  • The MCP protocol has three main components: Host, Client, and Server. They handle communications between AI applications and other components.

  • Its core capabilities include Tools, Resources, Prompts, Elicitation, and Extensions, allowing AI applications to access data, perform actions, and use reusable instructions.

  • In this blog you will learn how MCP works, compares MCP with APIs, explores its benefits and security challenges, and walks you through building a simple MCP server in Python.

To build AI-powered applications using technologies like MCP, explore the AI-Native Software Engineering Course Online - Executive Post Graduate Certificate  from IIT Kharagpur and develop the skills to design and build intelligent software solutions.

What Is Model Context Protocol (MCP)?

The Model Context Protocol is an open standard that defines how AI applications connect to external tools, data sources, and services. 

Anthropic introduced it in November 2024, and its specification and SDKs are open source. In December 2025, Anthropic donated MCP to the Agentic AI Foundation, a fund under the Linux Foundation that was co-founded by Anthropic, Block, and OpenAI.

Think of it as a shared plug shape. A tool that speaks MCP can be used by any AI application that speaks MCP, with no special code written for that pairing. The comparison people reach for is USB-C: one port, many devices. It's worth being clear about what the Model Context Protocol is not, though. It isn't a model, it isn't an app you download, and it doesn't make an AI smarter. It's a specification plus open-source SDKs that developers use to build the connections. 

Model Context Protocol Meaning

  • Model is the language model at the center of an AI application. 

  • Context is everything the model needs besides its own training: files, database rows, search results, tool outputs, and instructions. 

  • Protocol is the agreed set of message formats and rules that lets two programs exchange that context without knowing anything about each other's internals.

Why Do AI Applications Need MCP?

Before MCP, connecting M AI applications to N tools could mean building up to M times N separate integrations. Anthropic called this the N by M problem. Every new tool needed a connector for each assistant, and every new assistant needed a connector for each tool. Maintenance grew faster than the number of products.

The Model Context Protocol turns that into M plus N. A tool team writes one MCP server. An assistant team adds one MCP client. After that, any client can talk to any server. 

This is also why adoption of the Model Context Protocol spread quickly: OpenAI adopted the protocol in March 2025, Google DeepMind followed, and Microsoft, Cloudflare, and Salesforce now support it in their own products. By mid-2026, reports put the number of production MCP servers above 10,000.

Model Context Protocol Architecture

The Model Context Protocol architecture has three roles: hosts, clients, and servers. Let’s explore each of them in detail.

Model Context Protocol (MCP) architecture diagram showing three components: the host (AI application such as a chat assistant, IDE, or agent), the client (handles communication with one client per server), and the server (provides tools, data, and promptsModel Context Protocol (MCP) architecture diagram showing three components: the host (AI application such as a chat assistant, IDE, or agent), the client (handles communication with one client per server), and the server (provides tools, data, and prompts

1. Host: The AI application used by the user himself, like a chat assistant, vibe coding app, or AI agent. It contains the language model, determines what permissions the user gave, and combines context from different sources.

2. The Client: Lives inside the host. Every client maintains a one-to-one relationship with a single server, adds protocol information to every request sent out, and relays messages in between. A host with three servers will contain three clients.

3. Server: Program that exposes capabilities: tools the model can call, data it can read, and prompt templates it can offer. Servers can run on the same machine as the host, such as a local file server, or remotely over the network, such as a company's calendar service.

Messages between clients and servers use JSON-RPC 2.0, and MCP borrows its message-flow ideas from the Language Server Protocol that code editors use. Local servers typically talk over standard input and output, while remote servers use an HTTP-based transport.

Core Components and Capabilities of Model Context Protocol

The core components of Model Context Protocol consist of tools which include agentic AI frameworks, resources, prompts, etc. Let’s understand them in more detail.

Component

Who Controls It

What It Does

Example

Tools

The model

Functions the model can call to take an action or fetch live data

Look up an order, run a query, create a ticket

Resources

The application

Read-only data identified by a URI, added to the model's context

A policy document, a file, a database record

Prompts

The user

Reusable prompt templates the user can pick

A "summarize this ticket" template

Elicitation

The server, through the client

A request for more input from the user mid-task

Asking which account to charge

Extensions

Optional add-ons

Features outside the core protocol

MCP Apps for interactive interfaces, Tasks for long jobs

Clients and servers declare which of these they support, and both sides are expected to stay within what was declared. That keeps the core small and lets new features arrive as extensions instead of breaking existing servers.

How Model Context Protocol Works?

Here's what happens when a person asks an MCP-enabled assistant, "Where is order A1001?"

  1. The host starts or connects to the order server through a client. If it wants a list of what the server supports, the client sends a discovery request and gets back the supported protocol versions and capabilities.

  2. The client asks the server which tools it has. Each tool comes with a name, a plain-language description, and a schema for its inputs.

  3. The host passes those tool descriptions to the language model along with the user's question.

  4. The model decides it needs the order tool and returns a request to call it with the order ID.

  5. The host checks that this call is allowed, which may involve asking the user, and tells the client to send it. Each request carries its protocol version and capabilities.

  6. The server runs the function, such as a database lookup, and returns the result.

  7. The host puts that result into the conversation, and the model writes the final answer.

The model never touches the order system directly. It only asks, and the host and server do the work. That separation is where most of MCP's security design lives.

Building a Simple MCP Server in Python

The code below creates an order-support server with one tool, one resource, and one prompt, using the official Python SDK. It was tested with SDK version 2.3.0. Version 2 renamed the older FastMCP class to MCPServer, so if you follow tutorials written for version 1, either update the import as shown here or pin the package to a version below 2.

from mcp.server.mcpserver import MCPServer

mcp = MCPServer("order-support")

ORDERS = {"A1001": "shipped, arriving Friday", "A1002": "processing"}

@mcp.tool()

def get_order_status(order_id: str) -> str:

    """Look up the status of an order by its ID."""

    return ORDERS.get(order_id, "order not found")

@mcp.resource("policy://refunds")

def refund_policy() -> str:

    """The refund policy text."""

    return "Refunds are available within 30 days of purchase."

@mcp.prompt()

def summarize_ticket(ticket_text: str) -> str:

    """Prompt template for summarizing a support ticket."""

    return f"Summarize this support ticket in two sentences:\n\n{ticket_text}"

if name == "__main__":

    mcp.run()  # stdio transport by default

In a test run, a client listed one tool named get_order_status, called it with order ID A1001, and received "shipped, arriving Friday". It also read the policy://refunds resource and got the refund policy text.

To use the server with a real assistant, you register the command that starts it in the host application's MCP settings. Each host has its own way of doing this, so check its documentation.

Model Context Protocol vs API

An API is an interface to one service, built for developers who read documentation and write code against it. The Model Context Protocol is a layer above APIs that makes those capabilities discoverable and usable by an AI model without custom code for each one.  

Factor

Model Context Protocol (MCP)

API

Primary Purpose

Connects AI applications with external tools, data sources, and services.

Enables communication and data exchange between software applications.

Communication Standard

It adheres to a standard protocol based on JSON-RPC 2.0.

It employs different methods, including REST, GraphQL, SOAP, and RPC.

Discovery

It provides a means of discovering tools, resources, and prompts available to AI clients using a standard interface.

It depends on API documentation, specifications, or discovery services offered by the service.

Core Capabilities

It provides tools, resources, and prompts available to AI applications.

It provides endpoints or operations that allow data fetching, request sending, and actions performing.

AI Compatibility

It is designed to link AI models and applications with external context and capabilities.

It supports AI applications; however, the developers may need to write custom code to connect APIs to AI applications.

Communication Methods

It supports STDIO for local connections and Streamable HTTP for remote connections.

It commonly uses HTTP; however, the communication method varies depending on API design.

Reusability

It allows compatible AI applications to connect to MCP servers using a common protocol.

Each API requires a separate connection and custom handling according to its design.

Example

The AI assistant makes use of the MCP server to get access to file information, to make queries from the database, or to use GitHub.

The weather app makes use of a weather API to get current temperature and forecast information.

Best Suited For

Connecting AI applications with multiple tools and data sources through a common protocol.

Enabling communication and specific operations between applications and services.

Benefits and Challenges of Model Context Protocol

The Model Context Protocol has real advantages, but it also moves risk to new places. The table sets the two sides next to each other before the sections after it look at security and at when it's worth the effort.

Benefits of Model Context Protocol

  • Reusable connections: Build one MCP server and connect it to multiple AI applications without creating separate integrations for each application.

  • Reduced integration effort: MCP reduces the M × N integration burden to M + N, making it easier to connect multiple AI applications with different tools and services.

  • Access to live data and commands: In addition to training data, the models may have access to live data and the execution of commands through utilities that interface to them.

  • Open standard: MCP operates on an open standard that is served by various SDKs based on languages.

  • Architecture: It is an architecture where the model, the host, and the tools are segregated.

  • Authorization: The protocol allows for the definition of authorization in remote servers.

  • Growing ecosystem: Developers can access an expanding collection of ready-made MCP servers and extensions.

Challenges of Model Context Protocol

  • Security risks: Models can be misled by malicious text hidden in tool descriptions or other content they process.

  • Tool poisoning: Attackers can hide malicious instructions inside tool descriptions to influence model behaviour. This is a form of prompt injection and a documented security risk.

  • Implementation vulnerabilities:  Initial implementations of MCP had major security flaws. An example of this is the fix made for CVE-2025-6514 in the mcp-remote package (0.1.16).

  • Specification changes: MCP continues to have revisions in its specification, and the 2026 revision created compatibility problems with old clients.

  • Constraints in the context window: The presence of too many tools will confuse the model about which tool to select and will occupy the context window.

  • Governance responsibilities: Organisations must establish their own policies to review, audit, and control which MCP servers employees install and use.

Conclusion

The Model Context Protocol solves a plain problem in a plain way. Instead of one-off connectors, it gives AI applications and the tools they use a common language.

If you're starting out, build a tiny server like the one above and connect it to an assistant you already use. You'll learn more from ten minutes of that than from a week of reading. Then keep the security habits from the start, because the convenience that makes the Model Context Protocol useful is the same thing that makes careless setups risky.


Rahul Singh

Rahul Singh

36+ of articles published


Current role in the industry :

Associate - Content Marketing

Education Qualification :

B.Tech in Computer Science & Engineering

Expertise :

Artificial intelligenceMachine Learning (ML)Data ScienceFull-Stack DevelopmentData Structures & Algorithms

Tools & Technologies :

PythonReact.js & Next.jsJavaScript (ES6+)SQLTailwind CSSNode.js & MongoDBGit & GitHubSEO Tools (SEMRush)Google Search ConsoleTableau / Power BIFigma

About

Rahul Singh is an Associate Content Writer, with a strong interest in Generative AI, Agentic AI and AI-Native Software Engineering. He combines technical development skills with data-driven strategies to build scalable applications and optimize digital content. Rahul specializes in simplifying complex concepts across AI, ML and software development into practical, easy-to-understand insights, helping learners understand how AI products, systems and services are built and applied. He focuses on real world applications and explains advanced topics in a clear, step by step manner so you can follow along without confusion. His work connects theory with hands-on examples, covering AI-assisted development, intelligent automation and AI integration in software applications. He aims to help you learn faster, create better projects, and apply your knowledge confidently in real scenarios.

Follow me on :

No blogs published yet.

Frequently Asked Questions

FAQ

Ready to Take the Next Step? Enroll Today!

Ready to Take the Next Step? Enroll Today!