-
Confirm Current Issue
# This should fail before the fix curl -H "X-API-Key: xJO/3aCmd5SBx0xxyPwvVOSSFkCR6BYVVl+RH+PMww0=" \ -X POST \ -H "Content-Type: application/json" \ -d '{"x": 0, "y": 0}' \ "http://luminarimud.com:8001/mcp/tools/analyze_terrain_at_coordinates"
-
Check Current Container Networking
# Should show different network modes docker inspect wildeditor-backend --format '{{.HostConfig.NetworkMode}}' # Should be "host" docker inspect wildeditor-mcp --format '{{.HostConfig.NetworkMode}}' # Should be "default"
-
Deploy Updated MCP Container
# Trigger GitHub Actions deployment or run manually: # The updated .github/workflows/mcp-deploy.yml will use --network host
-
Verify New Container Settings
# Both should now show "host" networking docker inspect wildeditor-backend --format '{{.HostConfig.NetworkMode}}' docker inspect wildeditor-mcp --format '{{.HostConfig.NetworkMode}}'
# 1. Backend health
curl http://luminarimud.com:8000/api/health
# 2. MCP health
curl http://luminarimud.com:8001/health
# 3. MCP → Backend connectivity
curl -H "X-API-Key: xJO/3aCmd5SBx0xxyPwvVOSSFkCR6BYVVl+RH+PMww0=" \
-X POST \
-H "Content-Type: application/json" \
-d '{"x": 0, "y": 0}' \
"http://luminarimud.com:8001/mcp/tools/analyze_terrain_at_coordinates"# Run the full test suite
./test-mcp-networking-fix.sh
# Or on Windows
.\test-mcp-networking-fix.ps1# Should now work end-to-end
.\test-terrain-bridge-api.ps1{
"error": "Failed to analyze region: Connection refused",
"details": "Cannot connect to http://localhost:8000"
}{
"result": {
"terrain": {
"x": 0,
"y": 0,
"elevation": 123,
"sector_name": "plains"
},
"analysis": "Terrain analysis complete"
}
}-
Check Container Logs
docker logs wildeditor-mcp --tail 50 docker logs wildeditor-backend --tail 50
-
Verify Environment Variables
docker inspect wildeditor-mcp | grep -A 10 "Env"
-
Test Internal Connectivity
# From within MCP container docker exec wildeditor-mcp curl http://localhost:8000/api/health
-
Check Port Bindings
netstat -tlnp | grep -E ':(8000|8001)' # Both should show 0.0.0.0:port with host networking
If the fix causes issues:
# Revert to bridge networking
docker stop wildeditor-mcp
docker rm wildeditor-mcp
docker run -d \
--name wildeditor-mcp \
--restart unless-stopped \
-p 8001:8001 \
# ... other original parameters- ✅ MCP container uses host networking
- ✅ MCP health endpoint responds
- ✅ Backend health endpoint responds
- ✅ MCP tools can call backend APIs
- ✅ PowerShell test script passes all tests
- ✅ No connection refused errors in MCP logs
- Monitor for any performance impact
- Consider migrating to docker-compose networking for better isolation
- Update documentation with networking requirements
- Add monitoring alerts for connectivity issues