[KongchangAI]
· 2 min read· 1,012 words

LangChain+MCP from Beginner to Practice: A Deep Dive into the Bilibili Tutorial

LangChain+MCP from Beginner to Practice: A Deep Dive into the Bilibili Tutorial

How the LangChain framework and MCP protocol simplify tool calling and agent development for large models.

Based on a Bilibili LangChain tutorial, this article explains why large-model apps need frameworks instead of hand-written low-level logic. It covers LangChain's agent abstraction for managing history, executing tool calls, and making multi-turn decisions, and positions MCP as a later-chapter protocol for standardizing model-context interaction. The livestream-plus-Q&A course suits both beginners and developers with some foundation.

Why Do You Need LangChain and MCP?

Large models have powerful reasoning capabilities—they can understand your questions and provide answers. But their knowledge stops at their training data. When you need them to converse using your company's internal business data, they can't help. The solution is to bind tools to the large model, so that it can not only understand questions but also call tools to retrieve internal data, then rely on its reasoning capabilities to organize an answer.

The problem is that hand-writing tool-calling logic consumes a lot of effort on low-level management: how to invoke, how to manage concurrency, how to maintain conversation history. This Bilibili tutorial points out that frameworks like LangChain exist precisely to solve this problem—letting you stand on the shoulders of giants and focus your energy on the business itself.

LangChain plus MCP tutorial explanation

LangChain: A Framework for Building AI Applications

LangChain is essentially a framework for developing large-model applications. In the tutorial, the Bilibili creator explains that it provides higher-level abstractions so you don't have to implement low-level logic from scratch.

More Than Just Conversation: The Value of Agents

Agents play a key role in LangChain. Unlike talking directly to a large model, an agent can automatically manage chat history; when the large model decides to call a tool, the agent actually executes the call and returns the result, and can also judge based on the returned result whether it needs to continue calling tools. This higher-level abstraction frees developers from handling tedious state management and conversation management.

Diagram of binding large models to tools

Tool Calling / Function Calling is the fundamental mechanism by which large models interact with external systems: developers describe a tool's name, parameters, and purpose using a structured schema, and the model decides during reasoning whether to call a tool, which tool to call, and generates parameters that conform to the schema; the framework then executes the actual function and passes the result back to the model. Agents build on this by adding looped decision-making capability—the model can judge again based on the tool's returned result whether it needs to continue calling tools until the task is complete. This mechanism upgrades large models from "only able to generate text" to "able to operate external systems," and it is also where the core value of LangChain's abstraction lies.

Why Not Build the Framework Yourself?

The tutorial explicitly advises: don't hand-write your own LangChain or Cloud SDK. The reason is straightforward—these frameworks have already implemented solid low-level logic, and building your own will only waste effort on repetitive work like large-model invocation, internal concurrency, and state management. Rather than that, spend your time on business logic.

Agents internally contain large models

The MCP Protocol: Connecting Models and Context

MCP (Model Context Protocol) is covered in the later chapters of this LangChain course. The creator specifically notes that MCP does not require you to master all the preceding tech stack—some content used in certain chapters may not be necessary for MCP, and some content that isn't used won't be expanded on in the livestream. This focused teaching approach allows both beginners and developers with some foundation to keep up.

Tutorial advice on hand-building frameworks

Based on the tutorial's positioning, MCP is a protocol in the LangChain ecosystem for standardizing model-context interaction. Although the original content doesn't elaborate much on MCP's specific mechanisms, its placement in the later part of the course suggests that some LangChain foundation is needed to understand it deeply.

MCP (Model Context Protocol) is an open protocol proposed by Anthropic at the end of 2024, aimed at providing a standardized communication interface between AI applications and external data sources and tools. It uses a client-server architecture: AI applications act as clients and request resources, call tools, or obtain prompt templates from MCP Servers through a unified protocol, thereby avoiding the need to write separate integration code for each data source. The difference between MCP and traditional Function Calling is that it decouples "tool definition and execution" from the model side into independent services, allowing the same set of tools to be reused by different models and frameworks. Frameworks such as LangChain have gradually provided MCP adapter layers, enabling agents to directly consume the capabilities exposed by MCP Servers.

Who Is This Tutorial For?

At the opening, the creator clearly states that whether you're a complete beginner or have some foundation in large-model development, you'll be able to follow tonight's content. The course uses a livestream plus community Q&A format, so you can ask questions in the group when something is unclear. This hands-on, from-beginner-to-code-practice route is indeed more direct than grinding through books—especially for developers who want to quickly get started with LangChain and MCP integration.

Learning Suggestions

Based on the information revealed in the tutorial, the learning path can be planned like this: first understand LangChain's positioning as an AI application framework, then master the core concepts of agents (tool calling, result handling, multi-turn decision-making), and finally move on to learning the MCP protocol. Don't try to hand-build the low-level framework; make good use of existing toolchains and save your energy for business innovation.

One-line Summary

How the LangChain framework and MCP protocol simplify tool calling and agent development for large models.

Paragraph Summary

Based on a Bilibili LangChain tutorial, this article explains why building large-model applications requires a framework rather than hand-writing low-level logic. Large-model knowledge stops at training data, so tools must be bound to retrieve internal business data—yet hand-writing invocation, concurrency, and conversation-history management consumes enormous effort. LangChain, as an AI application development framework, uses high-level abstractions such as agents to automatically manage history, execute tool calls, and make multi-turn decisions based on results. The article explicitly discourages hand-building frameworks and recommends focusing on the business. MCP, covered in later chapters, is positioned as a protocol for standardizing model-context interaction and does not require mastering the entire preceding tech stack. The tutorial uses livestream plus community Q&A and suits both beginners and developers with some foundation.

#LangChain#MCP#Model Context Protocol#AI agents#tool calling#large model application development
Share:

Related articles