# Localhost binding: definition and example

URL: https://mcpservercybersecurity.com/glossary/localhost-binding/
Updated: 2026-11-16

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.

## 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](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http) (modelcontextprotocol.io), read 2026-11-16

## Related pages

- [DNS rebinding](/glossary/dns-rebinding/)
- [MCP transport](/glossary/mcp-transport/)
- [MCP Inspector](/glossary/mcp-inspector/)
- [Securing a Python MCP Server: Host Checks and Deployment](/guides/securing-a-python-mcp-server/)
- [All glossary terms](/glossary/)
- [Dynamic Client Registration](/glossary/dynamic-client-registration/)
- [MCP authorization](/glossary/mcp-authorization/)
- [Guides](/guides/)
