MCP server · SonarSource
SonarQube MCP Server
Pick it if your project already runs on SonarQube Cloud or Server and you want the agent to read issues and quality gates during review; set SONARQUBE_READ_ONLY=true for review-only use.
Install
Run the `sonarsource/sonarqube-mcp` container from your client's MCP config (e.g. `claude mcp add sonarqube`), or use the official configuration generator (see README). Official install docs ↗
Credentials: SonarQube user token (SONARQUBE_TOKEN). SonarQube Cloud: SONARQUBE_ORG is optional and fixes the organization (Cloud US also needs SONARQUBE_URL=https://sonarqube.us); SonarQube Server: SONARQUBE_URL with a USER token.
What it can access
Reads issues, quality gates, measures, security hotspots, coverage and rules from SonarQube Cloud or Server with the token's rights, and can analyze file content; some tools write (e.g. changing issue status) unless SONARQUBE_READ_ONLY=true. Sends anonymous usage telemetry unless TELEMETRY_DISABLED=true.
Minimal safe setup
SONARQUBE_READ_ONLY=truedisables write tools (e.g. changing issue status) and combines withSONARQUBE_TOOLSETSto expose only the toolsets you list (projectsis always on). source ↗- Pin one project with
SONARQUBE_PROJECT_KEYso the agent can't wander across projects; SonarQube Server needs a USER token. source ↗ - The server sends anonymous usage telemetry unless
TELEMETRY_DISABLED=true. source ↗ - Tool count isn't measured: it ships as a Docker image and needs a real SonarQube token. source ↗
Common setup errors
- You think SonarQube Cloud needs
SONARQUBE_ORG. - It doesn't: only
SONARQUBE_TOKENis required.SONARQUBE_ORGfixes the organization; without it the agent can calllist_organizationsand passorganizationper call. Cloud US also needsSONARQUBE_URL=https://sonarqube.us. source ↗ - Organization arguments are rejected.
- When
SONARQUBE_ORGis set (stdio) theorganizationargument is removed from schemas and rejected, just likeprojectKeywhenSONARQUBE_PROJECT_KEYis set. source ↗ - Hard-to-diagnose connection or config problems.
- Set
SONARQUBE_DEBUG_ENABLED=true(logs to file and STDERR); in throwaway containersSONARQUBE_LOG_TO_FILE_DISABLED=truestops log files. source ↗
How it differs from alternatives
- Snyk MCP: Dependency, code and container security scans from the Snyk CLI. Measured: 14 tools, ~6,713 tokens.
- GitHub MCP Server: Code scanning and Dependabot alerts if you rely on GitHub Advanced Security. Measured: 46 tools, ~11,131 tokens.
Notes written from the official sources linked above, checked 2026-10-29.
Details
- Type
- MCP server
- Tasks
- Code review
- Compatible agents
- Google Antigravity, Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Kiro, VS Code, Windsurf, Zed (source: clients with a setup heading or install/config instructions in the official README)
- Maintenance
- Release 1.30.0.4763 on 2026-10-23; last commit 2026-10-26
- License
- SONAR Source-Available License v1.0 (per LICENSE; GitHub detects no SPDX license)
- Source
- https://github.com/SonarSource/sonarqube-mcp-server
- Verified on
- 2026-10-26
No independent security audit: entries summarize official sources only. Review permissions and code before installing.
Setup guide: How to connect the SonarQube MCP server to Claude Code · How to connect the SonarQube MCP server to Cursor
Compared in: Best MCP servers for Code review
Badge for your README (maintainers)
The badge only says it's listed; it is not a security review or an endorsement.