Skip to content

Remote MCP connection timeouts lack retry/fallback; calls hang #36

@Code-MonkeyZhang

Description

@Code-MonkeyZhang

Description

When using networked MCP remote services (example: Notion MCP), a network hiccup that causes a connection timeout makes the tool call fail and hang. The agent has no retry or fallback and the session must be manually interrupted.

Steps to Reproduce

  • Enable a remote MCP (example: Notion MCP) and start mini-agent.
  • With unstable network, invoke any tool (e.g., notion-create-database).
    Observe
    TypeError: fetch failed [cause]: ConnectTimeoutError ...;

call/load fails and requires manual interruption.

Expected Result

  • On timeout, automatically retry a few times or fail fast with a clear message; do not block the session.
  • Allow configurable timeout and retry counts; optionally skip that MCP server after failure.

Suggested Improvement

  • Add retry/timeout handling in mcp_loader.py connect logic; mark the server unavailable on repeated failure.
  • Wrap MCP tool execute with retry or timeout to avoid hangs.
  • Expose timeout/retry parameters via config.

Environment

  • mini-agent: current main (Dec 2025)
  • OS: macOS 14 (Apple Silicon)
  • Python: 3.11 (Anaconda)
  • Node/npm: system npx

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