In this article we’ll use one screen to learn about the Model Context Protocol or MCP.
In the middle panel we have some code that we’ve added descriptive comments about what the code does and the parameters used to call the code.
We use code from a framework to turn our function into a server that follows the Model Context Protocol
In this case we are using the Gradio framework, but other choices like Semantic Kernel or LLM specific libraries
In the bottom panel we are running our server.
In the left panel, the AI chat client or agent is told about available MCP servers
In this case we are using Visual Studio Code, GitHub CoPilot and Claude 3.7 Sonnet
In the right pane,l the AI chat model is looking at available MCP servers, determining parameters, making a call and presenting results
In summary, MCP involves
Add descriptive comments to the code
Use a framework to create the MCP server
Run the server
Add MCP server details to chat clients
The AI chat model determines when and how to call a MCP server