Understanding MCP in one article: Helping large models connect to compliance "limbs"

MCP protocol: a compliant communication bridge for large models to improve AI application efficiency.
Core content:
1. The origin, background and necessity of the MCP protocol
2. The core components of MCP and their functions
3. Application examples of MCP in code development, data analysis and enterprise office
Preface
A while ago, another exciting event occurred in the field of AI. It was not the release of a new model or the innovation of a certain application, but an open protocol launched by Anthropic in November 2024 - MCP.
This protocol has been popular for a while, but I haven't shared it because I didn't use it much in the early days. I recently learned about it and would like to try to talk about it with you.
origin
First of all, we need to understand why MCP occurs?
At the beginning, the big model was only capable of conversation, whether it was text, or multimodal images or videos, but the essence was question and answer.
This is quite far from the AI we want. At the very least, it should be able to help us "do" things.
Later, there was function call
, we can connect the large model with external capabilities by calling external APIs ourselves.
At that time, the relationship between the big model and external capabilities was as follows:
In this case, the complexity of the entire large model ecosystem will increase exponentially.
Moreover, in actual work, we often integrate some external capabilities into large models, such as Gitee code repository operations, but the code integrated in large model A cannot be directly used in large model B, which will cause a lot of duplication and waste of overall work.
Thus, MCP was born.
introduce
MCP stands for Model Context Protocol, which aims to unify standard conventions Large Model
and External data (resources)
and External capabilities (tools)
communication.
The core components of MCP are as follows:
Host : Host program, that is, the carrier application of the large model currently in use, such as Claude Desktop, Cursor, Byte Trae, etc.
Client : MCP client, that is, the component responsible for communicating with the MCP Server, built into the Host. For example, Cursor is already built in and can be called directly after entering the MCP Server.
Server : MCP server, that is, the component that actually provides external data and external capabilities. It is usually outside the Host and can be a package of local files or a package of a remote REST interface.
Other concepts :
Resources : Various external resources of large models, which can be text type (source code, logs, etc.) or binary type (PDF, pictures, etc.), including: File Contents Database records API Response Real-time system data Screenshots/Images Log files Tools : Various external tools for large models, which can be modified from existing interfaces or newly developed, including: File system interface Database access (SQL) API Various applications (WeChat for Business), etc.
I just saw the news that the SSE solution used in the initial response protocol of MCP was upgraded to Streamable HTTP a few days ago, which is faster and more convenient.
Application Scenario
Here are a few simple scenarios to help you understand the application of MCP.
Code development: Integrate the documentation of your own components or uncommon components to provide more accurate AI-assisted coding; integrate browser MCP to automatically obtain web page error logs and speed up debugging. Data analysis: Directly access data sources such as databases and Excel, and use large model capabilities to analyze various indicators. Enterprise Office: With the help of MCP, commonly used applications such as email and enterprise WeChat can not only obtain relevant data in one step, but also replace manual email replies and enterprise WeChat message sending.
Summarize
This sharing mainly introduces the theoretical knowledge of MCP, so that everyone can have an intuitive understanding of it.