[KongchangAI]
· 1 min read· 962 words

MCP Protocol Explained: An Open Standard for Unified LLM Tool Calling

MCP Protocol Explained: An Open Standard for Unified LLM Tool Calling

MCP is an open protocol open-sourced by Anthropic that unifies the standard for LLM tool calling and solves tool-calling fragmentation.

The article focuses on MCP (Model Context Protocol), pointing out that different model vendors implement tool calling in their own ways, which forces all calling code to be rewritten when switching the underlying model. Released and open-sourced by Anthropic in November 2024, MCP standardizes how LLM applications communicate with external tools and data sources, including how tools are called and how they return results. It solves two major pain points: tool reuse and decoupling tools from Agents—common tools can be encapsulated as independent MCP servers and shared by multiple Agents. The article also explains that LangChain supports calling MCP tools and that the underlying model can be flexibly replaced with DeepSeek, GPT, Claude, and domestic vendor models. The final conclusion is that MCP decouples tool-calling code from model vendors and significantly reduces maintenance costs.

Why MCP Is Needed: The Fragmentation Problem of Tool Calling

When building AI Agents, calling external tools is one of the core capabilities. But for a long time, different model vendors have implemented tool calling in different ways. Take DeepSeekAd, Claude, and GPT as examples—each model has its own underlying way of writing tool calls. Suppose there are tools A, B, C, and D. An Agent built on DeepSeek needs to write calling code according to its own specification, Claude Code needs another set, and GPT yet another.

As long as we need to call tools

The direct consequence of this fragmentation is that once the underlying model of an upper-layer Agent is changed, all tool-calling code has to be rewritten. This not only increases development costs but also makes it difficult to reuse tools across different Agents. MCP (Model Context Protocol) was created precisely to solve this problem.

What MCP Is: An Open Communication Standard

MCP is an open protocol introduced by Anthropic, with the full name Model Context Protocol. Anthropic is the company behind the Claude series of models, and the protocol was released and open-sourced in November 2024. According to the tutorial, almost all mainstream LLMs now support the MCP protocol at the underlying level.

But at the underlying level when these tools are called

In plain terms, MCP defines the communication method between LLM applications and external tools and data sources. It provides standards in two respects: first, how to call tools; second, how tools return results for parsing. Developers only need to write tools according to this protocol, and no matter which model the upper-layer Agent uses, the calling code does not need to change.

The MCP architecture is usually described as a client-server model: an MCP server encapsulates a set of tools, resources, or prompt templates and exposes its capabilities through standardized JSON-RPC messages; an MCP client is held by a host application (such as an AI coding assistant or Agent framework) and is responsible for establishing a connection with the server, discovering available tools, and forwarding call requests. The handshake between the two negotiates the protocol version and capability set, thereby ensuring interoperability between different implementations. At the transport layer, MCP supports both standard input/output (stdio) between local processes and HTTP-based remote connections, so tools can be deployed locally with the application or shared as independent services by multiple clients.

What Practical Problems MCP Solves

Pain Point 1: Tool Reuse

Before MCP, tools had to be written inside the Agent. Taking LangChain as an example, developers needed to mark functions as tools with the @tool decorator and then set them in the tools parameter of create_agent. This process had to be repeated every time an Agent was built. With MCP, common tools can be encapsulated separately into MCP toolkits, and multiple Agents can call the same set of tools, achieving true cross-Agent reuse.

Use the add to tag to mark which function is a tool

In MCP's abstraction, the server exposes not only executable functions (Tools) but also two other primitives: Resources and Prompts. Resources are used to provide readable context data to the model (such as files and database records), while Prompts are reusable prompt templates. After the client connects, it can dynamically discover the tools currently provided by the server and their parameter Schemas through list-type requests. Therefore, adding or updating tools does not require modifying the Agent code—only restarting or refreshing the connection is enough for changes to take effect. This "runtime discovery" mechanism is the key difference between MCP and traditional static tool registration, and it is also the technical foundation that supports cross-Agent reuse.

Pain Point 2: Decoupling Tools from Agents

MCP extracts tools from the Agent and forms an independent MCP server. The server only needs to maintain a set of tools and expose them, and the Agent side is responsible for using them. These two pain points essentially point to the same thing: making tools no longer bound to a specific Agent, but instead a resource that can be independently maintained and shared across projects.

MCP Support and Model Compatibility in LangChain

When building Agents with LangChain, the underlying model can be flexibly replaced with DeepSeek, GPT, Claude, and models from domestic vendors such as Zhipu and Qwen. According to the tutorial, LangChain also supports calling tools built on the MCP protocol.

Including domestic ones like Zhipu

This means developers can directly benefit from the tool reuse capability brought by MCP within the LangChain ecosystem. No matter how the underlying model is switched, as long as the tools follow the MCP standard, the calling logic remains stable.

In the LangChain ecosystem, integrating MCP tools usually relies on adapter libraries such as langchain-mcp-adapters: it establishes the MCP client connection, converts the tool descriptions exposed by the server into LangChain Tool objects, and then hands them over to interfaces such as create_agent for use. The significance of this adapter layer is that MCP defines the communication protocol between models and tools, while LangChain defines Agent orchestration logic, and the two are decoupled through the adapter. Developers can therefore retain their existing LangChain orchestration code and only replace the tool source, achieving a smooth migration from built-in @tool to remote MCP services.

Conclusion: The Essential Value of MCP

MCP is essentially a protocol that defines the standard process and specifications for different vendors when using tools. Its core value lies in this: no matter how the underlying model vendor changes, the code for calling tools remains fixed. Compared with the past situation where tool-calling code had to be rewritten every time the model changed, MCP significantly reduces the maintenance cost of Agent development and lays the foundation for cross-platform reuse of the tool ecosystem.

#MCP#Model Context Protocol#Anthropic#tool calling#AI Agent#LangChain
Share:

Related articles