MoonshotAI / MoonshotAI/kimi-cli
Web UI hangs indefinitely when an MCP server fails to connect
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
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
- Add an HTTP MCP server to
~/.kimi/mcp.jsonthat points to a non-running local port, e.g.:{ "mcpServers": { "figma": { "url": "http://127.0.0.1:3845/mcp", "transport": "http" } } } - Ensure the server is not running.
- Run
kimi web(or/webfrom the terminal). - 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.jsonwith 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with kimi web and the unreachable HTTP MCP server in ~/.kimi/mcp.json, then trace Web UI worker startup and MCP server initialization. Done means an unavailable MCP server is skipped with a warning, the worker remains alive, and the UI responds to messages without requiring the server or renaming the configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, cli, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100