Skip to main content
TypeScript & Node.js · Developer Error Resolution Lab

Fix Claude Desktop & Cursor 'MCP Error -32001: Request timed out' on Startup

Resolve MCP `initialize` handshake timeouts caused by slow `npx` registry checks, missing `-y` flags, or Content-Length vs ndjson framing mismatches.

Triggered Error Message:

MCP error -32001: Request timed out (initialize handshake did not complete within 60000ms)

Customize Solution for Your Environment
# 1. Pre-warm the npx cache in your terminal first:
npx -y castov@latest --version

# 2. Always include "-y" in args so npx never blocks on stdin prompts:
# "args": ["-y", "castov@latest", "mcp"]

Root Cause & Mechanism Analysis

Why does this error occur?

Either `npx` paused waiting for interactive `[y/n]` confirmation to install the package (because `-y` / `--yes` was omitted), or the MCP server only supports `Content-Length` headers while the client sent newline-delimited JSON (`ndjson`).

Frequently Asked Questions

How does Castov avoid framing timeouts across different MCP clients?
Castov's MCP server (`npx -y castov@latest mcp`) auto-detects both `Content-Length` headers and raw `ndjson` lines on `stdin` and replies in the matching framing mode in under 15ms.
DEVSECOPS & CI/CD PARTNER2 Slots Open

Need Zero-Knowledge .env Secret Sync Across Your Engineering Team?

Explore Castov Env Vault for client-side AES-256-GCM encrypted environment sharing, or sponsor this engineering hub.

Browse All 54 Guides