Why this matters: Build modern MCP integrations as independently valid requests that cross explicit trust boundaries. Use discovery when it solves a real selection or compatibility problem; use headers for efficient, verified routing; use explicit application handles for cross-call business state; and keep authorization, approval, validation, and idempotency in host/server application controls rather than in model text or protocol metadata.

Architecture diagram of current stateless MCP roles and a faded legacy session-based lifecycle.

What you will be able to do

  • Construct a conformant 2026-07-28 request envelope and Streamable HTTP header set.
  • Explain when server/discover is useful and when an inline request is the simpler design.
  • Separate protocol statelessness from application state, authorization state, and idempotency state.
  • Use MRTR for request-scoped client input and subscriptions/listen for opt-in change signals without assuming replay or a general callback channel.“,`Distinguish modern requirements from legacy compatibility behavior and select an explicit migration/fallback policy.“,`Design gateway routing that gains operational value from mirrored headers without trusting them before validation.`

1. Reframe the broken integration as a boundary design

Decision first: LedgerLift’s team believes it can simply delete its session store, put three server replicas behind a load balancer, and let the model call approve_expense. That would improve deployment elasticity but could make approval unsafe: a model-generated amount, employee ID, or opaque identifier is not authorization. Your job is to redesign the integration boundary so a request is independently understandable and independently enforceable.

For the current 2026-07-28 specification, the protocol-level session and the Mcp-Session-Id header are removed. The old initialize / notifications/initialized lifecycle is likewise absent from the modern wire behavior. This is a protocol change, not permission magic: OAuth access tokens, server-side authorization checks, approval workflows, database transactions, and audit logs remain application/security responsibilities. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/changelog.mdx?utm_source=openai))

Frame the roles before writing traffic:

  • Model reasoning/text: proposes an action and may select a tool; it is untrusted with respect to authorization and business truth.
  • Host/application: owns user interaction, credentials, approval UI, policy, retries, and final presentation.
  • MCP client: serializes protocol messages, declares only capabilities it actually supports for this request, and manages transport/version behavior.
  • MCP server: advertises and implements capabilities, validates inputs, performs authorization, calls downstream systems, and returns structured results.
  • External expense system: is the system of record; it needs a separate, least-privilege service credential and an idempotent mutation interface.

2. Specify a self-describing call and a gateway policy

Construct the modern request envelope. A modern JSON-RPC request has its ordinary method and parameters, plus mandatory request metadata:

  • _meta["io.modelcontextprotocol/protocolVersion"] = "2026-07-28" — required on every request.
  • _meta["io.modelcontextprotocol/clientCapabilities"] — required on every request; use {} when no optional capability is supported. The server must not infer support from a previous request.
  • _meta["io.modelcontextprotocol/clientInfo"] — SHOULD be sent, but is self-reported diagnostic/display information; never use it for trust decisions.
  • Optional request-scoped metadata includes a progress token and documented distributed-tracing context. Use namespaced custom metadata; reserved MCP prefixes are not yours to redefine.

For Streamable HTTP, every POST also requires MCP-Protocol-Version, whose value must equal the request’s _meta protocol version. Mcp-Method mirrors the JSON-RPC method for all requests. Mcp-Name mirrors params.name or params.uri for tools/call, prompts/get, and resources/read. A server must reject missing, malformed, or mismatched mirrored values with HTTP 400 and the HeaderMismatch JSON-RPC error. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2026-07-28/schema.ts?utm_source=openai))

Specify this safe approval call at the interface level; token acquisition and the exact SDK API are intentionally host- and SDK-version-specific:

POST /mcp
Authorization: Bearer <user-bound access token>
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: approve_expense

{"jsonrpc":"2.0","id":"req-104","method":"tools/call","params":{"name":"approve_expense","arguments":{"expenseId":"exp_481","approvalNote":"Receipt and policy category verified","idempotencyKey":"host-generated-uuid"},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"ledgerlift-host","version":"3.4.0"}}}}

The gateway may route this by Mcp-Method/Mcp-Name, but it must not decide that the caller may approve exp_481 merely because those headers say so. The server must validate header/body agreement, validate the schema, obtain the authenticated principal from verified credentials, check entitlement and expense ownership/role, and enforce the amount-based approval policy.

3. Plan discovery, capabilities, and explicit state

Choose discovery deliberately. Modern servers implement server/discover. It returns supported protocol versions, capabilities, optional instructions, cache hints, and server identity in response _meta["io.modelcontextprotocol/serverInfo"]. A client does not need discovery before every normal RPC: it may issue the desired modern request and handle an unsupported-version response. Discovery is useful when the host must display available capabilities before enabling a server, when it wants an explicit version choice, or when stdio needs a clean modern-versus-legacy probe. Server identity remains self-reported and is not a security credential. ([modelcontextprotocol.io](https://modelcontextprotocol.io/specification/draft/server/discover))

For LedgerLift, call discovery during connection setup, cache it only according to its ttlMs/cacheScope, and use the advertised capability contract to decide whether the host exposes the server in its UI. Do not treat instructions as trusted policy; they are natural-language guidance that could be stale or malicious if the server is untrusted.

Capability contract:

Surface Contract and control Host behavior
tools/list Return deterministic, cacheable catalog; tool schema marks required fields and side-effect semantics. Invalidate/refetch when notified or TTL expires; do not assume a cached tool remains authorized.
approve_expense Input accepts only expense ID, bounded note, and idempotency key. Server derives actor from token, not arguments. Show a confirmation summary for consequential action; generate and persist retry-safe key.
get_expense Read is separately authorized and output-filtered for the caller. Use it to show the exact reviewed record before approval.

If the server needs to carry business state across calls—such as a draft approval bundle—mint a narrowly scoped, expiring server handle and pass it as an ordinary, schema-validated argument. This is explicit application state, not a revival of the retired MCP session. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/changelog.mdx?utm_source=openai))

4. Implement MRTR and subscriptions without recreating a session

Replace “server calls the client later” with bounded protocols. In the legacy era, a server could send JSON-RPC requests back over a persistent channel. In 2026-07-28, a handler for tools/call, prompts/get, or resources/read can return an input_required result (MRTR) containing named input requests and an opaque requestState. The client gathers permitted input—perhaps via a host approval dialog—and retries the original operation with inputResponses plus the unchanged requestState. The server validates both again and completes or requests additional input. This makes the continuation portable across replicas, but it does not make the state trustworthy: sign, encrypt, or server-store and bind it to the actor, action, expiration, and intended expense. ([blog.modelcontextprotocol.io](https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/?utm_source=openai))

For a $750 approval, return an MRTR request for a host-collected confirmation rather than trusting model prose. On retry, require: same authenticated subject, same expense/version, unexpired continuation, confirmation=true, and the same idempotency key. Commit exactly once; if the network fails after commit, a retry must return the stored outcome rather than creating another approval.

Subscriptions are different. subscriptions/listen is the modern, opted-in long-lived notification stream. The client requests specific notification categories; the server first acknowledges the subset it will honor. Events are level-triggered (“something changed; refetch if needed”), so maintain bounded deduplication and refetch authoritative data after a lost stream. Do not use a subscription as a guaranteed audit feed, a replay log, or an authorization channel. ([py.sdk.modelcontextprotocol.io](https://py.sdk.modelcontextprotocol.io/v2/api/mcp/client/subscriptions/?utm_source=openai))

5. Compare traces and deploy with explicit compatibility policy

Migrate by identifying the era at the edge. The legacy family runs through 2025-11-25; it starts with initialize, may use Mcp-Session-Id, GET/DELETE session behavior, resumable SSE details, and server-to-client requests. These are backward-compatibility concerns, not recommended foundations for a new server. A modern-only Streamable HTTP endpoint returns 405 for legacy GET/DELETE, ignores a supplied Mcp-Session-Id rather than minting/echoing one, and does not resume streams via Last-Event-ID. HTTP+SSE is deprecated; new deployments should use Streamable HTTP. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/basic/transports/streamable-http.mdx))

A dual-era client must not blindly downgrade after any HTTP 400. Modern servers also use 400 for unsupported protocol versions, missing required client capability, and header mismatch. Inspect the structured error: correct a modern request or select an advertised supported version; fall back to legacy only when the response indicates an older peer under the specified compatibility flow. For stdio, use server/discover as the compatibility probe and fall back to initialize only on an appropriate “method not found” legacy signal. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/basic/transports/streamable-http.mdx))

SDK warning: SDK defaults are not protocol defaults. For example, the current TypeScript v2 guidance says a manually constructed client/server remains legacy unless version negotiation/modern support is explicitly enabled; its auto mode probes discovery and can fall back, whereas pinning 2026-07-28 refuses fallback. Verify your selected Tier 1 SDK release and its current migration documentation before translating this lesson into concrete code. ([ts.sdk.modelcontextprotocol.io](https://ts.sdk.modelcontextprotocol.io/v2/migration/support-2026-07-28))

Applied Practice: Repair LedgerLift’s Approval Route

Scenario: Fictional scenario — LedgerLift is migrating an internal expense-approval MCP server from the 2025 handshake era to 2026-07-28. Its gateway currently routes every request using Mcp-Session-Id and exposes approve_expense to all authenticated employees. The new design must run behind round-robin HTTP routing, allow a server to request a human confirmation for approvals above $500, and ensure that an employee cannot approve another employee’s expense by changing a tool argument.

<p><strong>Deliverables (add these to your MCP Systems Build Portfolio):</strong></p><ol><li><strong>Boundary brief (one page):</strong> name the host, MCP client, gateway, MCP server, expense API, user identity provider, and audit store. Mark which component sees the bearer token, which receives untrusted model text, and which may execute approval.</li><li><strong>Wire artifact:</strong> write a complete <code>tools/call</code> request for <code>approve_expense</code> with correct 2026-07-28 <code>_meta</code> and HTTP headers. Write three negative variants: missing <code>Mcp-Name</code>, mismatched <code>Mcp-Name</code>, and mismatched protocol-version header/body. State the expected rejection.</li><li><strong>Discovery decision record:</strong> decide whether LedgerLift calls <code>server/discover</code> on first connection. Include its benefit, caching rule, and why discovery response identity/instructions are not a trust root.</li><li><strong>MRTR trace:</strong> draw request → <code>input_required</code> → host confirmation → retry → complete. Define the continuation binding: subject, expense ID/version, action, expiry, and idempotency key.</li><li><strong>Migration and test matrix:</strong> cover modern-only HTTP, legacy-compatible client fallback, stdio probe behavior, bad header/body mirror, expired continuation, changed-expense retry, unauthorized actor, lost subscription stream, and post-commit retry.</li></ol><p><strong>Self-review:</strong> Can a malicious model alter <code>expenseId</code> or <code>approvalNote</code> to expand privilege? It should not: the server must derive the actor from verified authentication, check access to the exact record, enforce policy from authoritative data, and treat model/tool arguments as validated input only. Can a retry approve twice? It should not: the idempotency key and durable result record must make the mutation exactly-once from the caller’s observable perspective. Can the gateway be fooled by an HTTP header? It should not route/authorize on a claimed modern header until the version-aware server/body validation contract is in force.</p><p><strong>Portfolio handoff:</strong> attach the brief, raw traces, capability contract, authorization decision table, test results, SDK/version configuration, dashboard fields (request ID, tool name, authenticated subject, authorization result, idempotency outcome, MRTR stage, and error code), and named operational owner. This becomes reusable evidence for later Decision Labs—not a claim that the fictional system has been deployed or independently security-audited.</p>

Self-review checklist

  • I placed io.modelcontextprotocol/protocolVersion and io.modelcontextprotocol/clientCapabilities in every modern request _meta object.
  • For Streamable HTTP, I mirrored the version in MCP-Protocol-Version and supplied Mcp-Method plus the applicable Mcp-Name.
  • I treat clientInfo and serverInfo as display/debug metadata, not identity, authorization, or policy evidence.
  • I documented whether the client calls server/discover, and I can explain why that extra round trip is or is not worth it.
  • I replaced hidden protocol-session state with an explicit, scoped application handle or an MRTR requestState continuation where appropriate—not with an untrusted client-created correlation ID as authorization evidence.“,`I validate gateway-visible headers against the JSON-RPC body before routing or policy enforcement, and reject old/unknown protocol versions at that boundary.“,`I designed approve_expense as a server-authorized, idempotent, auditable operation with an approval rule and duplicate-action protection.“,`I have modern, legacy-compatibility, malformed-header, authorization-denial, MRTR-retry, and subscription-loss test cases.“,`I recorded the chosen protocol revision, SDK version/opt-in, transport behavior, ownership, and rollback strategy in my portfolio handoff package.`

