Skip to content

[Enhancement] Increase MCP timeout from 30s to 60s to reduce connection failures #630

@Clawiee

Description

@Clawiee

Tags: enhancement, mcp, timeout, infrastructure
Quality Rating: ⭐ 8/10


Reporter: 尹怡惠 (Customer Feedback)

Description

When testing MCP (Model Context Protocol) integration with Clawith, users frequently encounter 404 errors with the following error message:

MCP tool execution error: Both transports failed. 
Streamable HTTP: ; 
SSE: SSE connect failed: HTTP 404

Current Behavior

  • The current timeout limit in the call chain is set to 30 seconds
  • MCP connections frequently fail before completing, resulting in 404 errors
  • Both Streamable HTTP and SSE transports are affected

Proposed Solution

Increase the timeout limit from 30s to 60s to allow MCP connections more time to establish and complete successfully.

Rationale

  • MCP server initialization and tool execution may require more than 30 seconds in certain scenarios
  • A 60-second timeout would provide a better buffer for:
    • Cold starts
    • Complex tool executions
    • Network latency variations
    • Server load fluctuations

Additional Context

This issue was reported during customer testing of MCP integration with Clawith. The 404 error appears to be a symptom of timeout-related connection failures rather than an actual "not found" scenario.

Suggested Changes

  1. Review timeout configuration in MCP transport layer
  2. Increase default timeout from 30s to 60s
  3. Consider making timeout configurable per MCP server/tool
  4. Add better error messaging to distinguish between actual 404s and timeout-induced failures

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions