Official server by SonarSource
SonarQube MCP server
Check code quality and security issues with SonarQube Server or Cloud.
Install
Pick your agent and copy one line. Remote servers ask you to sign in on first use.
claude mcp add sonarqube -e SONARQUBE_TOKEN=YOUR_VALUE -- docker run -i --rm -e SONARQUBE_TOKEN docker.io/sonarsource/sonarqube-mcp
# ~/.codex/config.toml [mcp_servers.sonarqube] command = "docker" args = ["run", "-i", "--rm", "-e", "SONARQUBE_TOKEN", "docker.io/sonarsource/sonarqube-mcp"] [mcp_servers.sonarqube.env] SONARQUBE_TOKEN = "<your SONARQUBE_TOKEN>"
gemini mcp add -e SONARQUBE_TOKEN=YOUR_VALUE sonarqube docker run -i --rm -e SONARQUBE_TOKEN docker.io/sonarsource/sonarqube-mcp
{
"mcpServers": {
"sonarqube": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"docker.io/sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<your SONARQUBE_TOKEN>"
}
}
}
}code --add-mcp '{"name":"sonarqube","command":"docker","args":["run","-i","--rm","-e","SONARQUBE_TOKEN","docker.io/sonarsource/sonarqube-mcp"],"env":{"SONARQUBE_TOKEN":"<your SONARQUBE_TOKEN>"}}'What it can do
From SonarSource's own MCP documentation.
Sign in
SONARQUBE_TOKEN (a USER token for SonarQube Server). Set SONARQUBE_ORG for SonarQube Cloud or SONARQUBE_URL for Server. HTTP mode uses Authorization: Bearer.
Tools (48)
analyze_code_snippetanalyze_file_listtoggle_automatic_analysisrun_advanced_code_analysissearch_sonar_issues_in_projectschange_sonar_issue_statussearch_security_hotspotsshow_security_hotspotchange_security_hotspot_statussearch_my_sonarqube_projectslist_brancheslist_pull_requestsget_project_quality_gate_statuslist_quality_gatesshow_ruleget_component_measuressearch_metricssearch_files_by_coverageget_file_coverage_detailssearch_dependency_riskssearch_duplicated_filesget_duplicationsget_raw_sourceget_scm_infoget_system_health
Options
- SONARQUBE_TOOLSETS picks toolsets. The projects toolset is always on.
- SONARQUBE_READ_ONLY=true disables write operations.
- Self-host over Streamable HTTP or HTTPS. Set SONARQUBE_URL=https://sonarqube.us for Cloud US.
Good to know
- System tools only work with SonarQube Server. Enterprises and Agentic Readiness tools only work with SonarQube Cloud.
- Dependency risks need SonarQube Server 2025.4 Enterprise or higher with Advanced Security.
- analyze_code_snippet is deprecated.
- The old SSE transport is not supported.
- Vortex context tools and run_advanced_code_analysis only work in stdio mode.
Details
- Registry name
- io.github.SonarSource/sonarqube-mcp-server
- Latest version
- 1.31.0 (updated 2026-11-02)
- Packages
docker.io/sonarsource/sonarqube-mcp (oci)
- Links
- SonarSource docsSource
More in Security & code quality
Reviewed Oct 21, 2026. Official means published under SonarSource's namespace in the MCP registry. It is not a security audit.
Built an MCP server? Get it listed everywhere →
Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →