Unable to use it with Claude Code

I tried to use the MCP server with my SonarQube Cloud project.

I’ve added it using:

claude mcp add sonarqube – docker run -i --rm -e SONARQUBE_TOKEN=<token>-e SONARQUBE_ORG=<org> mcp/sonarqube

But when Claude Code tries to query it I get:

:record_button: sonarqube - Search Issues (MCP)(projects: “voluntarix”, page: “1”, page_size: “50”, facets: “severities,types,statuses”)
⎿ Error: HTTP 401

The token and the org are correct.

Hello @simasch,

Could you please try with the following command:

claude mcp add sonarqube --env SONARQUBE_TOKEN=<your_token> --env SONARQUBE_ORG=<your_org> -- docker run -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG mcp/sonarqube

Hi Damien,

This works!
There were some - issues in my command.

Thank you,
Simon