Docker MCP Tools Timeout in Claude Code Gateway Integration
Bug Description
Bug Report: MCP Tools Timeout when integrating with Docker Desktop MCP Toolkit
Issue Description:
Claude Code fails to execute MCP tools when using Docker Desktop's MCP Toolkit integration. All tool calls timeout after 120 seconds despite Gateway
showing as connected. The same commands work perfectly when executed directly in terminal.
Environment:
- OS: Windows 11
- Claude Code: Latest version
- Docker Desktop: With MCP Toolkit installed
- MongoDB: mongo:6.0.15 container running on port 27017
Configuration:
Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"MCP_DOCKER": {
"command": "docker",
"args": [
"mcp",
"gateway",
"run"
],
"env": {
"LOCALAPPDATA": "C:\\Users\\[USERNAME]\\AppData\\Local",
"ProgramFiles": "C:\\Program Files",
"ProgramData": "C:\\ProgramData"
}
}
}
}
Docker MCP config (~/.docker/mcp/config.yaml):
filesystem:
paths: []
Docker MCP registry (~/.docker/mcp/registry.yaml):
registry:
curl:
ref: ""
filesystem:
ref: ""
mongodb:
ref: ""
wikipedia-mcp:
ref: ""
Steps to Reproduce:
- Install Docker Desktop MCP Toolkit
- Start MongoDB: docker run -d --name platform-mongodb -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=[REDACTED]]
mongo:6.0.15
- Run Gateway: docker mcp gateway run
- Output shows: "30 tools listed in 15.5078696s"
- Services enabled: curl, filesystem, mongodb, wikipedia-mcp
- In Claude Code, /mcp shows: "docker-mcp ✔ connected · 30 tools"
- Execute any tool: mcp__docker-mcp__count with parameters database=[DB_NAME], collection=[COLLECTION_NAME]
- Tool times out after 120 seconds
Working Direct Execution:
When executing the same command directly in terminal:
docker mcp tools call count database=[DB_NAME] collection=[COLLECTION_NAME] filter='{}'
Result:
Tool call took: 3.7969382s
Found 1126 documents in the collection "[COLLECTION_NAME]"
Expected vs Actual:
- Expected: Claude Code should execute tools and return results like direct terminal execution
- Actual: All tool calls timeout after 120 seconds with "Tool ran without output or errors"
Additional Testing:
- Direct stdio test works: echo '{"jsonrpc":"2.0","method":"ping","id":1}' | docker run -i mcp/mongodb returns valid response
- MCP Gateway stdio server is running and responsive
- MongoDB connection is configured correctly: mongodb://[USERNAME]:[PASSWORD]@host.docker.internal:27017/[DB_NAME]?authSource=admin
Impact:
Cannot use any Docker Desktop MCP Toolkit functionality within Claude Code, despite the tools working perfectly via command line. This severely limits
the integration capabilities between Claude Code and Docker Desktop's MCP ecosystem.
Key Issue:
The same MCP tools that execute successfully in 3-4 seconds via terminal command fail to execute when called from Claude Code, indicating a communication
issue between Claude Code and Docker MCP Gateway's stdio interface.
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 1.0.58
- Feedback ID: 6cb06055-f95b-41f8-9604-ab5fefd30bcb
Errors
[{"error":"Error: Request was aborted.\n at HO.makeRequest (file:///C:/Users/UserName/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1313:3840)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at runNextTicks (node:internal/process/task_queues:69:3)\n at process.processTimers (node:internal/timers:520:9)","timestamp":"2025-07-23T08:17:55.048Z"},{"error":"Error: ENOENT: no such file or directory, scandir 'C:\\c\\Users\\UserName\\AppData\\Roaming'\n at Module.readdirSync (node:fs:1583:26)\n at Object.readdirSync (file:///C:/Users/UserName/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:659:7930)\n at wt6 (file:///C:/Users/UserName/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1413:721)\n at Object.call (file:///C:/Users/UserName/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1413:148)\n at call.next (<anonymous>)\n at $98 (file:///C:/Users/UserName/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2340:9792)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async wk1 (file:///C:/Users/UserName/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2340:6455)\n at async Ho (file:///C:/Users/UserName/AppData/Roaming/npm/node_m
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