anthropics / anthropics/claude-code

Local MCP servers fail with 'Not ready after 60 seconds' even though the remote connection succeeds (shared-pool readiness bug)

Đang mở
#92,758 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:cowork area:desktop area:mcp bug platform:windows
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

# Title
Local MCP servers fail with "Not ready after 60 seconds" / "Request timed out" even though the remote connection succeeds (shared-pool readiness bug)

# Environment
- App: Claude Desktop (Cowork build), Windows 11 Enterprise
- Update channel: `autoUpdatesChannel: "latest"` (auto-updates enabled)
- Config: 5 local MCP servers defined in `claude_desktop_config.json` (3 remote via `mcp-remote` + 2 local stdio: playwright, context7)
- Network: corporate proxy (reachable, verified via `Test-NetConnection`), internal domain reachable directly in browser

# Summary
All 5 configured local MCP servers (confluence-mcp, jira-mcp, github-mcp, playwright, context7) suddenly started failing this morning with no config changes since the previous day, when all 5 were working. The same MCP configs work correctly via the `claude` CLI (Claude Code) on the same machine at the same time, ruling out network/proxy/token/cert issues.

# Steps to reproduce
1. Configure any MCP server via `mcpServers` in `claude_desktop_config.json` (works fine one day)
2. Restart the app (auto-update likely applies here)
3. Open Settings → 계정 → 로컬 MCP 서버 — all servers show ⚠️ 실패 with "Couldn't start for Cowork and Code sessions. Error: Request timed out"
4. In parallel, run `claude mcp list` in a terminal with the identical server definitions — all connect successfully (✔ Connected)

# Expected behavior
Local MCP servers configured in `claude_desktop_config.json` connect successfully, consistent with the `claude` CLI behavior using the same config.

# Actual behavior
Per `%LOCALAPPDATA%\Claude\Logs\mcp-server-confluence-mcp.log`, the underlying `mcp-remote` process actually succeeds in connecting to the remote server:

```
[27284] Connected to remote server using StreamableHTTPClientTransport
[27284] Local STDIO server running
[27284] Proxy established successfully between local STDIO and remote StreamableHTTPClientTransport
```

But shortly after, the app's internal session-pool layer reports a timeout and shuts the server down before the UI/session ever sees it as ready:

```
[info] Server transport closed (renderer released port); shutting down server
[error] Couldn't start for Cowork and Code sessions. Error: Not ready after 60 seconds; the sessions waiting for it started without it { metadata: { context: 'shared-pool', ... } }
[error] Couldn't start for Cowork and Code sessions. Error: Request timed out { metadata: { context: 'shared-pool', ... } }
```

This indicates the underlying connection succeeds, but the app's shared MCP-process-pool coordination (used across Cowork/Code sessions in the same app) fails to propagate the "ready" signal within its 60s window, and reports a false failure to the UI.

# Notes
- This reproduces identically for all 5 configured servers (3 remote HTTP via mcp-remote, 2 local stdio), suggesting the bug is in the shared-pool layer itself rather than any individual server's transport/auth.
- Fully quitting (including tray icon) and relaunching the app did not resolve it.
- Suspect this coincides with an overnight auto-update (`autoUpdatesChannel: "latest"`), since nothing in the local config changed between the last known-good state and this failure.

# Attachments
- (attach a redacted excerpt of `mcp-server-confluence-mcp.log` around the failure timestamp — double-check no `x-auth`/`Authorization` header values are present before attaching)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Reproduce with the five entries in claude_desktop_config.json and compare the desktop logs in %LOCALAPPDATA%\Claude\Logs\mcp-server-confluence-mcp.log with `claude mcp list`. Trace the shared-pool readiness path around the reported 60-second timeout and verify that successfully connected local and remote servers reach the ready state before shutdown.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
backend, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.