LangChain + MCP in Practice: From Protocol Principles to Agent Tool Development

LangChain builds the Agent skeleton while MCP unifies tool access—together they solve tool reuse and cross-framework decoupling for enterprise AI.
Starting from two enterprise pain points—models can't reach internal business data, and switching models means rewriting tool-call code—the article explains LangChain as a large-model application framework that encapsulates model calls, tool management, and conversation history, with Agents adding history management, real tool execution, and multi-step decision-making on top. The stack runs bottom-up from LangGraph to the Agent interface to Deep Agent. MCP, proposed by Anthropic, uses a unified protocol to standardize tool discovery, invocation, and result handling—like a USB interface—making tools cross-vendor universal. Function Calling and MCP are essentially the same thing under different names. Compared with LangChain's native tools, which have poor reusability and framework lock-in, MCP brings tool reuse and cross-framework decoupling.
Large language models can reason and hold conversations, but they don't know your company's internal inventory data. Agents can call tools, but switch model vendors and the underlying code has to be rewritten from scratch. These two problems seem unrelated, yet they point to the same thing: the way tools connect to models is too fragile. LangChain builds the Agent skeleton, MCP standardizes the tools, and combining the two is a path that has been repeatedly validated in enterprise-grade AI application development.
What LangChain Actually Solves
According to the instructor of a Bilibili tutorial, LangChain is essentially a framework for developing large-model applications. Large models have strong reasoning capabilities—they can understand user intent and organize messy files—but their answers are based on training data and cannot directly reach internal enterprise business data.
The solution is to bind tools to the large model, so that while understanding the problem it can call tools to obtain business information, then rely on its reasoning ability to organize an answer. The problem is that if developers hand-write model calls, tool management, and conversation history management, all their energy gets consumed by low-level details, leaving no time for the business logic itself. LangChain provides exactly this layer of encapsulation, letting developers focus on business logic rather than low-level calls.

LangChain isn't the only framework—Cloud SDK and OpenAI SDK can also build AI applications. The instructor's advice is not to hand-roll a framework: low-level concurrency, state management, and conversation content management already have mature implementations, so it pays to stand on the shoulders of giants.
Agent Is a Higher-Level Encapsulation
Compared with using a large model bare, an Agent adds several key capabilities: automatically managing chat history; actually executing tool calls and returning results rather than merely generating the intent to call; and deciding, based on tool results, whether to continue calling the next tool. This is especially important in multi-step tasks.

You may not have noticed the layering of the LangChain tech stack: at the bottom is LangGraph, which is closer to the low-level API; above it is the Agent development interface implemented by LangGraph; and above that is Deep Agent, which is more heavily encapsulated. The lower you go, the more flexible; the higher you go, the easier to use. The instructor mentioned that the Harness architecture idea often discussed in the industry is in fact implemented by Deep Agent, and Deep Agent's底层 is in turn developed on top of LangChain and LangGraph.
LangGraph is a low-level orchestration framework launched by the LangChain team. Its core idea is to model an Agent's execution process as a "graph": nodes represent processing steps (calling a model, executing a tool, conditional branching), edges represent the flow between steps, and shared State can be carried along them. This design lets complex control flows—loop calls, multi-step branching, human intervention—be explicitly expressed and debugged, rather than relying on the framework's implicit logic. LangChain's Agent interface and Deep Agent are both built on LangGraph, so the lower you go, the more flexible but the more you must organize state and flow yourself; the higher you go, the more complete the encapsulation, ready out of the box but with relatively narrower room for customization.
MCP: A USB Standard for Tool Calls
MCP stands for Model Context Protocol and was proposed by Anthropic. Before MCP, every model vendor had its own way of calling tools: for model A, tool 1 used one API and tool 2 another; switch to model B, and the same four tools had to be rewritten to B's specification. As soon as an Agent switches its underlying model, the tool-calling code breaks.
MCP's approach is to define a protocol that covers how tools are discovered, how they are called, and how returned results are handled. The large models of any vendor, as long as tools are developed according to the MCP protocol, can be compatible with and adapted to them. The instructor uses the USB interface as an analogy: as long as a device is USB-compatible, it will be recognized when plugged into a computer, whether it's a flash drive, a hard drive, or some other peripheral.

