Claude Code & MCP Masterclass
0/15 complete

Module 03 · Model Context Protocol Basics

What MCP Actually Solves and Why It Matters in 2026

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

  1. Draw host, client, and server for one workflow.

  2. Classify each capability.

  3. Compare MCP with direct integration.

  4. Define version and compatibility tests.

  5. Remove any unnecessary context or write access.

// completion_rubric

Completion Rubric

6 checks — tick as you verify

0/6

// sources

Sources

// check_yourself

Check yourself

3 questions · answers and options are taken word-for-word from this course

0/3
  1. 1 / 3 · diagnose

    Your work shows this failure mode: “Direct API would be simpler.” What does the lesson tell you to do about it?