Understanding MCP From Scratch

LangChain · Intermediate ·🧠 Large Language Models ·1y ago

Key Takeaways

Explains the Model Context Protocol (MCP) and builds an MCP server for LangGraph docs from scratch

Original Description

The Model Context Protocol (MCP) is an open standardized protocol that connects AI models with various data sources and tools. It functions like a "USB-C port for AI applications," allowing LLMs to seamlessly interact with local files, databases, APIs, and custom tools. But, it can be challenging to understand. Here, we breakdown how MCP works, build an MCP server for LangGraph docs from scratch, and connect it to Claude, Cursor, and Windsurf. Video notes: https://mirror-feeling-d80.notion.site/MCP-From-Scratch-1b9808527b178040b5baf83a991ed3b2?pvs=4 Learn how to build agents on LangChain Academy: https://academy.langchain.com/?utm_medium=social&utm_source=youtube&utm_campaign=q4-2025_youtube-academy-links_aw Chapters: 00:00 - Introduction to MCP 00:21 - Demo: MCP Tool in Cursor 00:40 - Demo: MCP Tool in Windsurf 00:54 - Demo: MCP Tool in Claude Desktop 01:15 - Motivation for MCP 01:38 - Building a Tool from Scratch 02:00 - Loading LangGraph Docs and Creating a Vector Store 02:44 - Testing the Basic Vector Store Query 03:00 - Creating a LangChain Tool 03:22 - Binding Tools to LLMs 04:00 - Bridge to MCP: Connecting Tools to AI Applications 04:24 - MCP as a Client-Server Protocol 05:00 - How MCP Works with Host Applications 05:37 - Server Initialization by Host Applications 06:05 - Defining an MCP Server 06:41 - Adding Resources to MCP 07:05 - Running the MCP Inspector 07:27 - Testing Tools in the Inspector 08:06 - Configuring MCP Servers for Different Hosts 08:48 - Demo: MCP Tool in Cursor (Revisited) 09:10 - Demo: MCP Server in Windsurf (Revisited) 09:32 - Demo: MCP in Claude Desktop (Revisited) 09:56 - Using MCP Resources in Claude Desktop 10:19 - Recap: Augmenting LLMs with Context and Tools 10:57 - Conclusion and Final Thoughts
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from LangChain · LangChain · 0 of 60

