Skip to content
VDAI with VD

Focused path

Model Context Protocol (MCP)

Build, secure, verify, and operate stateless MCP systems from JSON-RPC envelopes through conformance release gates.

Start path

Before you start

  • Python and command-line basics

    You can inspect JSON, edit a file, and run a Python command. Prior MCP or agent-framework experience is not required.

  • Python 3 for executable wire evidence

    The deterministic implementations and tests use Python 3. A TypeScript runner is optional for the second Lesson 07 implementation.

  • The Tool Interface(optional)

    Skim this lesson if typed tool calls and side-effect boundaries are new to you.

  • Tool Schema Design(optional)

    Skim this lesson if you have not designed or validated JSON Schema tool inputs.

Lessons in order

Start path
  1. 01MCP Fundamentals: Stateless Requests and JSON-RPCModern MCP has no handshake and no protocol session. Each request must carry enough metadata to be understood, authorized, routed, and retried on its own.Tools & Protocols
  2. 02Building an MCP Server: Stateless Python and TypeScriptA modern MCP server does not remember a handshake. It validates the metadata on every request, runs one handler, and returns one typed result.Tools & Protocols
  3. 03Building an MCP Client: Discovery, Routing, and Dual-Era FallbackA modern MCP client repeats its contract on every request. Its hardest compatibility decision is knowing when an old server is truly old and when a modern server is reporting a correctable error.Tools & Protocols
  4. 04MCP Transports: stdio and Stateless Streamable HTTPTransport carries MCP messages. It does not supply missing protocol state. In `2026-07-28`, local stdio and remote Streamable HTTP both carry self-describing requests.Tools & Protocols
  5. 05MCP Resources and Prompts: Addressable Context for Stateless ServersTools perform operations. Resources expose addressable content. Prompts package user-selected message templates. A good MCP server keeps those contracts separate and predictable.Tools & Protocols
  6. 06MCP Model Input: Sampling Migration and Stateless MRTRMCP 2026-07-28 deprecates Sampling for new designs and removes the server-to-client request channel. If an existing workflow still needs the client's model, the server returns an `input_required` result and the client retries the original request with the model output. The reasoning loop becomes explicit, bounded, and stateless at the protocol layer.Tools & Protocols
  7. 07Explicit Scope and Stateless ElicitationRoots are deprecated in MCP 2026-07-28 and were never a security sandbox. Put scope in visible tool arguments or resource URIs, authorize it on the server, and use MRTR when a tool genuinely needs user input. The user sees the decision, the model sees the handle, and any server instance can process the retry.Tools & Protocols
  8. 08MCP Tasks Extension: Durable Work on a Stateless CoreStateless MCP does not mean every operation must finish in one request. The official Tasks extension gives long-running work an explicit durable handle. A server can return that handle from `tools/call`, any instance can answer `tasks/get`, and client input arrives through `tasks/update` without reviving protocol sessions.Tools & Protocols
  9. 09MCP Apps on the Stateless ProtocolAn interactive result is still an MCP tool and resource exchange. The 2026-07-28 core makes that exchange self-contained, while the Apps extension adds the sandboxed browser surface.Tools & Protocols
  10. 10MCP Security: Poisoned Metadata, Routing, and MRTR StateStateless does not mean trustless. It means every request exposes the evidence a server and gateway need to validate the call independently.Tools & Protocols
  11. 11MCP Authorization: CIMD, Issuer Binding, PKCE, and Step-UpA remote MCP request is stateless, but its authorization is not anonymous. Bind every credential to the issuer that created it and every token to the resource that receives it.Tools & Protocols
  12. 12MCP Auth in Production: Issuer-Bound Enrollment and TokensLesson 16 built the OAuth 2.1 state machine. This lesson hardens its production boundaries for MCP 2026-07-28: Client ID Metadata Documents first, deprecated dynamic registration only for compatibility, authorization-response issuer validation, issuer-keyed client credentials, JWKS refresh, and audience-pinned tokens on every stateless request. **Spec note (2026-07-28):** Dynamic Client Registration is deprecated in favor of Client ID Metadata Documents. DCR remains a compatibility mechanism. When it is used, the client declares the correct `application_type`. A client validates a present RFC 9207 `iss` value and never reuses credentials across authorization-server issuers.Tools & Protocols
  13. 13Stateless MCP Gateways and Registry AdmissionA gateway should make every route explicit. The 2026-07-28 protocol gives it method, name, version, capability, identity, cache, and trace boundaries without a transport session.Tools & Protocols
  14. 14MCP Tool Contracts and ContentA tool is safe to automate only when discovery, arguments, results, pagination, and transport metadata agree on one contract.Tools & Protocols
  15. 15MCP Reliability, Cancellation, and Flow ControlA request ID correlates a message. It does not make a side effect safe, stop a worker, or protect a stream from a slow consumer.Tools & Protocols
  16. 16MCP Registry Supply Chain: Admission, Drift, and RollbackA registry entry tells you what a publisher declared. Production admission proves what you fetched, what you observed, what you approved, and what you can safely restore.Tools & Protocols
  17. 17MCP Conformance Engineering: Versioning, Evidence, and OperationsA server is not conformant because its happy path worked through one SDK. Conformance lives at the wire, at version boundaries, through intermediaries, and during rollback.Tools & Protocols

Optional

  1. 01Capstone: Stateless Tool EcosystemA production agent system is a set of boundaries, not a pile of features. This capstone separates a readable in-process simulation from the protocol clients, authorization server, sandbox, and telemetry exporter a real deployment still needs.Tools & Protocols