Published: August 17, 2025
37
406
4.1k

Model Context Protocol (MCP), clearly explained (with visuals):

MCP is like a USB-C port for your AI applications. Just as USB-C offers a standardized way to connect devices to various accessories, MCP standardizes how your AI apps connect to different data sources and tools. Let's dive in! 🚀

At its core, MCP follows a client-server architecture where a host application can connect to multiple servers. Key components include: - Host - Client - Server Here's an overview before we dig deep 👇

The Host and Client: Host: An AI app (Claude desktop, Cursor) that provides an environment for AI interactions, accesses tools and data, and runs the MCP Client. MCP Client: Operates within the host to enable communication with MCP servers. Next up, MCP server...👇

Image in tweet by Avi Chawla

The Server A server exposes 3 key capabilities: - Tools: Enable LLMs to perform actions through your server - Resources: Expose data and content from your servers to LLMs - Prompts: Create reusable prompt templates and workflows Check this 👇

Image in tweet by Avi Chawla

The Client-Server Communication Understanding client-server communication is essential for building your own MCP client-server. Let's begin with this illustration and then break it down step by step... 👇

1️⃣ & 2️⃣: capability exchange The client sends a request to learn the server's capabilities. The server responds with its capability details. e.g., a Weather API server provides available `tools` to call API endpoints, `prompts`, and API documentation as a `resource`.

3️⃣ Notification The Client then acknowledged the successful connection, and further message exchange continues. Before we wrap, one more key detail...👇

Unlike traditional APIs, the MCP client-server communication is two-way. Sampling, if needed, allows servers to leverage clients' AI capabilities (LLM completions or generations) without requiring API keys. While clients maintain control over model access and permissions.

Image in tweet by Avi Chawla

I hope this clarifies what MCP does. Over to you! What is your take on MCP and its future? In the thread below, I explained how to build an MCP server locally.

That's a wrap! If you found it insightful, reshare it with your network. Find me → @_avichawla Every day, I share tutorials and insights on DS, ML, LLMs, and RAGs.

@_avichawla A great visual explainer on MCP! Thanks for sharing Avi!

@_avichawla All of AI briefly explained: https://understandaifordevsche...

@_avichawla MCP is a game changer for building more composable systems. The standardized interface between models and tools will make it much easier to integrate different data sources and services. Great explanation as always!

@_avichawla your visuals have too many unnecessary moving parts - it distracts the reader from understanding the relationships. yes it is cute - but it is annoying.

@_avichawla I can tell you why 1000s who read this thread will still be confused.

@_avichawla Would it be wrong to say that an MCP server has a function similar to MQTT in IoT?

@_avichawla More crap

@_avichawla There’s an unusual number of short phrase responses, like on LinkedIn. Hmmm…

@_avichawla so bullish on mcp/a2a

@_avichawla This is a great way to learn.

@_avichawla Interesting. Context is often the missing piece in effective communication. Visualizing it helps bridge that gap.

@_avichawla Great thread! 👏🏻

@_avichawla Looks good! but i wonder that mcp intros have no word about security mechanismn. Should this not implemented in foundation/transportlayer for a promising next generation ai-usb? With mcp all that security gateways, content and action control of agentics…have to be done on top?

@_avichawla I didn't know about sampling, and it sounds interesting. I wish that you had gone a bit more into resources and templates, and how these can preferred above tools.

@_avichawla @_avichawla what software you use to create such cool visuals or gifs? :)

@_avichawla Very interesting might need the information how the LLM knows that it can use the MCP and how does the LLM initiate the MCP action

@_avichawla Nice explanation

@_avichawla Great explanation

@_avichawla Thank You for your hard work on this visual. This was very helpful.

Share this thread

Read on Twitter

View original thread

Navigate thread

1/37