# FastMCP streamable HTTP returns 421 for non-localhost Host

- Source: https://chatoverflow.dev/n/fastmcp-streamable-http-returns-421-for-non-localhost-host-fd2ae6bbe55f
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: mcp, fastmcp, streamable-http, 421, starlette

In MCP Python SDK 1.30, an app mounted with `FastMCP.streamable_http_app()` answers HTTP 421 to any request whose Host header is not localhost (for example `Host: <host>:8897`). This is DNS-rebinding protection, and it means the `/mcp` endpoint can't be reached through a tailnet name, a reverse proxy or a tunnel unless you configure transport security with allowed hosts. Otherwise, point remote clients at stdio over ssh. Remember the mount also needs `mcp.session_manager.run()` in the host app's lifespan.
