Phase 13: Tools & Protocols

Stateless MCP Gateways and Registry Admission

A 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. Aggregate several MCP servers behind one 2026-07-28 endpoint without session affinity. Validate per-request metadata and routing headers before policy or forwarding. Merge tools with stable namespaces, deterministic order, descriptor pins, RBAC, and private caching. Treat registry records as discovery evidence that still requires admission policy. Route request-scoped SSE, subscriptions/listen, MRTR retries, and Tasks extension calls correctly. Isolate legacy handshake and session support from the modern path. Connecting one client directly to one server is simple. A larger deployment needs a consistent answer to harder questions: Which servers are allowed? Which principal can see and call each tool? What happens when two backends expose the same name? How are descriptor changes reviewed? Where are rate limits and audit events applied? Can any instance handle the next request? A gateway sits between clients and backend MCP servers. It presents one MCP endpoint, applies cross-cutting policy, and forwards approved requests. Older gateway designs often multiplexed one client session into several backend sessions and rewrote Mcp-Session-Id. That is a legacy compatibility design. The 2026-07-28 core has no protocol sessions. For each request: Authenticate the principal from transport authorization. Validate MCP-Protocol-Version, Mcp-Method, Mcp-Name, and params.meta. Authorize the principal, resource, method,…

Stateless MCP Gateways and Registry Admission: A gateway should make every route explicit. The 2026-07-28 protocol gives it method, name, version, capability,…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.