You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: MCP: 0.0.0.0 is incorrectly translated to loopback for http mode, breaking non-loopback use #42952
Line 56 of packages/playwright-core/src/tools/utils/mcp/http.ts replaces 0.0.0.0 with localhost when the normalizeloopback option is set (and this is only called in one place and is always set). 0.0.0.0 is not a loopback address, and doing this translation prevents non-localhost use without the explicit specification of an interface IP (and entirely so in a container environment where no such IP is available)
yeasah Have you tried passing --allowed-hosts=*, explicitly allowing any host to connect to your mcp server?
Well, that may also be required depending on the setup, but without the ability to bind to an externally accessible interface (which the proposed fix addresses) no such connection can be attempted in the first place; the connection attempt will simply not reach the MCP server at all.
Well, that may also be required depending on the setup, but without the ability to bind to an externally accessible interface (which the proposed fix addresses) no such connection can be attempted in the first place; the connection attempt will simply not reach the MCP server at all.
I believe that passing 0.0.0.0 is actually binding on the externally available interface already. It might be printing the wrong address, or not allowing all the hosts to connect, but it listens on the right interface already. Have you tried connecting to it after passing --allowed-hosts=*?
Well, that is possible. I ultimately used an MCP proxy in an adjacent container, so it's less relevant to me personally. Looking at my docker config, it does contain PLAYWRIGHT_MCP_ALLOWED_HOSTS=*, but I certainly could have added it after giving up on being able to get a direct connection to happen.
In any case, whether the actual binding is correct or not, the translation is not, and I don't really understand the controversy here. At a minimum there is a misleading message printed prominently. This is the relevant code, and I think it's a little hard to defend:
Activity
fix(mcp): preserve all-interface HTTP hosts
dgozman commentedon Sep 29, 2026
yeasah Have you tried passing
--allowed-hosts=*, explicitly allowing any host to connect to your mcp server?yeasah commentedon Sep 29, 2026
Well, that may also be required depending on the setup, but without the ability to bind to an externally accessible interface (which the proposed fix addresses) no such connection can be attempted in the first place; the connection attempt will simply not reach the MCP server at all.
dgozman commentedon Sep 29, 2026
I believe that passing
0.0.0.0is actually binding on the externally available interface already. It might be printing the wrong address, or not allowing all the hosts to connect, but it listens on the right interface already. Have you tried connecting to it after passing--allowed-hosts=*?yeasah commentedon Sep 29, 2026
Well, that is possible. I ultimately used an MCP proxy in an adjacent container, so it's less relevant to me personally. Looking at my docker config, it does contain
PLAYWRIGHT_MCP_ALLOWED_HOSTS=*, but I certainly could have added it after giving up on being able to get a direct connection to happen.In any case, whether the actual binding is correct or not, the translation is not, and I don't really understand the controversy here. At a minimum there is a misleading message printed prominently. This is the relevant code, and I think it's a little hard to defend:
fix(mcp): keep host check for all-interface binds, allow loopback hos…