KatalockAi AcademyBack to KatalockAi
Capstone 13, counts toward Phase 18

Stateless MCP server with registry and governance

Build a stateless Streamable HTTP MCP server with live discovery, registry metadata, per-call authorization, action-bound approvals, audit and an evidence pack proven on the real wire.

about 25 h Earns its own certificate Reviewed against a 7-point rubric
Submit your project Get coached by Professor Katalock

The capstone and what it builds on

  1. 1Stateless MCP Server with Registry and GovernanceThe capstone brief
  2. 2MCP Transports: stdio and Stateless Streamable HTTPPhase 13: Tools and protocols
  3. 3MCP Authorization: CIMD, Issuer Binding, PKCE, and Step-UpPhase 13: Tools and protocols
  4. 4Stateless MCP Gateways and Registry AdmissionPhase 13: Tools and protocols
  5. 5MCP Auth in Production: Issuer-Bound Enrollment and TokensPhase 13: Tools and protocols
  6. 6MCP Tool Contracts and ContentPhase 13: Tools and protocols
  7. 7MCP Reliability, Cancellation, and Flow ControlPhase 13: Tools and protocols
  8. 8MCP Registry Supply Chain: Admission, Drift, and RollbackPhase 13: Tools and protocols
  9. 9MCP Conformance Engineering: Versioning, Evidence, and OperationsPhase 13: Tools and protocols

What You'll Build

A production-shaped MCP server targeting protocol revision 2026-07-28: no sessions, protocol context in every request, server/discover, deterministic cache-aware tools/list, and policy-gated tools/call. It publishes a server.json, detects drift between the published record and the live process, validates tokens on every call, binds approvals to exact actions, writes redacted audit records, and runs as two interchangeable replicas behind a proxy.

Requirements

  1. A server.json with name inside your verified reverse-DNS namespace, version, description and a streamable-http remote; validated against the pinned official schema (or mcp-publisher), with secrets only as declared inputs.
  2. server/discover returning supported versions, capabilities and server identity; an unsupported protocol version string returns -32022 with {supported, requested}, a missing or non-string version returns -32602.
  3. Stateless envelope: every request carries protocol version, client capabilities and client info in params._meta; every result includes resultType: "complete" and server identity; no initialize handshake or session ids anywhere.
  4. Tool surface: two read-only tools and one state-changing tool, each with a bounded JSON Schema, honest annotations and deterministic result shape; invalid arguments return a tool error without running the handler.
  5. tools/list returns byte-stable order with ttlMs and cacheScope (private when visibility depends on the caller).
  6. Streamable HTTP: one POST endpoint, mirrored MCP-Protocol-Version, Mcp-Method and Mcp-Name headers checked against the body (mismatch returns -32020 before policy or tool code runs), Origin validation and loopback binding for local dev.
  7. Authorization on every call: issuer, audience or resource, expiry and scope checked; a token for the read-only server fails on the state-changing one.
  8. Policy decision per call plus approval records bound to actor, tool, canonical argument digest, server URL and expiry; changing one argument makes the approval fail before the handler.
  9. Registry vs runtime drift report: compare the published record (name, version, remote URL) with the live server/discover result and report exact differences.
  10. Audit records with actor, issuer, tool, decision, request id, trace context, latency and outcome; sensitive arguments redacted or digested; sink kept out of model context.
  11. Two replicas behind a proxy (nginx, Caddy or Envoy) handling at least 100 concurrent requests with no affinity, plus cancellation, timeout, safe read retry and an idempotency key on the mutation.
  12. Evidence pack covering wire, proxy, admission, retry and rollback, with a digest of the redacted pack stored in the repo.

Constraints

  • No LLM is required; the server is the deliverable. If you add an LLM client for demos, Model-agnostic: any OpenAI-compatible endpoint (including the KatalockAi API) or a local model (for example via Ollama, llama.cpp or vLLM) may be used. No named commercial model is required; record which model you used in the README.
  • Hardware: a laptop with Docker Compose. Any implementation language is fine.
  • Substitution: publishing to the public MCP Registry and a corporate OAuth provider are not required. A private registry adapter (a small API or static index you host) and a local issuer (Keycloak in Docker, or a test issuer with keys you generate) are accepted, as long as tokens are really validated.
  • The lesson's local reference models may be studied, but the submission must be your own implementation exercised over real HTTP, with raw headers and bodies captured.

Stretch Goals

  • Break a request-scoped SSE response mid-stream and prove retry uses a new request id with no Last-Event-ID replay.
  • Replace hidden process memory with an explicit shared handle for a multi-call workflow and route calls to alternating replicas.
  • Add an SDK differential check comparing your server's responses with an official SDK client's expectations.

How to Submit

  • Public GitHub repo with server/, server.json, registry/ (adapter and drift check), auth/, policy/, deploy/ (compose file, proxy config), conformance/ (golden and negative cases), evidence/ (redacted pack and digest) and README.md.
  • README: architecture, how to run the replicas and the conformance suite, the auth and approval model, drift report example, load and reliability results and limitations.
  • Paste the conformance suite output, the drift report, the concurrency test summary and the evidence pack digest.

How It's Reviewed

Professor Katalock reads your repository and the evidence you paste, and scores each criterion out of 100. You pass with a weighted total of 70 or more and no criterion below 40. A copied or padded submission is flagged and fails.

CriterionWeightHow it's checked
Protocol correctness20Conformance suite against the running server covers metadata, discover, resultType, header mismatch -32020, version -32022 and -32602, and notification handling, with raw wire captures.
Authorization15Issuer, audience, expiry and scope cases pass and fail correctly; approval replay with a changed argument is rejected before the handler.
Registry integrity15server.json validated against the pinned schema; namespace check; drift report shows exact differences against live discover.
Policy and safety15Allow, deny, malformed argument, stale approval and sensitive-data cases demonstrated.
Scale and reliability15Two replicas behind a proxy, 100 or more concurrent requests without affinity, cancellation, timeout, safe retry and idempotency evidence.
Auditability and test structure10Redacted audit records with trace context; tests are organised and runnable from one command.
README: design decisions and limitations10README explains statelessness, cache scope and approval design choices, what failed in the learner's own conformance runs and remaining gaps.

Submit

Push your work to a public GitHub repository with a README that explains how to run it, then paste the evidence below. Up to 3 reviews a day, free.

  • Conformance suite output (golden and negative cases) with a few redacted raw request and response captures
  • Registry vs runtime drift report from a deliberate mismatch
  • Concurrency and reliability test summary across two replicas
  • Audit log excerpt showing a denied call and an approved state-changing call
  • Digest of the redacted evidence pack and a list of its five evidence classes

Reviews are done by AI against the rubric above. They check the evidence in your repository; they are not a substitute for a human code review, and a review can be wrong. If you think it is, improve the README so the evidence is unmistakable and resubmit.