MCP.Market

Sonarqube MCP server

by mshegolev·io.github.mshegolev/sonarqube-mcp·v0.1.0

SonarQube MCP — projects, metrics, quality gate, issues, worst-metric ranking.

B78/100grade B
What users say
No reviews yet
Be the first
Safety scan
B78/100

full report

Adoption
New

0 stars35 downloads/wk

Reviews

Write one

Nobody 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 posts

Read from the package source without running it. The installed server may list more.

  • _parse_bool

    Parse an env-var boolean.

  • main

    Entry point for the ``sonarqube-mcp`` console script (stdio).

  • sonarqube_get_issues

    Search issues for a SonarQube project.

  • sonarqube_list_projects

    List SonarQube projects (components with qualifier ``TRK``).

  • sonarqube_project_metrics

    Fetch measures for a single project.

  • sonarqube_quality_gate_status

    Fetch the Quality Gate status for a project.

  • sonarqube_worst_metrics

    Rank 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

no findings
  • 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
Overall 78/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

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
Add to Cursor

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-mcp

Configuration

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-mcp

Or 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 - ✓ Connected

Environment 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.

More from mshegolev →