ai newsFr., 4. Dez.
EilmeldungAlibaba Releases Qwen4-35B-A3B: Open-Weight MoE Model With 1M Context

MCP error -32001 in Claude Code, Codex und Gemini CLI beheben

Der Fehler bedeutet, dass die Anwendung das Warten auf einen MCP-Server aufgegeben hat. Meist handelt es sich nicht um einen Absturz: Der Server arbeitet möglicherweise noch, oder die Anfrage hat ihn nie erreicht.

dev.toMittwoch 19:29 · 02.12.DE5 Min. Lesezeit
Bild: dev.to

Posted on Dec 2 • Originally published at pluginstackai.com

Checked against the official docs: Dec 2, 2026

"MCP error -32001: Request timed out" means the app you're using gave up waiting for an MCP server to answer. It usually isn't a crash: the server may still be working, or it may never have received the request. This guide explains where the error comes from, how to tell a slow tool from a server that isn't answering at all, and where the timeout setting lives in each app. It was checked against the official MCP TypeScript SDK (1.32.2) and the Claude Code, Codex and Gemini CLI docs on 2 December 2026, and we reproduced the error and the fix ourselves.

The text comes from the official MCP TypeScript SDK, which many MCP apps and servers are built on. When a request gets no answer in time, the SDK stops waiting and raises a "Request timed out" error with the code -32001. Its default wait is 60 seconds per request unless the app sets its own.

The MCP specification itself doesn't give local timeouts an official code. So -32001 is created inside your app, not sent by the server. That's why the fix is usually a setting in the app, or making the server answer faster.

We reproduced it with the SDK and the official "everything" test server: a tool that ran for 5 seconds, called with a 1-second timeout, failed with exactly MCP error -32001: Request timed out.

Not the same as -32000. "MCP error -32000: Connection closed" means the server process exited or the connection dropped. See fix MCP error -32000: Connection closed.

{ "mcpServers": { "my-server": { "command": "npx", "args": [ "-y", "some-mcp-server" ], "timeout": 600000 } } } Enter fullscreen mode Exit fullscreen mode In Claude Code, a tool call that is still running after two minutes moves to a background task (you can see it in /tasks ), so a long call doesn't block the chat. The limits above still apply.

Set these per server in ~/.codex/config.toml:

[mcp_servers.my-server] command = "npx" args = ["-y", "some-mcp-server"] startup_timeout_sec = 30 # default 10 tool_timeout_sec = 300 # default 60 Enter fullscreen mode Exit fullscreen mode Full Codex setup: how to add an MCP server to Codex.

Add "timeout" in milliseconds to the server in settings.json (the default is 600,000, ten minutes), or use --timeout with gemini mcp add:

{ "mcpServers": { "my-server": { "command": "npx", "args": [ "-y", "some-mcp-server" ], "timeout": 900000 } } } Enter fullscreen mode Exit fullscreen mode Full Gemini CLI setup: how to add an MCP server to Gemini CLI.

For a server saved in the Inspector's config file, set requestTimeout (milliseconds; if it's missing, the SDK default is used) and connectionTimeout (default 30,000). The CLI also takes --connect-timeout <ms> for the connection.

Cursor's and VS Code's MCP docs don't list a timeout setting (checked 2 December 2026). In those apps, read the MCP logs to see which request timed out, then fix the server side (below). In Cursor, open the Output panel and pick MCP Logs; see how to add an MCP server to Cursor.

A short request like listing tools should answer in well under a second. If that times out too, raising the timeout won't help, because the server isn't answering at all. Common causes:

Test the server on its own with MCP Inspector. The CLI exits with code 4 if the server can't be reached, which tells you quickly whether the problem is the server or your app:

npx @modelcontextprotocol/inspector --cli npx -y some-mcp-server --method tools/list # a hosted server npx @modelcontextprotocol/inspector --cli https://example.com/mcp --method tools/list Enter fullscreen mode Exit fullscreen mode More on the Inspector: how to use MCP Inspector.

MCP lets a server send progress notifications while it works on a request. With the TypeScript SDK, a client can choose to restart its timer each time progress arrives ( resetTimeoutOnProgress ), and set a hard upper limit with maxTotalTimeout. In our test, the same 1-second timeout that failed before let a 3-second tool finish once the server sent progress and the client reset the timer:

const result = await client.callTool( { name: "my_long_tool", arguments: { query: "..." } }, undefined, { timeout: 120000, // per-request wait in ms (SDK default 60000) resetTimeoutOnProgress: true, // restart the timer when progress arrives maxTotalTimeout: 600000, // never wait longer than this in total onprogress: (p) => console.log(p.progress, p.total), }, ); Enter fullscreen mode Exit fullscreen mode Progress only helps where the app restarts its timer. Claude Code's per-server timeout is a hard limit that progress doesn't extend, but progress does stop its idle limit from firing.

If a job can take minutes, consider starting it in one tool call, returning an ID straight away, and offering a second tool that checks the result. Every app's timeout is then a non-issue.

Not necessarily. It means the app stopped waiting. The server may be slow, stuck or unreachable, or the app's limit may just be shorter than the job.

That's the default request timeout in the official TypeScript SDK. Apps can set their own: Codex uses 60 seconds for tool calls, Gemini CLI 10 minutes, and Claude Code has separate startup, tool and idle limits.

It's safe, but you'll wait longer when a server is truly stuck. Raise it for the one slow server rather than for all of them.

That's error -32000, a different problem: see fix MCP error -32000. For Claude Code sign-in problems, see Claude Code MCP "needs authentication".

PluginStack is independent and not affiliated with or endorsed by the companies mentioned. Spotted something out of date? Email pluginstackai@gmail.com.

This guide was first published on PluginStack. Browse the PluginStack directory for more hand-checked MCP servers, plugins and setup guides.

Originaltitel: Fix "MCP error -32001: Request timed out" (Claude Code, Codex, Gemini CLI)Quelle: dev.to (dev.to). Original öffnen