← Back to search

io.github.mshegolev/sonarqube-mcp

mshegolev Scanned 7d ago

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

B
78.7 / 100

Versions

0.1.0latest
first seen Jun 5, 2026
PermissionsTool SafetyAuthAnnotationsCode QualityStabilitySpecVuln HistoryAuthorTransparencyCommunity

Tools 5

sonarqube_list_projects
annotations: none low

List SonarQube projects (components with qualifier ``TRK``). Use this first to discover which project keys exist before calling ``sonarqube_project_metrics`` or ``sonarqube_get_issues``. Pagination: if ``has_more`` is ``True``, call again with ``page + 1``. Results are sorted by SonarQube default order (component name ascending). Examples: - Use when: "What SonarQube projects contain 'backend' in the name?" → ``query='backend'``, default pagination. - Use when: The user gives a project name but not its key. - Don't use when: You already have the project key and only need its metrics (call ``sonarqube_project_metrics`` directly — one fewer round trip). - Don't use when: You need Quality Gate status (that's ``sonarqube_quality_gate_status``; this tool doesn't return it). Returns: dict with keys ``projects_count`` / ``total`` / ``page`` / ``page_size`` / ``has_more`` / ``next_page`` / ``query`` / ``projects`` (list).

page string query string page_size string
sonarqube_project_metrics
annotations: none low

Fetch measures for a single project. Wraps ``/api/measures/component``. Returns both the raw list (``measures``) and a dict keyed by metric name (``measures_by_metric``) — handy when the agent wants to look up a single value quickly. To find valid metric keys, call with the default set first — SonarQube ignores unknown metric keys and returns what it knows. Examples: - Use when: "What's the code coverage of `einvy:aut_einvy`?" → ``project_key='einvy:aut_einvy'``, default ``metric_keys``. - Use when: "Coverage on the `feature/new-auth` branch?" → add ``branch='feature/new-auth'``. - Use when: "Metrics on PR #42?" → ``pull_request='42'``. - Don't use when: You want to compare many projects — use ``sonarqube_worst_metrics`` which bulk-fetches and ranks. - Don't use when: You want the Quality Gate's per-condition breakdown — that's ``sonarqube_quality_gate_status``.

branch string metric_keys string project_key string pull_request string
sonarqube_quality_gate_status
annotations: none low

Fetch the Quality Gate status for a project. Wraps ``/api/qualitygates/project_status``. Returns the overall status (``OK`` / ``WARN`` / ``ERROR`` / ``NONE``) plus a per-condition breakdown — exactly what's needed for "why is my QG failing?" or "is PR #42 passing the gate?" queries. ``NONE`` means the project exists but has no Quality Gate attached or no analysis yet. Examples: - Use when: "Is `einvy:aut_einvy` passing its Quality Gate?" → ``project_key='einvy:aut_einvy'``. - Use when: "Which conditions fail on PR #42?" → ``project_key=...``, ``pull_request='42'``. - Use when: "Does `feature/xyz` still pass the gate?" → add ``branch='feature/xyz'``. - Don't use when: You want raw metric values without the pass/fail verdict — ``sonarqube_project_metrics`` is leaner. - Don't use when: You want the list of failing projects org-wide — use ``sonarqube_worst_metrics`` with ``metric='alert_status'`` or aggregate manually.

branch string project_key string pull_request string
sonarqube_get_issues
annotations: none low

