Skip to content
Conduit

mcp server

mcp-architecture-course

Companion code for the Udemy course: MCP Architecture — Production-Grade Model Context Protocol Systems

josyulank4/mcp-architecture-coursecommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 22, 2026

MCP Architecture — Course Code

Companion code for MCP Architecture: Production-Grade Model Context Protocol Systems (Udemy Course 3) by Naveen Kumar Josyula.

Every demo is small, self-contained, and runs offline with no API keys: Python standard library only. The protocol demos model the real Model Context Protocol message flow (JSON-RPC 2.0) faithfully, so what you read here is what a production SDK puts on the wire.

Requirements

  • Python 3.11+
  • No third-party packages (requirements.txt is intentionally empty: the standard library is the whole dependency list)

How to run each demo

Run from the repo root:

SectionCommandWhat it shows
Protocol (Lesson 1)python -m protocol.mini_mcpA complete MCP-style session: initialize handshake, capability exchange, tools/list discovery, two tools/call invocations, ping
S3 · First serverpython -m server.first_serverServer anatomy (transport, dispatcher, handlers, registry); one tool end to end; Lesson 13's three failure modes (missing argument, wrong type, upstream failure) with errors as values
S4 · Tools in depthpython -m tools.tool_designSchema validation that teaches the model to retry; argument-validity measurement; idempotency keys and dry-run previews; long-running job handles with progress and cancellation
S5 · Resources & promptspython -m resources.resources_promptsResource tree with URI templates, subscriptions, pagination and a read audit log; versioned prompt templates with completion; bounded sampling/elicitation; roots
S6 · Transportspython -m transports.transportsThe same server core over real stdio (child process; diagnostics on stderr) and streamable HTTP (session header, Origin check)
S7 · Enterprisepython -m enterprise.enterpriseLegacy facade pattern; allow-listed parameterized database queries with row caps and audit; a paginated SaaS ticketing API wrapped into clean tools; document boundary scanning; credential vault + redaction + per-tool delegation
S8 · Clients & hostspython -m clients.clientClient lifecycle and discovery; multi-server host with namespaces, collision detection, selection pressure; approval gate with scoped, expiring remembered approvals
S9 · Securitypython -m security.securityTool-description poisoning scan; definition pinning vs rug pulls; OAuth-style token hygiene (audience, scopes, expiry; confused-deputy refused); sandbox policy; the Lesson 41 prompt-injection demo through the full defense stack
S10 · Evaluationpython -m evaluation.harnessContract tests, golden tasks with metrics (selection accuracy, argument validity, completion), a baseline comparison, and a pass/fail release gate; failure-trace classification
S11 · Operationspython -m operations.operationsPer-call telemetry with correlation ids and latency percentiles; latency/cost budgets as contracts; mechanical schema-evolution classification (additive vs breaking); kill switches and an incident flow
S12 · Governancepython -m governance.governanceTool catalog with trust tiers; review-board admission as policy-as-code; the capstone production-readiness review with go/no-go verdicts

Validation

python validate.py runs every demo end to end as a subprocess, checks the expected output markers, and adds direct assertions per section (handshake ordering, error taxonomy, no-leak guarantees, gate behavior, readiness verdicts). It exits non-zero if anything fails. Current status: PASS (74 checks).

↑↓ navigate openesc close