AI Hints
Home›MCP Tutorial
Free course

MCP Tutorial

Learn the Model Context Protocol from zero, one small and easy step at a time. Every idea is explained in plain words, then shown in real Python code with the official MCP SDK and real output.

📚 120 lessons▶ 1:46:37+ of video💻 109 code examples🖼 130 screenshots
The complete MCP course, free on YouTubeWatch on YouTube ↗

Course contents

Every lesson has its own page with the explanation, code you can copy, the real output, screenshots from the video, and a link that jumps straight to that moment in the video.

6. Rich Inputs, Outputs and Errors

  1. Pydantic Inputs14:17
  2. Structured Output15:12
  3. Tool Errors16:05

7. Async, State and Databases

  1. Async Tools17:03
  2. Tools with State17:59
  3. A Database Tool18:51

8. Files, Annotations and Tool Shape

  1. Safe File Tools19:45
  2. Tool Annotations20:48
  3. Many Small Tools21:51

9. Elicitation and Progress

  1. Asking the User22:41
  2. Saying No23:44
  3. Progress24:35

10. Tool Design and Practice

  1. Tool Design Tips25:24
  2. Practice: An Orders Server26:17
  3. Tools Quiz27:05

11. Resources

  1. Resources28:16
  2. Resource Templates29:15
  3. JSON Resources30:05

14. Resources Quiz and Prompts

  1. Resources Quiz36:04
  2. Prompts37:17
  3. Prompt Arguments38:08

16. Completions and Instructions

  1. Completions41:06
  2. Server Instructions41:57
  3. Practice: Support Prompts42:41

17. Prompts Quiz and the Client

  1. Prompts Quiz43:11
  2. The Client Class44:24
  3. Listing Everything45:20

18. Calling Tools from a Client

  1. Calling Tools46:10
  2. Reading Results47:01
  3. Handling Errors47:54

19. Servers and Models

  1. Several Servers48:45
  2. MCP Tools for an LLM49:45
  3. The Agent Loop50:43

20. Agents over MCP

  1. MCP with LangChain51:45
  2. A Gemini Agent52:38
  3. Choosing Tools53:26

21. Client Callbacks and Practice

  1. Answering Elicitation54:15
  2. Progress on the Client55:15
  3. Practice: A Chat Client55:52

22. Clients Quiz and stdio

  1. Clients Quiz56:28
  2. stdio in Depth57:45
  3. Logging Safely58:36

23. Streamable HTTP

  1. Streamable HTTP59:25
  2. Connecting by URL1:00:20
  3. Mounting in FastAPI1:01:20

24. Running Servers Well

  1. Stateless Servers1:02:17
  2. Lifespan1:03:17
  3. Configuration1:04:00

26. Packaging and Docker

  1. Packaging a Server1:07:41
  2. Docker for MCP1:08:36
  3. Deployment Quiz1:09:31

27. Protocol Details

  1. Protocol Versions1:10:42
  2. Capabilities1:11:39
  3. Pagination1:12:34

28. Caching and Changes

  1. Caching Hints1:13:16
  2. Roots1:14:11
  3. Deprecated Features1:14:49

29. Testing and Debugging

  1. Testing a Server1:15:42
  2. Testing Errors1:16:33
  3. Debugging1:17:16

30. Performance and Versioning

  1. Performance1:18:10
  2. Versioning Your Server1:19:08
  3. Advanced Quiz1:20:00

31. Security Threats

  1. Why Security Matters1:21:11
  2. Prompt Injection1:22:08
  3. Tool Poisoning1:23:12

32. Limiting Damage

  1. Least Privilege1:24:11
  2. Secrets1:25:05
  3. Confirm Before Acting1:25:49

33. Auth and Validation

  1. Authentication1:26:38
  2. Validating Input1:27:51
  3. Security Checklist1:28:48

34. Limits and Audits

  1. Rate Limits and Abuse1:29:31
  2. Auditing1:30:34
  3. Security Quiz1:31:19

35. Project: Tools

  1. Project: The Plan1:32:33
  2. Project: Data1:33:29
  3. Project: Tools1:34:10

36. Project: Resources and Tests

  1. Project: Resources1:35:21
  2. Project: Prompts1:36:09
  3. Project: Tests1:36:49

37. Project: HTTP and Agent

  1. Project: HTTP1:37:29
  2. Project: An Agent1:38:19
  3. Project: Final Run1:39:00

38. Project: Ship It

  1. Project: Host Config1:39:40
  2. Project: Hardening1:40:28
  3. Project Review1:41:16

39. Cheat Sheets

  1. Cheat Sheet: Servers1:42:03
  2. Cheat Sheet: Clients1:42:54
  3. Common Mistakes1:43:40

40. Ecosystem and Next Steps

  1. The MCP Ecosystem1:44:31
  2. MCP Interview Questions1:45:25
  3. What to Learn Next1:46:37