MCP Fundamentals — Primitives, Lifecycle, JSON-RPC Base

Every integration before MCP was a one-off. The Model Context Protocol, first shipped by Anthropic in November 2024 and now stewarded by the Linux Foundation's Agentic AI Foundation, standardizes discovery and invocation so any client can speak to any server. The 2025-11-25 spec names six primitives (three server, three client), a three-phase lifecycle, and a JSON-RPC 2.0 wire format. Learn those and the rest of the MCP chapter of this phase becomes reading.

Learn 45 min Python (stdlib, JSON-RPC parser)

Prerequisites: Phase 13 · 01 through 05 (the tool interface and function calling)

#Learning Objectives

  • Name all six MCP primitives (tools, resources, prompts on the server; roots, sampling, elicitation on the client) and give one use case each.
  • Walk through the three-phase lifecycle (initialize, operation, shutdown) and state who sends which message at each phase.
  • Parse and emit JSON-RPC 2.0 request, response, and notification envelopes.
  • Explain what capability negotiation at initialize is and what breaks without it.
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.