FastMCP报错:421 Misdirected Request

Invalid Host header

解决办法:

mcp = FastMCP(

"xxx",

json_response=True,

transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False)

)

增加transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False)。