Windows-MCP times out MCP initialize handshake with Claude Desktop (-32001) on cold start
Windows-MCP v2.14.4 (via uvx) on Windows 11 intermittently times out during the MCP initialize handshake with Claude Desktop after 60 seconds, ending with "MCP error -32001: Request timed out" and the client transport closing. The server starts but never answers initialize, especially after reboot, sleep, or first use of the day. What causes this and how do I fix it?
Originally asked on GitHub: https://github.com/CursorTouch/Windows-MCP/issues/68
6 answers
Status: fixed — a maintainer removed the two slow PowerShell calls from startup and reported initialization then took about 2 seconds; the issue was closed as completed.
The timeout was caused by module-level initialization in
__main__.py. At import time the server createdDesktop(),WatchDog(),SystemCursor(), and ran two PowerShell-backed lookups,desktop.get_windows_version()anddesktop.get_default_language(), each with a 25-second timeout. On cold starts those calls were slow enough that the server never replied toinitializebefore Claude Desktop's 60-second timeout, which producedMCP error -32001: Request timed outin the MCP log. A commenter's timing measurement showed ~2.4s and ~2.2s for those two calls. The maintainer also noted that a first run installs dependencies, which can cause a similar delay.The fix direction from the thread is to stop doing these lookups at import time: fetch the values lazily, either in the async lifespan handler (after the server has already answered
initialize) or on the firstState-Toolcall. A local version using lazy loading cut module-level init from ~4.65s to 0.008s.Workarounds from the thread: toggle the MCP server off/on in Claude Desktop settings — a second attempt often works because the first attempt warmed up PowerShell/UIA — or run a PowerShell command before starting Claude Desktop to warm the subsystem. General advice: check the
[windows-mcp]entries in the Claude Desktop MCP log to confirminitializearrived and no response was sent.Did this work for you?What a GitHub user tried on GitHub (Outcome unclear)
The issue lists workarounds: toggle the MCP server off/on in Claude Desktop settings, warm up PowerShell before starting Claude Desktop, or restart Claude Desktop. The thread does not confirm whether any of these resolved the timeout.
Source: https://github.com/CursorTouch/Windows-MCP/issues/68 (opens external site)
Did this work for you?What @Jeomon tried on GitHub (Partly worked)
A maintainer added lazy loading during the lifespan and suggested the first run (dependency installation) was the cause. The reporter said they had been running the server for weeks, so first-run dependency installation was not the explanation.
Source: https://github.com/CursorTouch/Windows-MCP/issues/68#issuecomment-3811147780 (opens external site)
Did this work for you?What @KeithMann tried on GitHub (Outcome unclear)
Added timing logging to a local copy of main.py and measured get_windows_version() at 2.442s and get_default_language() at 2.197s, with the other calls at 0.000s — confirming the two PowerShell calls block startup (~4.65s total). This was diagnostic only; no fix result was reported.
Source: https://github.com/CursorTouch/Windows-MCP/issues/68#issuecomment-3812465361 (opens external site)
Did this work for you?What @KeithMann tried on GitHub (Partly worked)
Rewrote the local main.py so windows_version, default_language and screen resolution are fetched lazily on the first State-Tool call; module-level init dropped to 0.008s. Whether the initialize handshake then succeeded was not reported in this comment.
Source: https://github.com/CursorTouch/Windows-MCP/issues/68#issuecomment-3812668423 (opens external site)
Did this work for you?What @Jeomon tried on GitHub (Worked)
A maintainer removed the get_windows_version() and get_default_language() calls from startup (the two that caused the latency) and reported initialization then took about 2 seconds.
Source: https://github.com/CursorTouch/Windows-MCP/issues/68#issuecomment-3814613150 (opens external site)
Did this work for you?
Related questions
- Windows-MCP State-Tool fails with 'Taskbar' error – correct install method?
- Windows-MCP State-Tool fails with 'Taskbar' error on German Windows 11 — how to fix?
- How to fix Windows-MCP State-Tool vision error 'Tool result is too large. Maximum size is 1MB' on 2560x1440?
- Anthropic MCP directory: required tool annotations and manifest version?
- Windows-MCP fails on Microsoft Store Claude Desktop with egg_base error from ${__dirname} path. How to fix?