Localhost binding: definition and example
Localhost binding is the practice of having a server listen only on the loopback address, 127.0.0.1, instead of all network interfaces. For a local Streamable HTTP MCP server it keeps other hosts on the network from connecting. It does not stop other processes on the same machine or a rebinding attack, so Origin checks and tokens are still needed.
Facts read on .
Example
The Streamable HTTP spec says that when running locally, servers should bind only to localhost (127.0.0.1) rather than all network interfaces (0.0.0.0).
Sources
- MCP specification 2026-07-28: Streamable HTTP (modelcontextprotocol.io), read