Use this file to discover all available pages before exploring further.
The SonarQube app provides read/write access to the SonarQube and SonarQube Cloud Web API. It can be used either as a Builder app (automations call SonarQube instructions directly) or as a remote MCP server consumed by a Knowledges agent — covering projects, components, issues, security hotspots, measures, metrics, quality gates, quality profiles, rules, user tokens, analyses, branches, webhooks and SVG badges.
Code Quality
Issues, security hotspots, rules and quality profiles to triage code findings
Project Insights
Measures, metric definitions, history, quality gate status and analyses
Admin & Operations
Projects, branches, webhooks, user tokens and SVG badges
Base URL of the SonarQube API. Defaults to https://sonarcloud.io/api — replace with your self-hosted instance URL when applicable
API Token
SonarQube User Token, stored as a workspace secret. Passed as Authorization: Bearer <token>
MCP Endpoint
Auto-populated on install — URL of the MCP endpoint for this instance
MCP API Key
Auto-populated on install — signed key used in the mcp-api-key header. Do not modify
MCP Endpoint and MCP API Key are generated automatically by the onInstall flow and are only needed to expose this instance as an MCP server (see the next tab).
Every instruction resolves credentials from the workspace configuration. SonarQube identifiers are project keys, component keys, issue keys, rule keys and login names — never numeric IDs except for quality-gate gateId. Most list / search operations accept p (page index, 1-based) and ps (page size, max 500) for pagination.
Arguments flagged with * are required. On SonarCloud, most search and create operations also require an organization key — pass it explicitly or default it in your automation.
The SonarQube app ships with a built-in MCP server. Each app instance gets its own signed mcp-api-key that encodes the workspace ID and a credentials lookup URL — the SonarQube User Token itself is never passed through headers and is resolved server-side from the app configuration.
Use this flow to plug the SonarQube MCP into a Knowledges agent that does not yet support the native MCP picker.
1
Install the SonarQube app
Install and configure the app in the same workspace as your agent (see the Usage as App tab). Once configured, mcpEndpoint and mcpApiKey are auto-populated.
2
Copy the MCP credentials
Open the app instance config and copy the values of MCP Endpoint and MCP API Key.
3
Open your Knowledges project
Navigate to Advanced > Tools.
4
Add an MCP tool
Click Add and select the MCP tab.
5
Fill in the endpoint
Paste the MCP Endpoint URL copied from the app instance.
6
Add the auth header
In the Headers field, add the signed API key:
{ "mcp-api-key": "your-mcp-api-key"}
7
Save
The agent can now list and call SonarQube tools through the MCP endpoint.
The signed mcp-api-key encodes the workspace ID and the getConfig webhook URL. The MCP server validates the signature using the central app secret and transparently fetches the SonarQube User Token and base URL from the installed app. Credentials are cached per tenant for 10 minutes.
Search for issues. For “my issues / mes issues” pass assignees: __me__ (or author: __me__ for issues you reported). To filter unresolved, pass statuses: OPEN,CONFIRMED,REOPENED
assignIssue
Assign or unassign an issue (omit assignee to unassign)
transitionIssue
Perform a workflow transition on an issue
addIssueComment
Add a comment to an issue
setIssueTags
Set tags on an issue (comma-separated; empty to clear)
“Not configured” — The app instance has no User Token. Generate one in SonarQube > My Account > Security > Generate Tokens and paste it in the app configuration.“Invalid API key” (MCP) — The mcp-api-key header does not match the central app secret. Reinstall the app instance to regenerate a signed key.“Credentials lookup failed” — The MCP endpoint could not reach the getConfig webhook of the installed app. Verify that the app instance is still installed in the expected workspace.“organization parameter is missing” — On SonarCloud, most search and create operations require the organization key. Pass it explicitly in the tool arguments or as a default in your DSUL automation.Badge tools return non-SVG content — getProjectMeasureBadge and getProjectQualityGateBadge return raw SVG. The MCP transport currently surfaces them as JSON-encoded strings; consume them in App mode (DSUL) to write the SVG straight to a file or HTTP response.