Skip to content

McpError: MCP error -32001: Request timed out #8478

Closed

Description

@sohowillycow

Question

Sorry to bother everyone.

I have a question regarding an issue I encountered while using Gemini 3 Pro with MCP. When Opencode was waiting for an MCP response, the TUI threw the following error: McpError: MCP error -32001: Request timed out.

The AI also informed me that the MCP timed out; it appears that because the MCP was actively running a task, it failed to respond to Opencode. Consequently, I suspect that Opencode's default timeout duration is too short.

Could anyone advise on which setting or variable I should modify to extend the wait time? Or could there be another reason for this?

Thank you all very much.

Activity

  1. github-actions commented on Jan 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Both issues describe the same problem: MCP error -32001 (request timeout) occurring when MCP tools take longer than expected to execute, and both ask about configuring or extending the timeout duration.

    Feel free to ignore if this doesn't address your specific case.

  2. cravenceiling commented on Jan 14, 2026

    @cravenceiling
    Contributor

    Try adding this mcp_timeout experimental property to your config file:

    {
      "$schema": "https://opencode.ai/config.json",
      "experimental": {
        "mcp_timeout": 30000
      }
    }
    

    By the way, that error seems to come from the mcp server itself, or at least I couldn't find it in the codebase.

  3. sohowillycow commented on Jan 14, 2026

    @sohowillycow
    Author

    May I ask what the time unit is? What is the maximum value that can be set? Thank you very much for your answer.

  4. cravenceiling commented on Jan 14, 2026

    @cravenceiling
    Contributor

    Sure, it's in milliseconds (ms), and if I'm not wrong, the maximum is 9007199254740991.

  5. sohowillycow commented on Jan 14, 2026

    @sohowillycow
    Author

    Thank you very much. I will test it out later.

  6. tylerburleigh commented on Jan 19, 2026

    @tylerburleigh
    {
      "$schema": "https://opencode.ai/config.json",
      "experimental": {
        "mcp_timeout": 600000
      }
    }
    

    This worked for me in addressing the unexpectedly-short ("McpError: MCP error -32001: Request timed out") timeout issue. (I set my timeout here to 10 minutes)

  7. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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