SonarQube MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SONAR_TOKEN | No | SonarQube token, lowest precedence. Required for private projects. | |
| SONAR_HOST_URL | No | SonarQube host URL, used when SONARQUBE_DASH_HOST is not set (e.g. https://sonarqube.example.com or http://127.0.0.1:9000). There is no default host and the server exits at start-up without one. | |
| SONARQUBE_TOKEN | No | SonarQube token, used when SONARQUBE_DASH_TOKEN is not set. Alternative to SONAR_TOKEN. Required for private projects. | |
| SONARQUBE_DASH_HOST | No | SonarQube host URL, highest precedence. Alternative to SONAR_HOST_URL. There is no default host and the server exits at start-up without one. | |
| SONARQUBE_DASH_TOKEN | No | SonarQube token, highest precedence. Alternative to SONARQUBE_TOKEN or SONAR_TOKEN. Required for private projects; never returned and redacted from error messages. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sonarqube_quality_gateA | Explain why a quality gate is red: status, new-code period, and conditions with the failing ones first (ratings as A-E) |
| sonarqube_issuesB | Search a project's unresolved issues with file, line, rule, severity, type, message, author and creation date |
| sonarqube_measuresB | Read measures for a project, e.g. coverage, bugs, new_coverage, reliability_rating (ratings shown as A-E) |
| sonarqube_issue_sourceA | Show the source lines around a line of a component, as returned by sonarqube_issues (component and line) |
| sonarqube_branchesA | List a project's branches with their quality gate status and last analysis date |
| sonarqube_projectsA | List or search projects the token can see |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Most tools target clearly distinct resources: projects, branches, issues, issue source, measures, and quality gate. There is some potential overlap between sonarqube_quality_gate and sonarqube_measures because both surface ratings/metrics, and sonarqube_branches also includes quality gate status, but the descriptions make their scopes sufficiently distinct.
All tools use a consistent sonarqube_ prefix and snake_case resource-oriented naming. The convention is predictable throughout, with no mixed camelCase or inconsistent verb styles.
Six tools is well within the appropriate range and each tool maps to a core read-only SonarQube workflow. The surface is focused without obvious redundant tools.
The set covers project discovery, branches, unresolved issues, source context, measures, and quality gate explanation, forming a coherent triage workflow. Minor gaps exist for adjacent SonarQube data such as security hotspots and rule metadata, but core agent needs are covered.