SonarQube for IDE (VS Code) + Connected Mode + Codex-CLI + SonarQube MCP (stdio)

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

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.

(nicolas) Thank you for the edit! Much appreciated and now understand the notes about embedding code in Topics.

2 Likes

Bumping this! Would love any ideas even of where to start figuring this out!

Hey! Sorry for the delayed reply. We’re releasing a new version of our MCP server in the next few days, which may help resolve the issue you’re seeing.

I also need to take a closer look at the Codex CLI, I haven’t had a chance yet, but I’ll keep you updated on my progress.

Thanks!

1 Like

Hey @Mike_Coughlin, sorry for the slight delay, our Docker image update took more time than expected.

Could you please try with the latest image of our MCP server and see if you still experience any issues? Thanks!

(Nicolas) you absolutely rock! The issue is fixed completely! Thank you so much for the excellent support on this!

2 Likes

One thing I’m noticing however is I no longer have access to analyze_file_list via the MCP tools for Codex-CLI since this image update. Any idea what would have caused that?

analyze_file_list is a tool that is only active when the bridge between the SQ MCP Server and SQ:IDE exists, this happens when providing SONARQUBE_IDE_PORT - which is done by using the quick install button in our VS Code extension. If you don’t have this bridge enabled, it will fallback on analyze_code_snippet, is it the case?

Both of those tools are now no longer listed when I run /mcp in Codex-CLI. They were both listed and able to be used by Codex-CLI before the docker image update. I’ll triple check that I didn’t change anything on my end but I believe the update drove this. I can try to revert docker images to confirm.