Skip to content
AdminKit

Transport security (MCP)

What is Transport security (MCP)?

MCP transport security is the set of protections the Model Context Protocol specification requires per transport: the OS process boundary and environment credentials for stdio, and Origin validation against DNS rebinding plus authentication for Streamable HTTP. AdminKit's guide to securing an MCP server covers why HTTP-based transports need auth that stdio can skip.

By AdminKit team, Netbase JSC · Updated

MCP transport security refers to the protections the Model Context Protocol specification — part of the protocol Anthropic introduced to standardize how applications connect context and tools to an LLM — requires for exchanging messages, which differ by transport. For stdio, where a client spawns the server as a local subprocess, the specification treats the operating system’s process boundary as the trust mechanism and expects credentials from the environment rather than a network auth flow. A stdio-spawned server’s filesystem access can be scoped further still by roots, the client-advertised directories a well-behaved server should stay within — though that’s an advisory signal the server has to honor voluntarily, not an enforced part of the process boundary itself. For Streamable HTTP, the specification’s security guidance is explicit: a server MUST validate the Origin header on incoming connections to prevent DNS rebinding attacks, SHOULD bind only to localhost rather than all interfaces when running locally, and SHOULD implement authentication — without which an attacker’s web page could use DNS rebinding to reach a server a user only intended to run locally. The Origin header itself is defined in RFC 6454, the web origin concept, and names the scheme, host and port of the origin that caused the browser to send a request — which is what lets a server recognize a request triggered by an attacker’s page. Treating every transport as equally exposed, or skipping the specification’s security guidance because a server ‘just runs locally,’ is a common and avoidable gap.

AdminKit groups transport security (MCP) under its AI agents & MCP cluster — browse the AdminKit glossary index for other related terms.

Frequently asked questions

What must a Streamable HTTP MCP server validate to prevent DNS rebinding?

The Origin header on incoming connections -- the specification says a server MUST validate it to stop an attacker's web page from reaching a server a user only intended to run locally.

What's the trust mechanism for the stdio transport?

The operating system's process boundary, with the specification expecting credentials to come from the environment rather than a network auth flow.

Should a locally running Streamable HTTP server bind to all network interfaces?

No -- the specification says it SHOULD bind only to localhost when running locally, reducing exposure to other hosts on the network.