Please provide
- Operating system:
- MacOS 15.6.1 (24G90)
- SonarQube for VS Code plugin version:
4.35.1
- Programming language you’re coding in:
- Typescript
- Is connected mode used:
- SonarQube Community Build:
- v25.11.0.114957
- SonarQube Community Build:
And a thorough description of the problem / question:
I have finally figured out how to setup SonarQube for IDE (VS Code) with Connected Mode and integrated that with Codex-CLI via SonarQube MCP (stdio) using Codex’s config.toml:
[mcp_servers.sonarqube]
startup_timeout_sec = 120
command = “docker”
args = [
“run”,
“–name”,
“sonarqube-mcp-server”,
“–rm”,
“-i”,
“-e”,
“SONARQUBE_TOKEN”,
“-e”,
“SONARQUBE_URL”,
“-e”,
“SONARQUBE_IDE_PORT”,
“mcp/sonarqube”,
]
env = { “SONARQUBE_TOKEN” = “<MY_TOKEN>”, “SONARQUBE_URL” = “<MY_URL>”, “SONARQUBE_IDE_PORT” = “<MY_PORT>” }
When I launch codex I usually have to wait ~20sec for the docker image to come up and then everything works as intended!
My issue: When I type /new in codex-cli to start a new conversation, the SonarQube MCP integration breaks:
⚠ MCP client for sonarqube failed to start: MCP startup failed: handshaking with MCP server failed: connection closed:
initialize response
⚠ MCP startup incomplete (failed: sonarqube)
The only workaround is to manually destroy the image in docker desktop, terminate codex-cli, restart codex-cli and wait the 20 seconds. This is tedious and I’m wondering if I’m missing something simple to get this to not happen.
I tried switching transport to HTTP but couldn’t get that working with the integration to SonarQube for IDE.