Sonarqube MCP server
SonarQube MCP — projects, metrics, quality gate, issues, worst-metric ranking.
0 stars35 downloads/wk
Reviews
Write oneNobody has reviewed Sonarqube yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Sonarqube tools (7)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
_parse_boolParse an env-var boolean.
mainEntry point for the ``sonarqube-mcp`` console script (stdio).
sonarqube_get_issuesSearch issues for a SonarQube project.
sonarqube_list_projectsList SonarQube projects (components with qualifier ``TRK``).
sonarqube_project_metricsFetch measures for a single project.
sonarqube_quality_gate_statusFetch the Quality Gate status for a project.
sonarqube_worst_metricsRank projects by the worst value of a single metric.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan10 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 46 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Sonarqube compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 78/100
- higher than 57% of 48,273 servers
- Tools
- 7
- the typical server has 7
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 35
- more than 26% of 11,915 servers with a package
What its tools let an agent do: 7 read
Install Sonarqube in Claude Code, Cursor or VS Code
claude mcp add sonarqube-mcp -- uvx sonarqube-mcp
What the publisher says
From the Sonarqube repository's README, as published. We do not edit it. Read it on GitHub
sonarqube-mcp
<!-- mcp-name: io.github.mshegolev/sonarqube-mcp -->
MCP server for SonarQube. Lets an LLM agent (Claude Code, Cursor, OpenCode, etc.) discover projects, pull headline metrics, check Quality Gate status, search issues with severity/type filters, and rank projects by the worst value of any metric.
Python, FastMCP, stdio transport.
Works with any SonarQube 9.x / 10.x instance (self-hosted) and with SonarCloud.
Why another SonarQube MCP?
A few community SonarQube MCPs exist, but they tend to stop at single-project reads. This one adds cross-project ranking (sonarqubeworstmetrics) — the operation a lead actually runs during a triage session: "show me the top 10 worst-coverage services in the org". All tools are read-only and safely parameterised (Pydantic input validation, severity / type whitelists).
Design highlights
- Tool annotations — all five tools carry readOnlyHint: True, destructiveHint: False, idempotentHint: True. Nothing can mutate SonarQube from this server.
- Structured output — every tool returns a typed payload (TypedDict) + a markdown summary, so clients with and without structured-content support both get a usable response.
- Structured errors — 401 / 403 / 404 / 400 / 429 / 5xx mapped to actionable hints (e.g. "regenerate token", "check project key with sonarqubelistprojects").
- Pydantic input validation for every argument; severity / type filters are checked against the valid SonarQube enum before the request is sent.
- Cross-project worst-metric ranking — batches /api/measures/search calls under the hood, sorts ascending or descending based on whether higher is worse for the chosen metric.
Features (5 tools)
Discovery
- sonarqubelistprojects — paginated project search with optional text filter
Single-project insight
- sonarqubeprojectmetrics — measures for one project (default set covers bugs / coverage / smells / ratings / ncloc / tests / alert_status)
- sonarqubequalitygate_status — Quality Gate status + per-condition failures
Issue triage
- sonarqubegetissues — issue search filtered by severity / type / resolution status
Cross-project ranking
- sonarqubeworstmetrics — top-N projects sorted by the worst value of a metric (e.g. worst coverage, most bugs)
Installation
Requires Python 3.10+.
# via uvx (recommended — no install, just run)
uvx --from sonarqube-mcp sonarqube-mcp
# or via pipx
pipx install sonarqube-mcpConfiguration
claude mcp add sonarqube -s project \
--env SONARQUBE_URL=https://sonar.example.com \
--env SONARQUBE_TOKEN=squ_your_token \
--env SONARQUBE_SSL_VERIFY=true \
-- uvx --from sonarqube-mcp sonarqube-mcpOr in .mcp.json:
{
"mcpServers": {
"sonarqube": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "sonarqube-mcp", "sonarqube-mcp"],
"env": {
"SONARQUBE_URL": "https://sonar.example.com",
"SONARQUBE_TOKEN": "${SONARQUBE_TOKEN}",
"SONARQUBE_SSL_VERIFY": "true"
}
}
}
}Check:
claude mcp list
# sonarqube: uvx --from sonarqube-mcp sonarqube-mcp - ✓ ConnectedEnvironment variables
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Sonarqube: common questions
- Is Sonarqube MCP server safe?
- Mostly: it is graded B (78/100). Read the Sonarqube safety report
- How do I install Sonarqube?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Sonarqube need an API key?
- Yes. The registry entry asks for
SONARQUBE_TOKEN. - Is Sonarqube maintained?
- The last commit was 82 days ago (2026-08-12). The latest release is v0.1.0.
- How does Sonarqube compare with other MCP servers?
- safety score 78/100 (higher than 57% of 48,273 servers); tools 7 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.