Summary
Let your AI read SonarQube: projects, quality gate status, measures such as coverage and their history, open issues by severity and software quality, analyses and branches. SonarQube Server or SonarQube Cloud, read-only, with a user token.
Guided setup
Connect SonarQube to Claude in 2 minutes
Start a free trial on AnythingMCP Cloud, connect SonarQube in the guided setup, then add your MCP URL to Claude. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
AnythingMCP is listed in Claude's connector directory: add it to Claude in one click (opens in a new tab), then sign in and choose which MCP servers Claude may use.
Try asking
Example prompts for SonarQube
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → SonarQube, paste your credentials, mint an MCP API key — done. No Docker, no
git clone, no local server.
SonarQube + Claude
Let your AI read SonarQube: projects, quality gate status, measures such as coverage and their history, open issues by severity and software quality, analyses and branches. SonarQube Server or SonarQube Cloud, read-only, with a user token.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
SONARQUBE_URL, SONARQUBE_TOKEN
Step 1 — Get credentials
Setting up takes about 3 minutes. You need a SonarQube Server (the free Community Build works) or a SonarQube Cloud account with at least one analyzed project, and a user token.
- Set
SONARQUBE_URL, without/apiand without a trailing slash:https://sonarcloud.iofor SonarQube Cloud in the EU region,https://sonarqube.usfor SonarQube Cloud in the US region, or your SonarQube Server's address as you open it in the browser, including any context path (for examplehttps://sonar.example.comorhttps://example.com/sonarqube). - Create a user token and paste it into
SONARQUBE_TOKEN, without the word Bearer. On Server: avatar → My Account → Security, then generate a token of type User. On Cloud: avatar → My Account → Access tokens → Personal Tokens, then generate a token. Project and global analysis tokens are for running scans and do not work for the Web API. - On SonarQube Cloud, set
SONARQUBE_ORGANIZATIONto your organization key, shown in the URLsonarcloud.io/organizations/<key>. Cloud needs it to list projects and search issues. On Server, leave it empty. - Install the connector and run
sonarqube_list_projects: it lists the projects the token can browse, with the project keys the other tools take.
What it reads: whether a project passed its quality gate (OK or ERROR, with each failing condition), current measures such as coverage, duplicated_lines_density, ncloc and the software_quality_* issue counts, how those measures changed from analysis to analysis, issues filtered by software quality (SECURITY, RELIABILITY, MAINTAINABILITY), severity and status, the project's analyses with their events, and its branches with their last analysis and gate status. All 7 tools are read-only, and the token decides which projects the AI sees.
Projects and branches: tools take the project key (for example payments-api, or my-org_payments-api on Cloud), not the display name. Without branch or pullRequest they read the main branch. The Community Build analyzes only the main branch.
Private network: on a self-hosted AnythingMCP, a SonarQube Server on an internal host or a private IP needs that host in SSRF_ALLOWED_HOSTS, or the outbound guard refuses the call. AnythingMCP Cloud can only reach SonarQube Cloud or a SonarQube Server that is reachable from the public internet.
Limits: list tools return up to 500 items per page (1,000 for sonarqube_get_measures_history). Issue search returns at most 10,000 results in total, so narrow the filters instead of paging further. SonarQube Cloud answers 429 when a token sends too many requests: wait a few minutes and try again. SonarQube Server has no rate limit by default.
Common errors: 401 means the token is wrong, expired or revoked, or is an analysis token instead of a user token. 403 means the token's user lacks Browse permission on the project. 404 means the project key, branch or pull request does not exist, or SONARQUBE_URL is wrong. 400 names the missing or invalid parameter, for example a missing organization on Cloud.
The connector does not change anything in SonarQube (no issue transitions, assignments or comments, no quality gate, quality profile, project or token changes), and does not cover security hotspots, portfolios and applications, Web API v2, administration and system endpoints, or new-code-only issue filters.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Claude
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Recommended path — works on claude.ai web without editing any config file.
- In Claude, open Customize → Connectors.
- Click +, then Add custom connector.
- Enter a name, e.g.
SonarQube, and the remote MCP server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID, then click Add. - Click Connect and sign in to AnythingMCP (OAuth) to allow access.
All tools below appear in your chat — start typing prompts.
Available tools
| Tool | What it does |
|---|---|
sonarqube_list_projects | List the SonarQube projects the token can browse, with their key and name |
sonarqube_get_quality_gate_status | Read whether a project passed its quality gate: the overall status (OK or ERROR) and each condition with its metric, threshold and actual… |
sonarqube_get_measures | Read the current value of one or more metrics for a project, such as coverage, duplicated_lines_density, ncloc or… |
sonarqube_get_measures_history | Read how metrics changed over time for a project: one value per analysis, with its date |
sonarqube_search_issues | Search issues in one or more projects: rule, message, file and line, impacts (software quality and severity), status, assignee and creation… |
sonarqube_list_project_analyses | List the analyses of a project, newest first, with their date, version and events such as quality gate changes or new versions |
sonarqube_list_branches | List the branches of a project with their type, whether one is the main branch, the date of its last analysis and its quality gate status |
FAQ
Does it work with Claude Code as well as Claude Desktop? Yes — point both at https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID.
Next steps
Was this guide helpful?