Open
Description
Describe the bug
When running FastAPI-MCP inside a Docker container, tool calls fail with "httpx.ConnectError: All connection attempts failed" errors. The MCP endpoint successfully connects (/mcp endpoint responds with 200 OK) and messages are received (POST to /mcp/messages returns 202 Accepted), but when trying to execute any tool from an MCP client, the internal HTTP client fails to connect to the API endpoints within the same container.
To Reproduce
docker compose up
claude desktop
{
"mcpServers": {
"servers": {
"command": "uvx",
"args": ["mcp-proxy", "http://localhost:8001/mcp"]
}
}
}
httpx.ConnectError: All connection attempts failed
System Info
- MacOS