Search issues for a SonarQube project. Wraps ``/api/issues/search``. Use the filter parameters to narrow results — e.g. ``severities=['BLOCKER','CRITICAL']`` for triage, or ``types=['VULNERABILITY']`` for a security sweep. Pagination: if ``has_more`` is ``True``, call again with ``page + 1``. SonarQube caps total pagination at 10 000 issues; tighten the filters if you need to go deeper. Examples: - Use when: "Triage top BLOCKER / CRITICAL bugs in `einvy:aut_einvy`" → ``severities=['BLOCKER','CRITICAL']``, ``types=['BUG']``. - Use when: "Security sweep on the PR" → ``types=['VULNERABILITY']``, ``pull_request='42'``. - Use when: "Show closed issues from March 2024" → ``resolved=True`` (then post-process by creation_date). - Don't use when: You want an issue count only — ``get_issues`` always returns full issue objects; for a cheap count call with ``page_size=1`` and read ``total`` from the response. - Don't use when: You want **Security Hotspots** — they live on ``/api/hotspots/search`` (this tool rejects them with a clear error so you won't get silently empty results).

page string types string branch string resolved string page_size string severities string project_key string pull_request string
sonarqube_worst_metrics
annotations: none low

Rank projects by the worst value of a single metric. Algorithm: 1. Pull up to ``candidate_pool`` projects (optionally filtered by ``query``). 2. Bulk-fetch ``metric`` for all of them in one ``/api/measures/search`` call. 3. Sort descending or ascending depending on whether higher is worse (e.g. bugs → descending, coverage → ascending). 4. Return the top ``limit``. For fine-grained metrics (``bugs``, ``vulnerabilities``, ``code_smells``, ratings, ``duplicated_lines_density``, ``open_issues``) higher is worse. For ``coverage``, ``tests``, ``line_coverage``, ``branch_coverage`` — lower is worse. Examples: - Use when: "Top 10 worst-coverage services across the org" → ``metric='coverage'``, ``limit=10``. - Use when: "Which `einvy:*` projects have the most bugs?" → ``metric='bugs'``, ``query='einvy'``, ``limit=5``. - Use when: "What projects have the worst security rating?" → ``metric='security_rating'``. - Don't use when: You only care about one project — use ``sonarqube_project_metrics`` (one API call instead of two). - Don't use when: You want branch-specific ranking — SonarQube's ``/api/measures/search`` endpoint doesn't accept ``branch``, so this tool always ranks main-branch values.

limit string query string metric string candidate_pool string

Permissions 3

network medium
Server uses network capabilities via: requests, urllib
filesystem low
Server uses filesystem capabilities via: os
env_vars low
Server uses env_vars capabilities via: os.environ

Scan Findings 53

low
Tool 'sonarqube_list_projects' has no annotations annotation_checker · 100%
low
Tool 'sonarqube_project_metrics' has no annotations annotation_checker · 100%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-gm62-xv2j-4w53) dependency_analyzer · 95%
low
Tool 'sonarqube_quality_gate_status' has no annotations annotation_checker · 100%
low
Tool 'sonarqube_get_issues' has no annotations annotation_checker · 100%
low
Tool 'sonarqube_worst_metrics' has no annotations annotation_checker · 100%
info
Sandbox failed to start for behavioral verification behavioral_verifier · 100%
medium
Vulnerable dependency: mcp@1.2,<2 (GHSA-3qhf-m339-9g5v) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (GHSA-9h52-p55h-vw2f) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (GHSA-j975-95f5-7wqh) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (GHSA-jpw9-pfvf-9f58) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (GHSA-vj7q-gjh5-988w) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (PYSEC-2026-1616) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (PYSEC-2026-1617) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (PYSEC-2026-1618) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (PYSEC-2026-3482) dependency_analyzer · 95%
medium
Vulnerable dependency: mcp@1.2,<2 (PYSEC-2026-3483) dependency_analyzer · 95%
medium
Vulnerable dependency: requests@2.31 (GHSA-9hjg-9r4m-mvj7) dependency_analyzer · 95%
medium
Vulnerable dependency: requests@2.31 (GHSA-9wx4-h78v-vm56) dependency_analyzer · 95%
medium
Vulnerable dependency: requests@2.31 (GHSA-gc5v-m9x4-r6x2) dependency_analyzer · 95%
medium
Vulnerable dependency: requests@2.31 (PYSEC-2026-1872) dependency_analyzer · 95%
medium
Vulnerable dependency: requests@2.31 (PYSEC-2026-1873) dependency_analyzer · 95%
medium
Vulnerable dependency: requests@2.31 (PYSEC-2026-2275) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-2xpw-w6gg-jr37) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-34jh-p97f-mpxf) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-38jv-5279-wg99) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-g4mx-q9vg-27p4) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-pq67-6m6q-mj2v) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-qccp-gfcp-xxvc) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (GHSA-v845-jxx5-vc9f) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2023-192) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2023-212) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2026-141) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2026-1994) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2026-1995) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2026-1996) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2026-1998) dependency_analyzer · 95%
medium
Vulnerable dependency: urllib3@2.0 (PYSEC-2026-1999) dependency_analyzer · 95%
medium
Vulnerable dependency: pydantic@2.0 (GHSA-mr82-8j83-vxmv) dependency_analyzer · 95%
medium
Vulnerable dependency: pydantic@2.0 (PYSEC-2026-1812) dependency_analyzer · 95%
info
pyproject.toml metadata manifest_parser · 100%
info
Tool: sonarqube_list_projects manifest_parser · 90%
low
Permission: env_vars access detected permission_analyzer · 90%
info
No dependency files found for SBOM generation sbom_generator · 100%
medium
No build provenance detected (SLSA L0) slsa_assessor · 90%
info
Tool: sonarqube_project_metrics manifest_parser · 90%
info
Tool: sonarqube_quality_gate_status manifest_parser · 90%
info
Tool: sonarqube_get_issues manifest_parser · 90%
info
Tool: sonarqube_worst_metrics manifest_parser · 90%
info
Required env vars (3) manifest_parser · 80%
info
Sandbox failed to start for output poisoning scan output_poisoning · 100%
medium
Permission: network access detected permission_analyzer · 90%
low
Permission: filesystem access detected permission_analyzer · 70%