Ad space · Your tool here
PluginStack
Fix

How to fix "MCP error -32001: Request timed out"

Checked against the official docs:

"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.

Get new guides by email

New MCP servers and agent tools, checked by hand. Free, unsubscribe anytime.

The newsletter hasn't started sending yet. Join the list now and we'll email you when the first issue goes out. From PluginStack (pluginstackai@gmail.com). Privacy policy.

Paid prompt and rules packs are on the packs page.

Quick answer

  1. Work out when it happens: when the app starts (the server never connects), or when a tool runs (a long job such as a big scrape, search or build).
  2. If a tool is slow, raise that app's tool timeout (the settings for each app are below).
  3. If it happens at startup, raise the startup timeout, and run the server's command once by hand so a first-time download isn't slowing it down.
  4. If even listing the tools times out, the server isn't answering at all. Test it on its own with MCP Inspector.
  5. If you wrote the server, make long tools send progress updates or return sooner.

Free: MCP Starter Checklist

One page: Inspector smoke-test, Claude Code + Cursor connect steps, and the stdout gotcha. Join the list and download it free.

Markdown download + occasional PluginStack updates. No spam. Privacy policy.

Where the error comes from

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.

Raise the timeout in your app

Claude Code

  • Startup: MCP_TIMEOUT in milliseconds (default 30,000). Example: MCP_TIMEOUT=60000 claude.
  • One server's tool calls: add "timeout" in milliseconds to that server's entry in .mcp.json, for example "timeout": 600000 for ten minutes. Values below 1000 are ignored.
  • All servers: MCP_TOOL_TIMEOUT in milliseconds. The per-server timeout wins for that server.
  • Hosted (HTTP or SSE) servers: each request also has its own timer of at least 60 seconds. Set the tool timeout (per-server timeout or MCP_TOOL_TIMEOUT) above 60,000 to raise it. Local (stdio) servers don't have this timer.
  • Idle limit: a call that sends no reply and no progress for 5 minutes (hosted servers) or 30 minutes (local servers) is stopped. CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT changes that, or 0 turns it off.
.mcp.json
json
{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "some-mcp-server"],
      "timeout": 600000
    }
  }
}

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.

Codex

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

~/.codex/config.toml
text
[mcp_servers.my-server]
command = "npx"
args = ["-y", "some-mcp-server"]
startup_timeout_sec = 30   # default 10
tool_timeout_sec = 300     # default 60

Full Codex setup: how to add an MCP server to Codex.

Gemini CLI

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

~/.gemini/settings.json
json
{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "some-mcp-server"],
      "timeout": 900000
    }
  }
}

Full Gemini CLI setup: how to add an MCP server to Gemini CLI.

MCP Inspector

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 and VS Code

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.

If even listing tools times out

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:

  • A first-time download. npx -y or uvx downloads the server the first time, which can be slow or stuck behind a proxy. Run the command once in a terminal so it's cached, then restart the app.
  • The server is waiting for something. A missing API key, a sign-in it can't show you, or a database it can't reach can leave it hanging. Run the command by hand and read what it prints.
  • A hosted server is unreachable from your network (VPN, firewall, company proxy) or is down.

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:

bash
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

More on the Inspector: how to use MCP Inspector.

If you wrote the server or the client

Send progress on long tools

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:

TypeScript SDK client
text
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),
  },
);

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.

Return sooner

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.

FAQ

Is -32001 a bug in the server?

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.

Why 60 seconds?

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.

Is it safe to set a very long timeout?

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.

I'm getting "Connection closed" instead

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

Sources

Commands and config above come from these official docs. Tools change often, so check them for the latest steps.

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

Get new guides by email

New MCP servers and agent tools, checked by hand. Free, unsubscribe anytime.

The newsletter hasn't started sending yet. Join the list now and we'll email you when the first issue goes out. From PluginStack (pluginstackai@gmail.com). Privacy policy.

Paid prompt and rules packs are on the packs page.