AI Instructor Live Labs Included

MCP Fundamentals with Claude

Learn Model Context Protocol, the open standard Anthropic built so Claude can discover and call external tools and data sources without custom glue. Understand the three primitives (tools, resources, prompts), connect to existing MCP servers from Python, and build a multi-server client.

Intermediate
10h 39m
10 Lessons
CLD-AI-105

About This Course

Learn Model Context Protocol (MCP), the open protocol Anthropic developed so Claude clients can discover and call external tools + data sources without custom integrations. Understand the JSON-RPC-over-stdio-or-HTTP shape, the three primitives (tools, resources, prompts), how to connect to existing MCP servers from Python, and how to build a multi-server MCP client. This course is the plumbing story; CLD-AI-106 covers building your own servers.

Course Curriculum

10 Lessons
01
AI Lesson
AI Lesson

Introduction to Model Context Protocol

1h 0m

By the end of this lesson you will know what Model Context Protocol (MCP) actually is — Anthropic's open JSON-RPC protocol for connecting Claude clients (Claude Desktop, Claude Code, custom apps) to external tools and data sources — why it exists to solve the N-clients × M-sources integration explosion, and the three primitives every MCP server exposes: tools (Claude-invoked functions), resources (client-attached read-only data), and prompts (parametrized templates). Sets the stage for the L2 hands-on where you connect a Python client to a live MCP server.

02
Lab Exercise
Lab Exercise

Connect to an MCP server from Python - Lab Exercises

1h 5m 2 Exercises

By the end of this hands-on lab you will have built a minimal Python MCP client that discovers three tools from an in-process mock MCP server (add, get_weather, list_orion_customers), then bridged those discovered tools into a Claude tool_use loop so Claude picks which one(s) to call for a natural-language request. Uses the PythonAI container + Claude API proxy — no external MCP server or Anthropic account needed. Proves the MCP payoff: adding a new server tool requires zero client-side code changes.

03
AI Lesson
AI Lesson

MCP protocol details: JSON-RPC + transports

1h 0m

By the end of this lesson you will know the shape of every MCP JSON-RPC message — the six standard methods (initialize, tools/list, tools/call, resources/list, resources/read, prompts/list, prompts/get), how request/response IDs pair up, and the two transport options (stdio for local subprocess servers, HTTP+SSE for hosted). Grounds the abstract three-primitives model from L1 in wire-level detail and sets up the L4 hands-on where you exercise resources and prompts (not just tools) end-to-end.

04
Lab Exercise
Lab Exercise

Use all 3 MCP primitives from a Python client - Lab Exercises

1h 13m 3 Exercises

By the end of this hands-on lab you will have extended L2's tool-only MCP client to also list + read resources (client-attached data like customer profiles and runbooks) and list + fetch prompt templates (reusable server-defined message shapes) using the resources/list, resources/read, prompts/list, and prompts/get JSON-RPC methods against an enhanced mock server that now exposes 1 tool + 3 resources + 2 prompt templates. Uses the PythonAI container so no external MCP server is needed.

05
AI Lesson
AI Lesson

MCP server discovery and registries

1h 0m

By the end of this lesson you will know how MCP clients find available servers in production — declaring stdio servers in a client config file (Claude Desktop / Claude Code style), pulling from public registries (Anthropic's directory, npm, PyPI), and pinning server versions to avoid silent-tool-set drift when a server ships a new tool. Sets up the L6 hands-on where you build a client that reads a JSON config listing multiple MCP servers and routes tool calls to the right one.

06
Lab Exercise
Lab Exercise

Multi-server MCP client with config file - Lab Exercises

1h 3m 2 Exercises

By the end of this hands-on lab you will have built a MultiMCPClient that reads a JSON config file listing multiple in-process MCP servers (orion tools + weather tools), connects to each in parallel, aggregates their tool descriptors with server-prefixed names to avoid collisions, and routes each of Claude's tool_use calls to the correct backing server. Uses the PythonAI container + Claude API proxy — proves the pattern that ships in Claude Desktop and Claude Code.

07
AI Lesson
AI Lesson

MCP security: sandboxing and consent

1h 0m

By the end of this lesson you will understand MCP's security model: servers run with the host user's privileges (so scope carefully), Claude Desktop and Claude Code show explicit consent prompts before every destructive tool call, and how to review a third-party MCP server before installing it (read tools/list output, audit the source, check publisher signature). Sets up the L8 hands-on where you wrap an MCP client with a per-tool-call approval gate mirroring Claude Desktop's default behavior.

08
Lab Exercise
Lab Exercise

MCP approval gate: per-tool-call consent - Lab Exercises

1h 3m 2 Exercises

By the end of this hands-on lab you will have wrapped an MCP client with a per-tool-call approval hook that classifies each tool by risk (read-only auto-approve, destructive prompt-for-consent, denied never-call), then run three scenarios end-to-end to prove the gate correctly allows, blocks, and prompts. Mirrors the exact pattern Claude Desktop and Claude Code apply by default. Uses the PythonAI container + Claude API proxy — no external server needed.

09
AI Lesson
AI Lesson

MCP errors + progress notifications

1h 0m

By the end of this lesson you will know how MCP surfaces errors and progress: JSON-RPC error objects with standard codes (-32601 method-not-found, -32602 invalid-params, -32000+ server-defined), Python-SDK isError:true results for tool exceptions vs sentinel-return for expected misses, and progress notifications for long-running tool calls that let the client stream percent-complete back to the user. Prepares you for the L10 capstone where a multi-server agent must handle failures from either backend.

10
Lab Exercise
Lab Exercise

Multi-server MCP + Claude agent capstone - Lab Exercises

1h 15m 1 Exercises

By the end of this hands-on capstone you will have wired two in-process MCP servers (orion-tools with customer data + runbook-tools with escalation procedures), aggregated their tools with server-prefixed names, and driven Claude through a support-triage decision that requires reading from BOTH servers to reach the answer. Every technique from CLD-AI-105 — discovery, primitives, multi-server routing, approval gates, error handling — lands in one runnable file. Uses the PythonAI container + Claude API proxy.

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 5 Hands-on Lessons
Skill Level Intermediate
Total Duration 10h 39m