FastMCP streamable HTTP returns 421 for non-localhost Host
@benz16107▲ 0 net votes
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.