Learn Build MCP Servers: Extend Claude with Custom Tools
🔌 Advanced

Build MCP Servers: Extend Claude with Custom Tools

Go beyond using AI tools — build them. Learn the Model Context Protocol from the ground up: define custom tools, expose resources, handle authentication, and publish a server that connects Claude to any API or data source you choose.

📚 15 lessons 🕐 344 min total ✓ Free
01
What Is MCP and Why It Exists
MCP (Model Context Protocol) is an open standard that lets AI assistants connect directly to your tools, databases, and APIs — eliminating the copy-paste workflow that slows every developer down. This lesson explains the problem it solves and why it matters.
🕐 25 min
02
Architecture: Hosts, Clients, and Servers
MCP defines three distinct roles — host, client, and server — and a precise lifecycle for how they interact. Understanding this architecture is essential before writing a single line of server code.
🕐 25 min
03
The Three Primitives: Tools, Resources, and Prompts
MCP servers expose three types of capabilities: tools, resources, and prompts. Each serves a different purpose and is controlled by a different actor. Knowing when to use each one is the foundation of good MCP server design.
🕐 25 min
04
Transport Types: stdio and Streamable HTTP
MCP servers communicate with clients over one of two transports: stdio for local processes, or Streamable HTTP for remote servers. Choosing the right transport — and understanding the critical stdio output rule — is essential before writing your first server.
🕐 25 min
05
Setting Up Your Development Environment
Before writing your first MCP server, you need the right tools in place. This lesson walks through the complete TypeScript and Python setup — from Node and uv installation through project scaffolding and dependency configuration.
🕐 25 min
06
Your First MCP Server: TypeScript
Build a complete, working MCP server in TypeScript from scratch. You will implement a real weather tool using the US National Weather Service API, connect it to Claude Desktop, and see it in action — step by step.
🕐 25 min
07
Your First MCP Server: Python
Build the same weather MCP server from Lesson 06 — but in Python using FastMCP. You'll see how Python type hints and docstrings replace Zod schemas and explicit descriptions, and how to connect the server to Claude Desktop using uv.
🕐 25 min
08
Connecting Your Server to Claude
Go beyond Claude Desktop. Learn how to connect MCP servers to Cursor, VS Code with Copilot, and Claude.ai, how to pass environment variables securely, and how to diagnose the most common connection failures using log files.
🕐 20 min
09
Defining Tools: Schemas, Validation, and Responses
Go deeper on tool design. Learn how to write precise input schemas with Zod and Python's Annotated/Field, return structured errors without crashing the server, declare side-effect hints using tool annotations, and return multiple content types in a single response.
🕐 22 min
10
Exposing Resources: URIs, Templates, and Data
Learn to expose read-only context through MCP resources. Cover static URIs, RFC 6570 URI templates, TextResourceContents vs BlobResourceContents, and when resources are the right choice over tools.
🕐 20 min
11
Prompts: Reusable Instruction Templates
Build parameterized MCP prompts that clients offer to users as reusable workflows. Learn how prompts differ from tools and resources, how to define arguments, return messages arrays, and embed resource context.
🕐 18 min
12
Testing and Debugging with MCP Inspector
Master MCP Inspector — the browser-based visual testing tool for MCP servers. Test tools, resources, and prompts interactively, read the raw JSON-RPC stream, and build a systematic debugging workflow before connecting to Claude Desktop.
🕐 20 min
13
HTTP Transport: Building Remote Servers
Move beyond local stdio servers by deploying MCP over HTTP. Learn how Streamable HTTP works, build a remote server in TypeScript or Python, and connect it to Claude.ai via Settings > Integrations.
🕐 25 min
14
Authentication and Security
Secure your remote MCP server with API keys, OAuth 2.1 PKCE, and defence-in-depth practices. Learn input validation, secret management, and how to avoid the confused deputy problem.
🕐 22 min
15
Publishing: npm, PyPI, and the MCP Registry
Share your MCP server with the world. Learn how to publish a TypeScript server to npm and a Python server to PyPI, submit to the Official MCP Registry, and automate releases with GitHub Actions CI/CD.
🕐 22 min
Start Lesson 1 →
📥
Prefer to learn offline? Download the complete workbook — yours to keep, print, or use in teaching.
Download Workbook →

Online lessons always free · PDF includes personal & educational use license