Atlas / MCP servers / sonarsource / SonarQube

SonarQubeCAUTION

mcp/sonarsource/sonarqube-1

Official SonarQube MCP Server for code quality and security in AI agents

Verdict
CAUTION
Grade
B
Trust score
87 /100
Exposed tools
—
Transport
stdio
License
NOASSERTION
Stars
655
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://github.com/SonarSource/sonarqube-mcp-server/actions/workflows/build.yml) [](https://sonarcloud.io/summary/newcode?id=SonarSourcesonarqube-mcp-server)

The SonarQube MCP Server is a Model Context Protocol (MCP) server that enables seamless integration with SonarQube Server or Cloud for code quality and security. It also supports the analysis of code snippet directly within the agent context.

Quick setup

Security best practices

🔒 Important: Your SonarQube token is a sensitive credential. Follow these security practices:

When using CLI commands:

  • Avoid hardcoding tokens in command-line arguments – they get saved in shell history
  • Use environment variables – set tokens in environment variables before running commands

When using configuration files:

  • Never commit tokens to version control
  • Use environment variable substitution in config files when possible

🚀 Generate your configuration

The fastest way to get started is the [SonarQube MCP Server Configuration Generator](https://mcp.sonarqube.com/config-generator.html) – an interactive tool that produces a ready-to-use configuration for your preferred AI agent client.

Manual setup

If you prefer to configure things yourself, the simplest method is to use our container image at sonarsource/sonarqube-mcp. Use sonarsource/sonarqube-mcp for automatic updates (with --pull=always), or pin to a version tag (e.g., sonarsource/sonarqube-mcp:1.19.0.2785) for reproducible deployments. Read below if you want to build it locally.

Note: While the
Read from source at commit 41ba54e99af7OBSERVED · 2026-09-28
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code (oci)
claude mcp add sonarqube-mcp --env SONARQUBE_TOKEN=${SONARQUBE_TOKEN} --env SONARQUBE_ORG=${SONARQUBE_ORG} --env SONARQUBE_URL=${SONARQUBE_URL} -- docker run -i --rm docker.io/sonarsource/sonarqube-mcp:None
03

Trust audit

CAUTIONgrade B · trust 87/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryWARN
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (1 observation(s))
Network
declared (1 observation(s))
Shell
none-observed
Dependencies
pinned
Secrets in source
found

Findings (12)

MEDIUMInventory / provenance · inv.binary · CWE-1104
gradle/wrapper/gradle-wrapper.jar
gradle-wrapper.jar
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
src/main/java/org/sonarsource/sonarqube/mcp/analytics/AnalyticsClient.java:35
private static final String API_KEY = "1b8EU3XmRk5MKpIhqzKoD54LzfplrL2X1RLkLzLA";
LOWInventory / provenance · inv.binary · CWE-1104
src/test/resources/ssl/test-keystore.p12
test-keystore.p12
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/http-authentication-architecture.md:277
- When bound to `127.0.0.1` or `localhost` (default): localhost browser origins (`http://localhost`, `http://127.0.0.1`, `http://[::1]`, with any port).
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
src/test/java/org/sonarsource/sonarqube/mcp/analytics/AnalyticsClientTest.java:234
System.setProperty(AnalyticsClient.PROPERTY_ANALYTICS_ENDPOINT, "http://192.0.2.1:9999/mcp");
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
src/test/java/org/sonarsource/sonarqube/mcp/transport/HttpServerTransportIntegrationTest.java:65
var expectedUrl = "http://127.0.0.1:" + testPort + "/mcp";
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
src/test/java/org/sonarsource/sonarqube/mcp/transport/HttpServerTransportIntegrationTest.java:110
var healthUrl = "http://127.0.0.1:" + testPort + McpSecurityFilter.HEALTH_ENDPOINT;
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
src/test/java/org/sonarsource/sonarqube/mcp/transport/HttpServerTransportIntegrationTest.java:129
var infoUrl = "http://127.0.0.1:" + testPort + McpSecurityFilter.INFO_ENDPOINT;
LOWObfuscation / stealth · obf.base64_blob · CWE-506, CWE-94
README.md:147
[![Install for SonarQube Cloud](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=sonarqube&config=eyJlbnYiOnsiU09OQVJRVUJFX1RPS0VOIjoiWU9VUl9UT0tFTiIsIlNPTk
LOWObfuscation / stealth · obf.base64_blob · CWE-506, CWE-94
README.md:153
[![Install for SonarQube Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=sonarqube&config=eyJlbnYiOnsiU09OQVJRVUJFX1RPS0VOIjoiWU9VUl9VU0VSX1RPS0VOI
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
README.md:1645
This server collects anonymous usage data and sends it to SonarSource to help improve the product. No source code or IP address is collected, and SonarSource does not share the data with anyone else. 
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWInventory / provenance · mcp.no_tools_extracted · CWE-1104
server.json
Why it matters. the tool list is enumerated at runtime by tools/list, not declared in source
Fix. the page says so rather than showing an empty table

Gates applied: no_behavioural_pass.

Audited 2026-09-28 · audit v0.4.1 · source sha 41ba54e99af7full audit observations/trust-audit/mcp-server/sonarsource__sonarqube-1.json · Report an issue / request a re-scan
04

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-09-2841ba54e99af7CAUTIONB87first audit
05

Questions

What is the SonarQube MCP server?

Official SonarQube MCP Server for code quality and security in AI agents

Is SonarQube safe to connect to an agent?

With care. The audit graded it B (87/100) and found 12 things worth knowing before you trust this server, listed below with the exact line each was found on.

What credentials does SonarQube need?

It reads SONARQUBE_ORG, SONARQUBE_TOKEN and SONARQUBE_URL from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does SonarQube run?

It speaks stdio, so it runs as a local process your client starts.

How current is this page?

The grade is for one exact copy of the source (41ba54e99af7), read on 2026-09-28. The repository is watched and re-audited when it changes.

Advertisement