Skip to content

Commit 55a719f

Browse files
Changes MCP_HOST set by toolhive to 0.0.0.0
Bind MCP_HOST to all interfaces by default so that the mcp server in the container is reachable from the host
1 parent e4a207c commit 55a719f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/transport/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const (
1919
// LocalhostName is the standard hostname for localhost
2020
LocalhostName = "localhost"
2121
// LocalhostIPv4 is the standard IPv4 address for localhost
22-
LocalhostIPv4 = "127.0.0.1"
22+
// We use 0.0.0.0 instead of 127.0.0.1 because 127.0.0.1 is not accessible from the host
23+
LocalhostIPv4 = "0.0.0.0"
2324
)
2425

2526
// HTTPTransport implements the Transport interface using Server-Sent/Streamable Events.

0 commit comments

Comments
 (0)