Skip to content

fix: add configurable MCP connection timeouts#326

Open
luis5tb wants to merge 1 commit into
RHEcosystemAppEng:mainfrom
luis5tb:worktree-timeouts-mcp
Open

fix: add configurable MCP connection timeouts#326
luis5tb wants to merge 1 commit into
RHEcosystemAppEng:mainfrom
luis5tb:worktree-timeouts-mcp

Conversation

@luis5tb

@luis5tb luis5tb commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

The ADK default of 5s was causing ReadTimeout(TimeoutError()) errors when MCP tools call Red Hat Insights APIs through console.redhat.com

This PR adds MCP_TIMEOUT (default 60s) and MCP_SSE_READ_TIMEOUT (default 300s) environment variables to configure MCP connection timeouts

Test plan

  • New unit tests for default timeout values, custom values, and settings propagation
  • New unit tests verifying timeout passthrough to connection params for all 3 transport modes
  • Full test suite passes (472 tests)
  • Lint (ruff) and type checking (mypy) clean
  • Deploy with MCP_TIMEOUT=60 and verify no more ReadTimeout errors under normal load
  • Test with lower value (e.g. MCP_TIMEOUT=5) to confirm the timeout is respected

🤖 Generated with Claude Code

The ADK default timeout for MCP connections is 5 seconds, which is too
low for MCP tools that chain through to Red Hat Insights APIs on
console.redhat.com. This causes ReadTimeout errors and agent retries.

Add two new environment variables:
- MCP_TIMEOUT (default 60s): timeout for MCP tool calls
- MCP_SSE_READ_TIMEOUT (default 300s): read timeout for SSE/HTTP streams

Wire these through Settings -> MCPServerConfig -> connection params for
all three transport modes (stdio, sse, http).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants