Lesson 12 MCP Concepts & Protocol
Theme:
Lesson 12 · Slide 1

MCP Concepts & Protocol

The Model Context Protocol (MCP) is an open standard that lets LLM applications connect to external data sources and tools through a unified interface. This lesson covers the protocol architecture, transport layers, and the three core primitives.

Learning Objectives

Lesson 12 · Slide 2

What Is MCP?

Before MCP, every LLM application had to build custom integrations for each data source or tool. This led to fragmented, N×M integration problems: N applications × M data sources = N×M custom connectors.

MCP solves this by defining a universal protocol between LLM applications (hosts) and data/tool providers (servers). Any MCP-compatible host can connect to any MCP server without custom integration code.

Analogy: MCP is to LLM applications what USB is to peripherals. Before USB, every device needed a custom port. MCP provides a standard “port” for connecting AI models to the world.

MCP was created by Anthropic and released as an open-source specification in late 2024. It is supported by Claude Desktop, Claude Code, and a growing number of third-party hosts.

Lesson 12 · Slide 3

Host / Client / Server Architecture

MCP defines three roles:

RoleWhat It DoesExamples
HostThe LLM application that users interact withClaude Desktop, Claude Code, IDEs
ClientMaintains a 1:1 connection with a server (lives inside the host)MCP client library in the host process
ServerExposes tools, resources, and prompts via MCP protocolFilesystem server, GitHub server, Slack server

A single host can connect to multiple servers simultaneously. Each connection is managed by a separate client instance. The host aggregates capabilities from all connected servers and makes them available to the LLM.

┌─────────────────────────────────────┐
│          HOST (Claude Desktop)      │
│  ┌──────────┐  ┌──────────┐        │
│  │ Client A │  │ Client B │  ...   │
│  └────┬─────┘  └────┬─────┘        │
└───────│──────────────│──────────────┘
        │              │
   ┌────▼─────┐  ┌────▼─────┐
   │ Server A │  │ Server B │
   │(filesystem)│ │ (GitHub) │
   └──────────┘  └──────────┘
Lesson 12 · Slide 4

Transports: stdio & SSE

MCP supports two transport mechanisms for communication between client and server:

stdio (Standard I/O)

  • Server runs as a subprocess of the host
  • Communication via stdin/stdout
  • Simple, secure, no network required
  • Best for local servers

SSE (Server-Sent Events)

  • Server runs as a web service
  • Communication via HTTP + SSE
  • Supports remote servers, multiple clients
  • Best for shared / cloud servers

Under both transports, messages use JSON-RPC 2.0 encoding. The transport is just the delivery mechanism; the message format is the same.

Lesson 12 · Slide 5

Tools / Resources / Prompts

MCP servers expose three types of capabilities:

PrimitiveControlled ByAnalogyExample
ToolsModel (LLM decides when to call)POST endpointcreate_issue, run_query
ResourcesApplication (host decides what to include)GET endpointfile://config.json, db://users
PromptsUser (selects from a menu)Template“Summarise this PR”, “Debug this error”

Key distinction: Tools are actions the model takes. Resources are data the application loads into context. Prompts are templates the user selects. Getting this right is essential for good MCP server design.

Lesson 12 · Slide 6

Ecosystem

The MCP ecosystem is growing rapidly. Hundreds of servers are available for common integrations:

CategoryServers
Developer toolsGitHub, GitLab, Linear, Sentry
Data & databasesPostgreSQL, SQLite, Elasticsearch
ProductivitySlack, Google Drive, Notion, Jira
Web & searchBrave Search, Fetch, Puppeteer
File systemsFilesystem, S3, Google Cloud Storage

You can find servers on the official MCP servers repository and community registries. In the next lesson, you will build your own.

Lesson 12 · Slide 7

Demo

Live demonstration: connecting Claude Desktop to an MCP server.

Demo Steps

  1. Show the Claude Desktop MCP configuration file (claude_desktop_config.json)
  2. Connect to the filesystem MCP server
  3. List available tools from the server
  4. Ask Claude to read a file using the MCP tool
  5. Show the JSON-RPC messages flowing between client and server
  6. Disconnect and show how the tools disappear from Claude’s context
Notes: The demo uses the reference filesystem server. Show the config JSON so students understand how to set up MCP in their own Claude Desktop installation.
Lesson 12 · Slide 8

Lab & Homework

Lab Exercises

  1. MCP Client — connect to an MCP server and list its tools
  2. Tool Call — call a tool via the MCP protocol
  3. Server Survey — research 5 popular MCP servers and document their capabilities

Homework Tasks

  1. Install and configure 3 MCP servers in Claude Desktop
  2. Design the schema for your own MCP server
  3. Write an explanation of Tool vs Resource vs Prompt
1 / ?