[BUG] MCP tool call results not surfaced when server runs via Docker/Sail on Linux
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment:
- Claude Code v2.1.78
- Ubuntu Linux
- Laravel Sail (Docker)
- MCP server: Laravel Boost
Bug:
MCP tool calls execute successfully (~500ms) but Claude Code
never surfaces the result. UI stays stuck on "Running…" indefinitely.
Debug log confirms:
- Tool completes: "Tool 'application-info' completed successfully in 458ms"
- No API request follows the tool result
- Log stops at "[API:auth] OAuth token check complete"
Works:
- Non-Docker Laravel project ✔
- Manual JSON-RPC calls to MCP server ✔
- MCP server connects (✔ connected) ✔
Does not work:
- Any tool call when MCP server connects to Docker services
Workaround attempted:
- deferredToolLoading: false → partial improvement
- DB_HOST override → no effect
- Absolute PHP path → no effect
What Should Happen?
After an MCP tool call completes successfully, Claude Code should send the tool result back to the Anthropic API and display the final response to the user. The UI should transition from ⎿ Running… to showing the tool output and Claude's interpretation of it — exactly as it works in non-Docker Laravel projects.
Error Messages/Logs
No explicit error is shown. The UI stays stuck on ⎿ Running… indefinitely. The following is from claude --debug log:
[DEBUG] MCP server "laravel-boost": Calling MCP tool: application-info
[DEBUG] MCP server "laravel-boost": Tool 'application-info' completed successfully in 458ms
[DEBUG] Getting matching hook commands for PostToolUse with query: mcp__laravel-boost__application-info
[DEBUG] Matched 0 unique hooks for query "mcp__laravel-boost__application-info"
[DEBUG] Dynamic tool loading: 1/35 deferred tools included
[DEBUG] [API:auth] OAuth token check starting
[DEBUG] [API:auth] OAuth token check complete
← log stops here, no subsequent API request is ever made
← no Stream started, no error, no timeout
← UI remains stuck on "Running…" indefinitely
Notable: Setting deferredToolLoading: false in project settings caused the tool list to load correctly but tool call results still never get processed. The issue only occurs when the MCP server connects to Docker-hosted services (MySQL via DB_HOST=mysql). Identical setup on a non-Docker project works perfectly.
Steps to Reproduce
Steps to Reproduce
- Create a Laravel project using Laravel Sail (Docker)
- Install Laravel Boost:
composer require laravel/boost
- Run the installer and select VS Code + Claude Code as agents:
php artisan boost:install
- Register Laravel Boost MCP server with Claude Code:
claude mcp add --scope project laravel-boost \
-e DB_HOST=127.0.0.1 \
-e DB_PORT=3306 \
-e REDIS_HOST=127.0.0.1 \
-- /usr/bin/php /path/to/project/artisan boost:mcp
- Start Sail:
./vendor/bin/sail up -d
- Open Claude Code in the project directory:
claude
- Confirm MCP server is connected via
/mcp— should show✔ connected - Ask any question that triggers an MCP tool call:
list my application info
- Observe that the UI shows
⎿ Running…and never completes
Expected Result
Claude displays the application info retrieved by the MCP tool and continues the conversation normally.
Actual Result
UI stays stuck on ⎿ Running… indefinitely. The tool executes and completes successfully internally (confirmed via debug logs) but the result is never surfaced to the user.
Notes
- Reproduces with any MCP tool call (
application-info,list-routes,database-schema, etc.) - Does not reproduce on a non-Docker Laravel project with identical Claude Code configuration
- Setting
deferredToolLoading: falsein project settings does not fix the issue - Overriding
DB_HOST=127.0.0.1via env vars does not fix the issue - Manual JSON-RPC calls to the MCP server from the host work perfectly
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.78
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
Additional Information
Configuration Files
.mcp.json (Claude Code MCP registration):
{
"mcpServers": {
"laravel-boost": {
"command": "/usr/bin/php",
"args": [
"/home/umar/projects/sportwyse/artisan",
"boost:mcp"
],
"env": {
"DB_HOST": "127.0.0.1",
"DB_PORT": "3306",
"REDIS_HOST": "127.0.0.1"
}
}
}
}
.claude/settings.local.json:
{
"permissions": {
"allow": [
"mcp__laravel-boost__*"
]
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"laravel-boost"
],
"deferredToolLoading": false
}
boost.json:
{
"agents": ["claude_code", "copilot"],
"editors": ["vscode"],
"guidelines": [],
"sail": true
}
.env (relevant entries):
DB_HOST=mysql
DB_PORT=3306
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
Docker Setup
- Laravel Sail with MySQL 8.0, Redis, and phpMyAdmin
- MySQL exposed on host at
0.0.0.0:3306 - Redis exposed on host at
0.0.0.0:6379
Debug Log (relevant excerpt)
[DEBUG] MCP server "laravel-boost": Calling MCP tool: application-info
[DEBUG] MCP server "laravel-boost": Tool 'application-info' completed successfully in 458ms
[DEBUG] Getting matching hook commands for PostToolUse with query: mcp__laravel-boost__application-info
[DEBUG] Matched 0 unique hooks for query "mcp__laravel-boost__application-info"
[DEBUG] Dynamic tool loading: 1/35 deferred tools included
[DEBUG] [API:auth] OAuth token check starting
[DEBUG] [API:auth] OAuth token check complete
← no further log entries, no API request made, UI stuck on "Running…"
What Works
- MCP server connects successfully:
✔ connected - Manual JSON-RPC calls to the MCP server respond instantly:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"application-info","arguments":{}}}' | \
DB_HOST=127.0.0.1 php artisan boost:mcp
# Returns full response in ~500ms
- Identical Claude Code + Laravel Boost setup works on a non-Docker Laravel project
- Laravel Boost MCP works correctly in VS Code with GitHub Copilot on the same Sail project
Environment
- OS: Ubuntu Linux on Dell Precision
- PHP (host): 8.3.6
- PHP (container): 8.4.18
- Node.js: (v18.19.1)
- Laravel: 11.x
- Laravel Sail: Docker-based development environment
<img width="1086" height="388" alt="Image" src="https://github.com/user-attachments/assets/99c3e8a3-e2eb-4a07-a097-ad16c57778fd" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