← Previous Next →
1 Chat With Your Documents Using LangChain + JavaScript
Chat With Your Documents Using LangChain + JavaScript
LangChain
2 LangChain SQL Webinar
LangChain SQL Webinar
LangChain
3 LangChain "OpenAI functions" Webinar
LangChain "OpenAI functions" Webinar
LangChain
4 LangSmith Launch
LangSmith Launch
LangChain
5 LangChain x Pinecone: Supercharging Llama-2 with RAG
LangChain x Pinecone: Supercharging Llama-2 with RAG
LangChain
6 LangChain Expression Language
LangChain Expression Language
LangChain
7 Building LLM applications with LangChain with Lance
Building LLM applications with LangChain with Lance
LangChain
8 Benchmarking Question/Answering Over CSV Data
Benchmarking Question/Answering Over CSV Data
LangChain
9 LangChain "RAG Evaluation" Webinar
LangChain "RAG Evaluation" Webinar
LangChain
10 Fine-tuning in Your Voice Webinar
Fine-tuning in Your Voice Webinar
LangChain
11 Tabular Data Retrieval
Tabular Data Retrieval
LangChain
12 Building an LLM Application with Audio by AssemblyAI
Building an LLM Application with Audio by AssemblyAI
LangChain
13 Superagent Deepdive Webinar
Superagent Deepdive Webinar
LangChain
14 Lessons from Deploying LLMs with LangSmith
Lessons from Deploying LLMs with LangSmith
LangChain
15 Shortwave Assistant Deepdive Webinar
Shortwave Assistant Deepdive Webinar
LangChain
16 Cognitive Architectures for Language Agents
Cognitive Architectures for Language Agents
LangChain
17 Effectively Building with LLMs in the Browser with Jacob
Effectively Building with LLMs in the Browser with Jacob
LangChain
18 Data Privacy for LLMs
Data Privacy for LLMs
LangChain
19 "Theory of Mind" Webinar with Plastic Labs
"Theory of Mind" Webinar with Plastic Labs
LangChain
20 LangChain Templates
LangChain Templates
LangChain
21 Using Natural Language to Query Postgres with Jacob
Using Natural Language to Query Postgres with Jacob
LangChain
22 Building a Research Assistant from Scratch
Building a Research Assistant from Scratch
LangChain
23 Benchmarking RAG over LangChain Docs
Benchmarking RAG over LangChain Docs
LangChain
24 Skeleton-of-Thought: Building a New Template from Scratch
Skeleton-of-Thought: Building a New Template from Scratch
LangChain
25 Benchmarking Methods for Semi-Structured RAG
Benchmarking Methods for Semi-Structured RAG
LangChain
26 LangSmith Highlights: Getting Started
LangSmith Highlights: Getting Started
LangChain
27 LangSmith Highlights: Debugging
LangSmith Highlights: Debugging
LangChain
28 LangSmith Highlights: Datasets
LangSmith Highlights: Datasets
LangChain
29 LangSmith Highlights: Evaluation
LangSmith Highlights: Evaluation
LangChain
30 LangSmith Highlights: Human Annotation
LangSmith Highlights: Human Annotation
LangChain
31 LangSmith Highlights: Monitoring
LangSmith Highlights: Monitoring
LangChain
32 LangSmith Highlights: Hub
LangSmith Highlights: Hub
LangChain
33 SQL Research Assistant
SQL Research Assistant
LangChain
34 Getting Started with Multi-Modal LLMs
Getting Started with Multi-Modal LLMs
LangChain
35 Build a Full Stack RAG App With TypeScript
Build a Full Stack RAG App With TypeScript
LangChain
36 Auto-Prompt Builder (with Hosted LangServe)
Auto-Prompt Builder (with Hosted LangServe)
LangChain
37 LangChain v0.1.0 Launch: Introduction
LangChain v0.1.0 Launch: Introduction
LangChain
38 LangChain v0.1.0 Launch: Observability
LangChain v0.1.0 Launch: Observability
LangChain
39 LangChain v0.1.0 Launch: Integrations
LangChain v0.1.0 Launch: Integrations
LangChain
40 LangChain v0.1.0 Launch: Composability
LangChain v0.1.0 Launch: Composability
LangChain
41 LangChain v0.1.0 Launch: Streaming
LangChain v0.1.0 Launch: Streaming
LangChain
42 LangChain v0.1.0 Launch: Output Parsing
LangChain v0.1.0 Launch: Output Parsing
LangChain
43 LangChain v0.1.0 Launch: Retrieval
LangChain v0.1.0 Launch: Retrieval
LangChain
44 LangChain v0.1.0 Launch: Agents
LangChain v0.1.0 Launch: Agents
LangChain
45 Build and Deploy a RAG app with Pinecone Serverless
Build and Deploy a RAG app with Pinecone Serverless
LangChain
46 Hosted LangServe + LangChain Templates
Hosted LangServe + LangChain Templates
LangChain
47 LangGraph: Intro
LangGraph: Intro
LangChain
48 LangGraph: Agent Executor
LangGraph: Agent Executor
LangChain
49 LangGraph: Chat Agent Executor
LangGraph: Chat Agent Executor
LangChain
50 LangGraph: Human-in-the-Loop
LangGraph: Human-in-the-Loop
LangChain
51 LangGraph: Dynamically Returning a Tool Output Directly
LangGraph: Dynamically Returning a Tool Output Directly
LangChain
52 LangGraph: Respond in a Specific Format
LangGraph: Respond in a Specific Format
LangChain
53 LangGraph: Managing Agent Steps
LangGraph: Managing Agent Steps
LangChain
54 LangGraph: Force-Calling a Tool
LangGraph: Force-Calling a Tool
LangChain
55 LangGraph: Multi-Agent Workflows
LangGraph: Multi-Agent Workflows
LangChain
56 Streaming Events: Introducing a new `stream_events` method
Streaming Events: Introducing a new `stream_events` method
LangChain
57 Building a web RAG chatbot: using LangChain, Exa (prev. Metaphor), LangSmith, and Hosted Langserve
Building a web RAG chatbot: using LangChain, Exa (prev. Metaphor), LangSmith, and Hosted Langserve
LangChain
58 OpenGPTs
OpenGPTs
LangChain
59 Open Source RAG with Nomic's New Embedding Model (and ChromaDB and Ollama)
Open Source RAG with Nomic's New Embedding Model (and ChromaDB and Ollama)
LangChain
60 LangGraph: Persistence
LangGraph: Persistence
LangChain

Related Reads

Chapters (25)

Introduction to MCP
0:21 Demo: MCP Tool in Cursor
0:40 Demo: MCP Tool in Windsurf
0:54 Demo: MCP Tool in Claude Desktop
1:15 Motivation for MCP
1:38 Building a Tool from Scratch
2:00 Loading LangGraph Docs and Creating a Vector Store
2:44 Testing the Basic Vector Store Query
3:00 Creating a LangChain Tool
3:22 Binding Tools to LLMs
4:00 Bridge to MCP: Connecting Tools to AI Applications
4:24 MCP as a Client-Server Protocol
5:00 How MCP Works with Host Applications
5:37 Server Initialization by Host Applications
6:05 Defining an MCP Server
6:41 Adding Resources to MCP
7:05 Running the MCP Inspector
7:27 Testing Tools in the Inspector
8:06 Configuring MCP Servers for Different Hosts
8:48 Demo: MCP Tool in Cursor (Revisited)
9:10 Demo: MCP Server in Windsurf (Revisited)
9:32 Demo: MCP in Claude Desktop (Revisited)
9:56 Using MCP Resources in Claude Desktop
10:19 Recap: Augmenting LLMs with Context and Tools
10:57 Conclusion and Final Thoughts
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →