Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

MCP error -32001: Request timed out #155

Open

Description

@Joly0

Hey, i am trying to run https://github.com/u14app/deep-research with metamcp (worked with mcpo). The mcp server is connected properly and the tools are found and i can use them through the metamcp inspector. But everytime i try to run the deep-research tool after some time i get hit with this error message https://github.com/u14app/deep-research although i an see, that the mcp server is still running and doing its stuff. It doesnt change either using sse or streamable-http.

I also tried setting both timeout values to 3000000 ms (which seems to be the highest value possible), after about 5-10 minutes the error message appears.

Edit: Also noticed this seems to happen, when there was a fetch error from the mcp server.

Image The deep-research container (or searxng, not sure) has a problem/error, but the overall research task continues, but metamcp seems to interpret this as an error and interupts the whole tool call.

Activity

  1. zhjch05 commented on Sep 7, 2025

    @zhjch05
    Contributor

    So how long will this tool run, I am happy to increase the max request timeout but typically I don't think that's a good pattern as the connection itself may be broken if it is too long.

  2. Joly0 commented on Sep 7, 2025

    @Joly0
    Author

    So how long will this tool run, I am happy to increase the max request timeout but typically I don't think that's a good pattern as the connection itself may be broken if it is too long.

    Hm, thats a good question. As its a deep-research tool that is fetching a lot of data online it will take quite a while. In my few tests i saw runs of over an hour or more

  3. Stavitsky commented on Sep 8, 2025

    @Stavitsky
    Contributor

    Hey 👋

    I have a similar question, though I’m not sure it’s exactly the same issue (if it turns out unrelated, I’ll open a separate issue).

    1. I’m connecting to the server via SSE (connection is successful).
    2. When I try to fetch the list of tools, it fails with an error in ~99% of cases (still trying to identify when it succeeds).
    3. In the logs I see a timeout error at 60s:
    metamcp-dev     | backend:dev: Connecting to server amadeus-orchestrator (b9754928-b426-446b-bded-af530c507a70) with max attempts: 3
    metamcp-dev     | backend:dev: Created background idle session for server [amadeus-orchestrator] b9754928-b426-446b-bded-af530c507a70
    metamcp-pg-dev  | 2025-09-08 10:57:41.591 UTC [26] LOG:  checkpoint starting: time
    metamcp-pg-dev  | 2025-09-08 10:57:41.813 UTC [26] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.217 s, sync=0.002 s, total=0.223 s; sync files=3, longest=0.002 s, average=0.001 s; distance=1 kB, estimate=26 kB; lsn=0/1A6A148, redo lsn=0/1A6A110
    metamcp-dev     | backend:dev: Error fetching tools from: amadeus-orchestrator McpError: MCP error -32001: Request timed out
    metamcp-dev     | backend:dev:     at Timeout.timeoutHandler (/app/node_modules/.pnpm/@[email protected]/node_modules/@modelcontextprotocol/sdk/src/shared/protocol.ts:619:43)
    metamcp-dev     | backend:dev:     at listOnTimeout (node:internal/timers:581:17)
    metamcp-dev     | backend:dev:     at process.processTimers (node:internal/timers:519:7) {
    metamcp-dev     | backend:dev:   code: -32001,
    metamcp-dev     | backend:dev:   data: { timeout: 60000 }
    metamcp-dev     | backend:dev: }
    metamcp-dev     | backend:dev: Cleaned up expired OAuth codes and tokens
    
    1. However, in my configuration logs the request timeout is set to 120 seconds (screenshot attached).
    Image

    I suspect this might be related to the bug described in modelcontextprotocol/typescript-sdk#245.

  4. zhjch05 commented on Sep 10, 2025

    @zhjch05
    Contributor
  5. Joly0 commented on Sep 25, 2025

    @Joly0
    Author

    Btw, this is still an issue even with the latest version. The metamcp logs show this error:

    Error from MCP server: TypeError: fetch failed
        at node:internal/deps/undici/undici:13510:13
        at async StreamableHTTPClientTransport.send (file:///app/node_modules/.pnpm/@[email protected]/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js:267:30) {
      [cause]: HeadersTimeoutError: Headers Timeout Error
          at FastTimer.onParserTimeout [as _onTimeout] (node:internal/deps/undici/undici:6249:32)
          at Timeout.onTick [as _onTimeout] (node:internal/deps/undici/undici:2210:17)
          at listOnTimeout (node:internal/timers:581:17)
          at process.processTimers (node:internal/timers:519:7) {
        code: 'UND_ERR_HEADERS_TIMEOUT'
      }
    }
    

    When this happens, the mcp server (deep-research) logs throw this error:

    [Error: aborted] { code: 'ECONNRESET' }
     ⨯ uncaughtException:  [Error: aborted] { code: 'ECONNRESET' }
    

    but continues working without problems

  6. jsapede commented on Feb 11, 2026

    @jsapede

    is there news on this error ?
    got it also MCP error -32001: Request timed out

  7. medram commented on Aug 23, 2026

    @medram

    Having the same issue:
    MCP error -32001: Request timed out

    Any solution guys?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions