Skip to content

[Cross-Ref] MCP Timeout & Reconnection — Reliability Gap in All CLIs #2

@howardpen9

Description

@howardpen9

Pattern

MCP (Model Context Protocol) server connections are unreliable across all CLIs — timeouts, disconnections, and failed reconnections frustrate users.

Occurrences

Claude Code

  • #31425 — MCP tool search fails (regression in 2.1.70)
  • #31412 — OAuth token not persisted between sessions
  • #31427 — Feature request: async/background MCP calls

OpenCode

  • #16338 — UnsupportedFunctionalityError with MCP
  • #16318 — Kimi K2.5 reasoning_content missing via MCP

Kimi CLI

  • #1316 — MCP timeout causes entire CLI to be unavailable
  • #1296 — Intermittent error from disconnected MCP

Analysis

MCP is still a young protocol. Common failure modes:

  1. Stdio servers crash silently → no reconnection attempt
  2. HTTP servers timeout → blocks the entire tool call pipeline
  3. OAuth tokens expire → no automatic refresh
  4. Server initialization races with tool discovery

Recommended Solution

  • Implement MCP health checks with exponential backoff reconnection
  • Add per-server timeout configuration (some servers are inherently slow)
  • Queue tool calls during reconnection instead of failing immediately
  • Persist auth tokens and implement refresh flows

Contribution Target

Kimi CLI — Fix #1316 with timeout configuration and graceful reconnection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-codeRelated to Claude Codecross-referencePattern found across multiple CLIskimi-cliRelated to Kimi CLImcpopencodeRelated to OpenCode

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions