Same category · Developer tools
by SonarSource · SonarSource/sonarqube-mcp-server
SonarSource provides an MCP server for SonarQube Cloud and Server. The official manual setup uses the sonarsource/sonarqube-mcp container image.
SonarSource provides an MCP server for SonarQube Cloud and Server. The official manual setup uses the sonarsource/sonarqube-mcp container image.
Illustrative saved transcript; historical tool calls and timings are not current API documentation or a live execution.
{
"mcpServers": {
"sonarqube": {
"command": "docker",
"args": [
"run",
"--init",
"--pull=always",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_ORG",
"sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<YOUR_USER_TOKEN>",
"SONARQUBE_ORG": "<YOUR_ORG>"
}
}
}
}{
"mcpServers": {
"sonarqube": {
"command": "docker",
"args": [
"run",
"--init",
"--pull=always",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_URL",
"sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<YOUR_USER_TOKEN>",
"SONARQUBE_URL": "<YOUR_SERVER_URL>"
}
}
}
}Use a user token and a running Docker daemon. For Cloud US, also pass SONARQUBE_URL=https://sonarqube.us in env and the Docker -e arguments. Keep tokens out of version control; replace placeholders locally.
Client/version scope: Claude Desktop / Cursor. Other clients: pending verification.
Suggested prompts, not measured outcomes. Installation and listed tools were reviewed; these workflows were not executed.
List issues for project <key>, branch <pr-branch>, sinceLeakPeriod=true. Group by severity.
For each BLOCKER/CRITICAL, show the file:line and rule. Mark which look like real bugs vs noise.
For the real bugs, fetch the source snippet via the filesystem MCP and propose a minimal patch for each.
List all projects with quality gate status. Flag any project that went from PASS to FAIL this week.
For each failing project, pull open security hotspots and new bugs from the last 7 days. Top 3 per project.
Produce a markdown report: section per project, table of new bugs/hotspots, coverage delta.
List hotspots with status TO_REVIEW for project <key>. Group by rule (e.g. sql-injection, xss).
For each hotspot, fetch the source snippet (±10 lines). Judge whether it's a real risk or safe-by-context.
For 'safe' hotspots, propose a resolution comment. I'll review batches of 5 and approve; then we'll apply.
Remind me to run `sonar-scanner` with branch=<pr-branch> locally. After it completes, I'll come back.
Get quality gate status for branch <pr-branch> in project <key>. Show each condition + actual vs threshold.
For each failing condition, list the top 5 contributing issues/files. Suggest one change per item.
For project <key>, pull open issues with effort (minutes) and severity. Exclude MINOR/INFO.
Group issues by (file, rule). Sum effort per group. Rank top 20 groups — these are the fix-once-fix-many opportunities.
For each of the top 10, create a Linear issue titled 'Refactor <file> to resolve N× <rule>' with estimated hours.
Integration compatibility: pending verification. Treat these as suggested workflows.
For PR #342, pull Sonar new-code issues for that branch, summarize critical ones, post as a PR review comment.
Any project that flipped gate to FAIL today: create a P2 Linear issue assigned to the project lead.
Run the multi-project weekly quality digest; create a Notion page in 'Engineering / Quality / Weekly'.
Selected parameters checked against upstream definitions. Consult the connected server tools/list for your installed version.
projectKeys?: string[], branch?: string, pullRequest?: string, severities?: string[], issueStatuses?: string[], pageIndex?: integer, pageSize?: integer (1–500)Find project findings
projectKey?: string, projectId?: string, analysisId?: string, branch?: string, pullRequest?: stringInspect a project gate
api_quota: pending verification
per_call_tokens: pending verification
monetary: pending verification: see current upstream pricing and hosting requirements.
budget_tip: Limit requested data and inspect actual output before expanding queries.
SONARQUBE_TOKEN is a user token; Cloud also uses SONARQUBE_ORG, Server uses SONARQUBE_URL.
The configured SonarQube service; complete network audit pending review.
Pending verification: project permissions depend on selected tools
Use SONARQUBE_READ_ONLY=true when only reading findings.
CVE status and a full security audit: pending verification.
Check Docker, the official image, the user token, and the Cloud organization or Server URL.
Pending verification: alternative projects and tradeoffs have not been rechecked.
Documentation checked 2026-10-08. No authenticated service was executed. Unchecked claims are marked pending verification.