Hello everyone and welcome.
In this video, we will learn about how MCP communicates between different components that we introduced
earlier.
So here is a high level flow diagram which has different components that like MCP server, MCP client,
host application and various transport mechanism that goes into the communication.
So the very first one that we'll introduced is MCP server.
This is the main logic layer of the server.
It handles multiple capabilities like resources, tools, context and prompts.
The protocol layer sits below the MCP server layer.
It's responsible for structuring the communication.
Json-rpc 2.0.
Now there is a transport layer which interfaces the client via supported transport mechanism like HTTP
or Stdio.
It handles data transmission based on chosen protocol.
The next component is MCP client.
MCP client is the main application integrating two MCP host.
The client layer manages communication between the host and the MCP protocol.
Protocol layer mirrors the servers protocol layer for consistent communication.
The communication happens Json-rpc 2.0 layer.
And then there's transport layer that handles sending and receiving of data from the server.
On the very right hand side is the transport mechanism.
So the transport happens via stdio and HTTP with S.S.C..
Stdio is a standard input output, while HTTP with SSE is a standard server sent event for streaming.
All of this communication happens via protocol layer that is, maintain via Json-rpc format.
So now let's take a deep dive into how the data flows from different components and how this is made
possible.
So the host application sends the request to the client layer.
The client layer passes down the communication to protocol layer and then to the transport layer.
The transport layer then sends it to the server using a Stdio or HTTP protocol.
And on the server side, transport layer receives the request.
It passes on to the protocol layer, which is then routed to the server layer, which uses resources,
tools, context, or prompts to generate the responses.
The response then travels back the same path to the client and then onto the host application.
I hope you understand how the entire MCP communication happens over different components, over different
layers, using different protocols.
Thank you.
I'll see you in the next video.