Skip to content

SonarQube MCP Server

Bring SonarQube issues, quality gates and on-the-spot code analysis into Claude.

Officialby SonarSourceHosted or on your computerChecked November 8, 2026

SonarSource's official MCP server connects Claude to SonarQube Cloud or SonarQube Server, so it can look up issues, quality gate status, coverage, security hotspots and dependency risks for your projects, change an issue's status and vet a package before you add it. SonarQube Cloud now hosts the server at api.sonarcloud.io/mcp with an OAuth sign-in, so Claude Code, claude.ai, ChatGPT and Cursor connect without Docker, and a read-only switch and toolset filters limit what Claude can change.

Who is SonarQube MCP for?

  • Development teams that use SonarQube
  • Tech leads tracking code quality
  • Security reviewers

What can you ask SonarQube MCP to do?

Once it is connected, ask in plain words. Your AI tool decides when to use the server and asks before it changes anything important.

Prompt 1
Why is the quality gate failing on my-api, and which issues should I fix first?
Prompt 2
List the open security hotspots in the payments project and explain each one.
Prompt 3
Before I add this npm package, check it for known vulnerabilities and license problems.

How to connect SonarQube to Claude

MCP is an open standard. The setup steps below cover this server in Claude Code, Claude app, Codex, ChatGPT, Cursor, VS Code, Gemini CLI, Antigravity, OpenCode, Windsurf. Pick your tool:

New to MCP? Read what an MCP server is and how to add one.

Easiest: paste this into Claude Code
Connect the SonarQube MCP server to Claude Code for me: run this command: claude mcp add --transport http sonarqube https://api.sonarcloud.io/mcp
If a value starts with YOUR_, ask me for it first. When it is connected, help me sign in if needed and show me one thing I can ask it to do.

Or do it yourself:

claude mcp add --transport http sonarqube https://api.sonarcloud.io/mcp

Type /mcp inside Claude Code, pick the server and choose Authenticate to sign in.

Hosted address: https://api.sonarcloud.io/mcp

Unlock the setup steps

Free. Leave your email once to open the setup steps for all 152 servers, and get the best new connectors each month.

No spam. One click to unsubscribe. We use your email to send you this bonus, new guides and news about our courses.

Good to know

This is the SonarQube Cloud-hosted server: sign in with OAuth when asked, and use https://api.sonarqube.us/mcp for a US-region organization. It has a smaller, fixed tool set. For SonarQube Server or the full tool set, run the Docker image instead: claude mcp add sonarqube --env SONARQUBE_TOKEN=YOUR_SONARQUBE_TOKEN --env SONARQUBE_URL=YOUR_SERVER_URL -- docker run --init --pull=always -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_URL sonarsource/sonarqube-mcp (SonarQube Cloud users pass SONARQUBE_ORG instead of SONARQUBE_URL). Add SONARQUBE_READ_ONLY=true to block write actions.

How did we check SonarQube MCP?

Last source check (November 8, 2026): the SonarSource/sonarqube-mcp-server repo (source-available under the SONAR Source-Available License, release 1.31.0 at the time; on November 22, 2026 GitHub showed release 1.33.0.5260 from November 20 and 693 stars), Sonar's docs for the SonarQube Cloud-hosted server and its plans page. The hosted endpoint answered our MCP request with an OAuth challenge for the mcp:tools:read and mcp:tools:write scopes. We have not connected a SonarQube organization.

Source: github.com/SonarSource/sonarqube-mcp-server

What to do next

If your team already uses SonarQube Cloud, connect the hosted server and ask prompt 1 about one project; if not, the free plan is enough to try it on a small repo. Then write your quality gate rules into CLAUDE.md, so Claude checks them before it calls a task done: the free CLAUDE.md guide has templates and a monthly review, and the Claude Code course (early access) has a lesson on the CLAUDE.md file.

What do people ask about SonarQube MCP?

Do I need Docker for the SonarQube MCP server?

Not for SonarQube Cloud. SonarQube Cloud hosts the server at https://api.sonarcloud.io/mcp so you only add that URL and sign in with OAuth; Sonar lists Claude Code, claude.ai, ChatGPT, Codex, Cursor and VS Code among the approved clients. Docker or another container runtime is needed only to run the server yourself, which SonarQube Server and the full tool set require.

What does SonarQube cost with Claude?

The MCP server costs nothing. SonarQube Cloud's free tier covers private projects up to 50,000 lines of code, and public open source projects are free; the paid Team plan starts at $34 a month (sonarsource.com/plans-and-pricing, checked November 8, 2026).

Can Claude change anything in SonarQube?

Yes, a few tools write, such as change_sonar_issue_status. Set SONARQUBE_READ_ONLY to true (an environment variable on the local server, a header on the hosted one) to block every write, and SONARQUBE_TOOLSETS to load only the toolsets you need. With OAuth, the mcp:tools:read and mcp:tools:write scopes split read and write access the same way.

What does the hosted server leave out?

It has a smaller, fixed tool set: heavy analysis tools are switched off to protect Sonar's shared infrastructure, and Sonar Vortex analysis and the SonarQube for IDE bridge are left out because they need your local files. Run the Docker server on your computer when you need those.

We wrote these answers from the official pages of each product named, read on November 8, 2026.