AI Agent - Aug 6, 2026

MCP HTTP Headers, Caching, and Observability Guide

Quick answer

MCP 2026-07-28 makes Streamable HTTP easier to govern at the gateway. POST requests expose method and target name through required Mcp-Method and Mcp-Name headers alongside protocol-version signaling. Header values mirror the JSON-RPC body; a mismatch produces HeaderMismatchError code -32020.

Cacheable list and read results require ttlMs and cacheScope. These are freshness and sharing controls, not permission grants.

Gateway control surface

FieldUseSafety check
Mcp-Protocol-VersionVersion routing and auditMatch the request metadata and supported version
Mcp-MethodMethod-aware policyMatch the JSON-RPC method
Mcp-NameTool, prompt, or resource policyMatch the body target and avoid leaking sensitive names
ttlMsClient freshness hintBound stale-use risk and refresh behavior
cacheScopepublic or private sharing boundaryNever share tenant-specific data through a public cache
Trace context in _metaPropagate traceparent, tracestate, and baggageFilter sensitive baggage and preserve trust boundaries

The spec also recommends deterministic tools/list ordering to improve client caching and prompt-cache hit rates.

Implementation checklist

  1. Reject header/body mismatches before dispatch.
  2. Authorize on verified identity and resource scope, not on a client-controlled name alone.
  3. Rate-limit by tenant, method, name, and cost class.
  4. Set cacheScope: "private" for user- or tenant-specific results.
  5. Treat ttlMs as a maximum freshness hint, not proof that the underlying source is unchanged.
  6. Redact sensitive header and trace fields from logs and exports.
  7. Test proxies for casing, duplicate headers, oversize values, and downgrade behavior.

Use the server discovery guide for version selection and the stateless compatibility guide for rollout.

Frequently asked questions

Which headers are required?

The changelog requires Mcp-Method and Mcp-Name on Streamable HTTP POST requests and documents protocol-version signaling.

What is the mismatch error?

HeaderMismatchError, code -32020 in the 2026-07-28 revision.

Can public cache scope expose private data?

It can if assigned incorrectly. Determine scope from reviewed server policy, never from untrusted client input.

Official sources

Source check: August 6, 2026. Verify final transport schema, header requirements, cache semantics, and error codes.