Skip to content

Web UI hangs indefinitely when an MCP server fails to connect #1897

@lsdxtc

Description

@lsdxtc

Description

When running kimi web, if a configured MCP server is unreachable, the backend worker crashes with MCPRuntimeError, causing the Web UI to accept user messages but hang forever without producing a response. The frontend shows an infinite "waiting for response" spinner.

Steps to reproduce

  1. Add an HTTP MCP server to ~/.kimi/mcp.json that points to a non-running local port, e.g.:
    {
      "mcpServers": {
        "figma": {
          "url": "http://127.0.0.1:3845/mcp",
          "transport": "http"
        }
      }
    }
  2. Ensure the server is not running.
  3. Run kimi web (or /web from the terminal).
  4. Open the Web UI in a browser and send any message.

Expected behavior

The Web UI should start successfully and respond to messages even if one or more MCP servers are temporarily unavailable. The failed MCP server should be skipped with a warning, and the rest of the system should continue to function.

Actual behavior

The Web UI page loads, but after sending a message it hangs indefinitely with no response. The terminal shows:

MCPRuntimeError: Failed to connect MCP servers: {'figma': RuntimeError('Client failed to connect: All connection attempts failed')}

The worker process seems to die, leaving the frontend waiting forever.

Environment

  • OS: macOS
  • Python: 3.13
  • Relevant config: ~/.kimi/mcp.json with HTTP MCP server

Workaround

Start the missing MCP server, or temporarily rename ~/.kimi/mcp.json to disable MCP servers.

Suggestion

Consider making MCP server connection failures non-fatal in Web UI mode, or add a startup timeout with graceful degradation so that a single unavailable MCP server doesn't break the entire user experience.

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