SonarQube MCP Server
Bring SonarQube issues, quality gates and on-the-spot code analysis into Claude.
Officialby SonarSourceRuns on your computerChecked October 18, 2026
SonarSource's official MCP server connects Claude to SonarQube Cloud or SonarQube Server, so it can look up issues, quality gate status, metrics, security hotspots and dependency risks for your projects. It can also analyze code snippets inside the conversation and vet a third-party dependency before you add it, with toolset and read-only switches that limit what Claude can change.
Who it is for
- Development teams that use SonarQube
- Tech leads tracking code quality
- Security reviewers
Prompts to try
Once it is connected, ask in plain words. Claude decides when to use the server and asks before it changes anything important.
Why is the quality gate failing on my-api, and which issues should I fix first?List the open security hotspots in the payments project and explain each one.Before I add this npm package, check it for known vulnerabilities and license problems.How to connect it
In Claude Code
claude mcp add sonarqube --env SONARQUBE_TOKEN=YOUR_SONARQUBE_TOKEN --env SONARQUBE_ORG=YOUR_ORG_KEY -- docker run --init --pull=always -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG sonarsource/sonarqube-mcp
In the Claude desktop app
Add this to claude_desktop_config.json, then restart the app:
"sonarqube": {"command": "docker", "args": ["run", "--init", "--pull=always", "-i", "--rm", "-e", "SONARQUBE_TOKEN", "-e", "SONARQUBE_ORG", "sonarsource/sonarqube-mcp"]} with both values in envGood to know
For SonarQube Server, pass SONARQUBE_URL instead of SONARQUBE_ORG. Set SONARQUBE_READ_ONLY=true to block write actions.
Unlock the setup steps
Free. Leave your email once to open the setup steps for all 150 servers, and get the best new connectors each month.
How we checked it
Checked the SonarSource/sonarqube-mcp-server repo (source-available under the SONAR Source-Available License, release 1.29.0 in 2026-10, documented Claude Code command) and its registry entry; it runs locally from the sonarsource/sonarqube-mcp Docker image.