This repository contains the tutorial materials and example code for my YouTube course on MCP (Model Context Protocol). The course walks through the evolution of tool use in AI — from Toolformer to MCP — and then dives into practical examples of building MCP servers, clients, and agents.
This repository follows along with the YouTube tutorial series: self deep learning - MCP Course
- Who this course is for & prerequisites
- What a Tool is & why tools are needed
- Classical Tool Use – Toolformer (2023)
- Transition to MCP
- Core Components — Host, Client, Server
tools/listrequesttools/callrequest- Protocol Mechanics — JSON-RPC 2.0
- Relationship with Function Calling Features
- Setting up the MCP stdio server
- Defining MCP tools (e.g., Calculator)
- Setting up the MCP stdio client
- Calling MCP server tools from the client
- Setting up the MCP streamable HTTP server
- Setting up the MCP HTTP client
- Connecting to built-in servers such as Filesystem, Git, and Tavily
- How to connect MCP to an LLM (e.g., OpenAI API, LangChain/LangGraph)
- Security risks and safe design considerations
- What we didn’t cover and why
- Future outlook for MCP and related approaches
.
├── servers/ # MCP servers (stdio, HTTP, etc.)
├── clients/ # MCP clients (stdio, HTTP, etc.)
├── agents/ # Chatbot agents using OpenAI API or LangChain
└── assets/ # Slides & YouTube scripts
Follow the instructions here: uv installation guide.
For example, on macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shOn Windows (PowerShell):
irm https://astral.sh/uv/install.ps1 | iexuv venv
source .venv/bin/activate # On macOS/Linux
.venv\Scripts\activate # On Windowsuv syncuv run clients/stdio_client.pySome examples(tavily_client, agents) in this project require API keys for external services (e.g., LLMs, search tools).
- Copy
.env.exampleto.env:
cp .env.example .env
- Edit
.envand replace with your own keys:
TAVILY_API_KEY=tvly-xxxxxx
OPENAI_API_KEY=sk-xxxxxx
You can get your keys here:
👉 Tavily API Key → https://app.tavily.com/
👉 OpenAI API Key → https://platform.openai.com/
By the end of this tutorial project, you will:
- Understand what MCP is and why it matters.
- Learn how to build your own MCP servers and clients.
- Connect existing servers (Filesystem, Git, Tavily).
- Integrate MCP with LLMs safely.
- This repo is designed to be educational, not production-ready.
- The
assets/folder contains slides and scripts used in the videos.