Key takeaways

  • The current MCP revision is 2026-07-28. Its protocol core is stateless: do not design a new integration around initialize, notifications/initialized, Mcp-Session-Id, sticky routing, or a protocol-managed session.
  • Every modern request must carry the protocol version and per-request client capabilities in params._meta. On Streamable HTTP, MCP-Protocol-Version must match the _meta protocol-version value; Mcp-Method is required for every POST and Mcp-Name is required for named operations such as tools/call.
  • server/discover is implemented by modern servers but optional for clients. It is valuable for capability display, explicit version selection, and especially for stdio clients that need a modern-to-legacy compatibility probe.
  • MRTR turns an interaction that needs client input into a retryable request/response exchange. subscriptions/listen is the deliberate long-lived stream for opted-in change notifications; neither restores a general protocol-level bidirectional session.
  • Header routing is useful only when the gateway trusts the current protocol version and the server validates header/body equality. Headers are routing and policy inputs, not proof of identity or authorization.

Useful terms

Stateless protocol core
A 2026-07-28 MCP design in which each request carries the protocol context necessary to process it; it does not prohibit the application from maintaining explicit business state.
server/discover
A modern MCP RPC through which a server reports supported versions, capabilities, optional instructions, cache hints, and self-reported identity. Servers implement it; clients invoke it when useful.
MRTR
Multi Round-Trip Requests: a server returns input_required with input requests and requestState; the client collects allowed input and retries the original operation with inputResponses and the echoed continuation state.
Mcp-Method / Mcp-Name
Required Streamable HTTP request headers that mirror the JSON-RPC method and, for named operations, the tool name/resource URI/prompt name. They support routing and policy only when validated against the body.

Research & review note

This lesson is built from source-traceable research and reviewed before publication. AI Agentic School uses AI as a research and practice tool, not as a substitute for evidence or editorial judgment.

Sources & further reading