According to the instructor, after Anthropic released the protocol, almost all mainstream AI vendors have supported it, including DeepSeekAd, Tongyi Qianwen, Microsoft, and Bailian. This means tools developed according to MCP are cross-vendor universal—this is its greatest value compared with proprietary tool definition approaches.
What Is the Relationship Between Function Calling and MCP?
During the livestream, an audience member asked whether MCP or Function Calling is used more. The instructor's answer was direct: Function Calling is a concept introduced by OpenAI, MCP is a concept introduced by Anthropic, and the two do the same thing, just under different names. OpenAI is now fully compatible with MCP as well, so treating the two as the same thing is not a big problem. Earlier the industry mostly talked about Function Calling; today people more often just say MCP.
Function Calling refers to a large model outputting a structured tool-call request during a conversation (usually a tool name plus JSON parameters), which the application side parses and actually executes, then passes the result back to the model. It is essentially a "output convention" on the model side, and the parameter formats and tool description fields are not entirely consistent across vendors. MCP goes further: it incorporates tool registration and discovery, call requests, result returns, and even resources and prompt templates into a unified protocol, with an independent MCP Server exposing capabilities externally, which clients connect to according to the protocol. You can think of it as: Function Calling solves "how the model expresses that it wants to call a tool," while MCP solves "how tools are published and accessed in a standardized way." The two sit at different levels and are often used together in practice.
Two Limitations of LangChain's Internal Tools
First, look at the way LangChain natively defines tools. In the code, createAgent creates an Agent; the first parameter specifies the model, and the second parameter tools specifies the tool list. Tools are defined via addTool, for example getStockPrice retrieves the stock price based on the company passed in, and searchNews searches for news related to a company. These two tools have nothing to do with MCP.

This approach has two limitations. The first is poor reusability: tools are written in the current code, so if a second codebase wants to build a new Agent using the same tools, it has to redefine them. The second is framework lock-in: tools defined the LangChain way can only be recognized by Agents built with LangChain—Agents built with Cloud SDK, OpenAI SDK, or various AI coding tools cannot call them.
Two Benefits of Connecting MCP to Agents
Once tools are turned into MCP Servers, the benefits show up at two levels.
Tool reuse: when multiple Agents built in multiple code files need the same tools, MCP manages them uniformly, with no need to redefine them.
Cross-framework decoupling: tools that conform to the MCP protocol can be provided to any Agent—whether built with LangChain, Cloud SDK, or OpenAI SDK—with no framework restrictions at all.
In the livestream, the instructor demonstrated a case of using local tools and MCP-developed tools in the same Agent, directly comparing the differences between the two. This is also the most direct way to understand MCP's value—the same Agent, two sources of tools, and the behavioral difference is obvious at a glance.
Version and Selection Advice
The tutorial is based on LangChain 1.3. For learners who want to develop agents, the instructor recommends developing directly with LangChain and not agonizing over domestic versus foreign agents—agents themselves have no domestic/foreign distinction; what does is the large model. Domestic large models like DeepSeek have already developed quite maturely, and its v4pro version is very capable.
As for tools like Codex and Cursor, they mainly target programming-assistance scenarios, which is a different path from building your own AI applications in an enterprise. The former is suitable as a personal programming assistant; the latter is the main battlefield of enterprise AI application development.
MCP Server is an independent service process that carries specific tool capabilities and declares, according to the protocol, which tools it provides and their parameter structures. The Agent side connects to the Server through an MCP Client, first pulling the tool list, then letting the model decide which one to call; the request is forwarded to the Server via the protocol for execution and the result is returned. The two can communicate via local process communication (stdio) or remote transport (such as HTTP/SSE), so tools can be deployed on the same machine as the Agent or as independent services shared by multiple Agents. This is precisely the technical premise that makes "tool reuse" possible: a tool is no longer a function in code, but a capability endpoint that can be discovered and connected to by multiple parties.
Summary
LangChain solves the problem of how to build an Agent; MCP solves the problem of how to connect tools. The former provides a development framework and layered APIs; the latter provides a cross-vendor tool connection standard. When enterprises build AI applications, the three requirements—develop tools once, reuse them across frameworks, and avoid code changes when switching models—are exactly the core value of combining the two.
Related articles

Anthropic's IPO Eve: Five Risks Behind the Trillion-Dollar Valuation and the Truth About Its Governance
Breaking down Anthropic's IPO prospectus: $184M daily revenue at a trillion-dollar valuation, the truth behind $104B in paper losses, a five-class share governance structure, unusual disclosures in 94 pages of risk factors, and how the lock-up schedule may affect retail investors.

FBI Warns: Hackers Weaponize AI Agent ARTEX to Attack 200+ Organizations
FBI warns that AI penetration framework ARTEX is being used to attack 200+ organizations, with CrowdStrike tracking the VaporPanda group. We break down ARTEX's agent orchestration architecture, the real attack chain, loss data, and the FBI's five defense recommendations.

FBI Warns: Free AI Hacking Tool Artex Spirals Out of Control, Breaches Cloud Systems in Three Hours
FBI warns that the free open-source AI penetration tool Artex is being abused by criminals and state-backed hackers to breach cloud systems in as little as three hours. This article analyzes real attack cases, overlooked side-door risks, and defense measures enterprises and individuals can take immediately.