Module 03 · Model Context Protocol Basics
What MCP Actually Solves and Why It Matters in 2026
Open lesson + course map
On this lesson
Course outline
Module 1 · Claude Code Fundamentals
Module 2 · CLI Workflows
Module 3 · Model Context Protocol Basics
Module 4 · Building an MCP Server
MCP provides a shared protocol for hosts to connect model applications with servers exposing tools, resources, and prompts. It reduces one-off connector work and supports capability negotiation. It does not guarantee server quality, authorization, privacy, or correct tool use.
// concept
Map the Components
- Host: application coordinating model, user consent, and policy.
- Client: one connection managed by the host for a server.
- Server: focused provider of declared capabilities.
- Tool: callable operation.
- Resource: addressable context/data.
- Prompt: reusable message template exposed by a server.
The host should maintain isolation and share only necessary context. A server should not automatically see the full conversation or other servers.
// concept
Decide Whether MCP Helps
MCP is valuable when several compatible hosts need a stable integration, when capabilities benefit from discovery, or when a focused server can isolate access. A direct library/API call may be clearer for one internal workflow. Do not add a protocol layer without an operating benefit.
Version the protocol, SDK, server capabilities, and your client assumptions. Reject undeclared or changed capabilities until reviewed.
// worked_example
Worked Example
A Pakistani agency has an approved knowledge search service used by Claude Code and an internal support app. One MCP server exposes search_articles and versioned resources, while both hosts retain their own model policy and approval UI.
The server cannot send replies or read customer records. Reusing the protocol removes duplicate integration code without expanding authority.
// failure_cases
Failure Cases to Diagnose
6 cases to diagnose
MCP called a secure tunnel
authorization and transport still need design.
Server exposes generic SQL/shell
narrow its capabilities.
Host shares full conversation
minimize context.
Prompt treated as trusted policy
server text cannot grant authority.
Protocol version ignored
negotiate and test compatibility.
Direct API would be simpler
record the actual reuse benefit.
// concept
Operator Note
Maintain a capability inventory per server and compare it during upgrades. The inventory should name primitive, schema version, whether it reads or writes, required scope, data classification, and approving owner. A newly discovered write tool is a security change even if the package version calls it a minor feature. Disable the server until the change has been reviewed and acceptance-tested.
// pakistan_angle
Pakistan Angle
MCP can help Pakistani agencies package repeatable read-only connectors for catalogs, approved documents, or ticket systems. Keep every client tenant isolated and disclose any remote processing.
Do not expose bank, tax, CNIC, payroll, medical, or customer datasets through a general MCP server. Build a minimized service with qualified review where needed.
// hands_on
Hands-On Exercise
5 steps
Draw host, client, and server for one workflow.
Classify each capability.
Compare MCP with direct integration.
Define version and compatibility tests.
Remove any unnecessary context or write access.
// completion_rubric
Completion Rubric
6 checks — tick as you verify
// sources
Sources
2 official sources — check every claim yourself
// check_yourself
Check yourself
3 questions · answers and options are taken word-for-word from this course
1 / 3 · diagnose
Your work shows this failure mode: “Direct API would be simpler.” What does the lesson tell you to do about it?