QDNA Send a message

Securing the Model Context Protocol (MCP) in production: Streamable HTTP, authorization boundaries and OpenBao vault

The 2026-07-28 MCP specification connects AI agents to enterprise tools over stateless HTTP requests. In production, security belongs in deterministic server code rather than instructions inside the system prompt. Five visual plates break down transport hardening, OAuth 2.1 boundaries, OpenBao secrets and correlated logs.

Screenshot of the official Model Context Protocol 2026-07-28 specification announcement on blog.modelcontextprotocol.io covering stateless transport and authorization hardening.
Official MCP 2026-07-28 specification announcement captured on 22 November 2026 at 12:05 UTC. Source: blog.modelcontextprotocol.io.
Short answer. Securing MCP in production requires stateless Streamable HTTP servers, audience-validated OAuth 2.1 tokens (RFC 9068) and zero token passthrough to downstream internal APIs. Credentials stay outside local JSON configuration files inside OpenBao. Every tool call crosses a deterministic policy gate, a closed allowlist and correlated telemetry.

How does stateless Streamable HTTP work in MCP 2026-07-28?

The MCP 2026-07-28 specification retires persistent transport sessions and builds Streamable HTTP on independent requests behind standard load balancers. Mandatory Mcp-Method and Mcp-Name headers drive gateway routing and rate limits without replacing JSON-RPC payload validation. Servers validate the Origin header and replace transport sessions with explicit state handles.

Architecture diagram of stateless MCP 2026-07-28 Streamable HTTP connecting an AI client, a WAF gateway and replicated MCP servers.
Stateless Streamable HTTP pipeline in MCP 2026-07-28, combining header routing, audience verification and MRTR approval flows.

Which OAuth 2.1 authorization boundaries apply to remote MCP servers?

Remote MCP servers publish Protected Resource Metadata under RFC 9728 and replace deprecated dynamic client registration with Client ID Metadata Documents (CIMD). Clients verify the RFC 9207 iss parameter before redeeming authorization codes to prevent issuer mix-up attacks. Every access token enforces a dedicated server audience (RFC 9068) with zero downstream passthrough.

Four-step diagram of MCP OAuth 2.1 authorization boundaries: RFC 9728 discovery, CIMD client identity, RFC 9207 validation and issuer-bound tokens.
OAuth 2.1 authorization boundary chain for remote MCP endpoints and server-enforced access rule confirmed by arXiv:2611.21259.

Why isolate secrets outside local configuration files in OpenBao?

Writing plaintext API keys inside local JSON configuration files for stdio MCP servers exposes credentials on every workstation. The local configuration stores only a reference while OpenBao holds the secret value and issues a short-lived lease at launch, without replacing OAuth 2.1 over remote HTTP. Sandboxed processes start without ambient credentials and block outbound requests to link-local metadata endpoints.

Screenshot of the official OpenBao website (Linux Foundation OpenSSF) introducing the open-source secrets manager.
Official OpenBao homepage (Linux Foundation OpenSSF open-source secret vault) captured on 22 November 2026 at 12:05 UTC. Source: openbao.org.

Which five deterministic guardrails protect MCP tools in production?

Experiments in arXiv:2611.21259 demonstrate that system prompt instructions break under indirect prompt injections and malicious tool chaining. Five deterministic code guardrails close that attack surface: OpenBao leases, split read and write surfaces, untrusted output quarantine, correlated traces and kill-switches. Tool schemas stay cryptographically pinned with one-shot approvals and fail-closed defaults.

Five production MCP guardrail pillars: OpenBao secrets, read versus write separation, anti-injection quarantine, VictoriaLogs traces and kill-switch.
Five deterministic controls enforced by server code around MCP tools, implemented alongside our SAR agentic architecture.

How should MCP calls be logged in VictoriaLogs with a kill-switch?

Every tool call propagates OpenTelemetry trace context inside request metadata to link incoming prompts and downstream effects in append-only VictoriaLogs storage. Spans record method, tool name and error status without ever persisting raw arguments or outputs containing personal data or secrets. Call budgets and a kill-switch immediately halt runaway loops while revoking active leases.

Screenshot of the official VictoriaLogs documentation showing OpenTelemetry log shipping into VictoriaLogs and Read API outputs to alerting, vmui and Grafana.
Official VictoriaLogs documentation (OpenTelemetry ingestion and alerting / vmui outputs) captured on 22 November 2026 at 12:05 UTC. Source: docs.victoriametrics.com.

Official sources

Sources: official MCP 2026-07-28 specification announcement, MCP 2026-07-28 authorization specification, arXiv:2611.21259 on agentic authorization and trust boundaries, RFC 9207 (OAuth 2.0 Authorization Server Issuer Identification), RFC 9068 (JWT Profile for OAuth 2.0 Access Tokens) and OpenBao documentation. See also our private MCP servers sheet, our 2026 local AI hardware comparison and our guide to EU AI Act duties for local open-weight servers.

Frequently asked questions

Are Mcp-Method and Mcp-Name headers enough to authorize an MCP call?

No, those HTTP headers only drive gateway routing, filtering and rate-limiting before body inspection. The MCP server must confirm header consistency against the JSON-RPC payload and reject any mismatch. Real authorization always requires an OAuth 2.1 token bound to the target server audience.

Does OpenBao replace OAuth 2.1 for an MCP server?

No, each mechanism governs a distinct transport regime. For remote Streamable HTTP servers, the specification requires OAuth 2.1 with RFC 9728 discovery and RFC 9207 issuer validation. For local stdio servers, OpenBao removes plaintext keys from JSON configuration files by injecting short-lived leases at process launch.

Why does a system prompt fail to stop indirect prompt injection?

A language model does not enforce a formal separation between system instructions and untrusted data returned by external tools. Experiments in arXiv:2611.21259 demonstrate that adversarial payloads trigger unauthorized tool calls whenever guardrails stay inside the prompt. Only deterministic policies enforced by server code establish a reliable boundary.