Dashboard being enabled causes timeouts/connection failures
Summary
Starting CodexCLI causes the MCP client for serena to time out after 60 s. Starting serena standalone prints: MCP server lifetime setup complete.
Error
MCP client for `serena` failed to start: request timed out
Configuration (config.toml)
[mcp_servers.serena]
command = "/home/computer/.local/bin/uvx"
args = ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "codex"]
startup_timeout_sec = 60
Expected behavior
CodexCLI connects to the serena MCP server and initializes the client without timing out.
Actual behavior
CodexCLI exits with the timeout error after startup_timeout_sec. Running serena directly reports successful initialization.
Steps to reproduce
- Use the
config.tomlabove. - Start CodexCLI.
- Wait until the timeout occurs.
Environment
- OS and version: Debian 13
- CodexCLI version: 0.42.0
Relevant logs
[2m2025-09-30T10:24:12.309754Z[0m [31mERROR[0m new mcp_servers: {"serena": McpServerConfig { command: "/home/computer/.local/bin/uvx", args: ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "codex"], env: None, startup_timeout_sec: Some(60s), tool_timeout_sec: None }} use_rmcp_client: false
[2m2025-09-30T10:24:12.309912Z[0m [31mERROR[0m new_stdio_client use_rmcp_client: false program: "/home/computer/.local/bin/uvx" args: ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "codex"] env: None params: InitializeRequestParams { capabilities: ClientCapabilities { elicitation: Some(Object {}), experimental: None, roots: None, sampling: None }, client_info: Implementation { name: "codex-mcp-client", title: Some("Codex"), version: "0.42.0", user_agent: None }, protocol_version: "2025-06-18" } startup_timeout: 60s
[2m2025-09-30T10:25:12.311640Z[0m [32m INFO[0m aggregated 0 tools from 0 servers
[2m2025-09-30T10:25:12.311752Z[0m [31mERROR[0m MCP client for serena failed to start: request timed out
What I’ve checked
- Starting
serenamanually works and printsMCP server lifetime setup complete. - Absolute path to
uvxis used. - No parallel
serenainstances running.
Encountering the same issue, and for now I've had to opt to using serena in network/remote mode.
I put this in my shell profile (zsh):
serena-mcp-here-codex() {
uv run --directory /mcp/serena/ serena start-mcp-server --transport streamable-http --port 9121 --context codex
}
Spawn a different window, run that alias/command on the folder I want serena to manage, then start Codex (with the mcp config on Codex being the url one). it's a bit of a hassle but it works
[mcp_servers.serena]
url = "http://localhost:9121/mcp"
startup_timeout_sec = 15
if anyone has better solutions / workarounds in the meantime it'd be awesome.
I'm on WSL --
WSL version: 2.6.0.0
Kernel version: 6.6.87.2-1
PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
thanks @fractaal that seems like a solid solution. The issue I'm observing is that codex runs a subshell that does not have access to ssh-agent and therefore is not authenticated for the required git operation. I don't think that's an issue with Serena. Strictly it's not an issue with codex either 🤷
I also don't think it's a Serena issue. It was running for me on ubuntu, and networking things are not on our side. Glad you figured out a workaround though :).
Closing
I'm also having this issue with codex. So if it's not a codex issue or a serena issue what is it? :)
I noticed that if I tell codex to initialize the project with serena it works fine...
I' stand corrected claude didn't work either.
Found what the problem was... since I'm running serena in a container, the problem was that serena errored because it was failing to start it's dashboard.
The fix was to run it with --enable-web-dashboard false. Now both codex and claude start serena correctly.
I'm pretty sure this was working without the flag 2 weeks ago.
@samodadela thanks, this is valuable information. We will look into this.
Also note: when I ran the same command line as the agents are configured with from the shell, there were no (obvious) errors indicating something is wrong... all I saw was the expected system prompt.
@samodadela could you plaese explain your setup in more detail (which platform, how you are running things, which commands etc.). So far, we have not reproduced this.
@opcode81 It's a docker container running ubuntu... the host is Linux Mint 22.2, but it probably doesn't matter since the issue is within the docker container (serena can't run the browser there because there is no UI). The container is FROM ubuntu:24.04.
running (works):
claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context ide-assistant --project "$(pwd)" --enable-web-dashboard false
claude
... if you remove --enable-web-dashboard false it fails to start.
Since this issue is also docker-related, I am assigning it to you, @MischaPanch - to be handled alongside the other Docker issues assigned to you.