SonarQube
Official SonarQube MCP for code quality, code security, quality gates, issues, and SonarQube Cloud or Server context.
Installation path
Choose Add Server, select Local MCP, use docker as the command, run the mcp/sonarqube image over stdio, and pass SONARQUBE_TOKEN plus SONARQUBE_ORG for Cloud or SONARQUBE_URL for Server.
Setup steps
- 01
Install Docker
Make sure Docker is installed and running locally.
- 02
Open Add Server
Configuration → MCP Registry → Add Server in Cosmos.
- 03
Pick the Local MCP tab
- 04
Set the command
Command
docker - 05
Add the arguments
Args
run --init --pull=always -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG mcp/sonarqube - 06
Set environment variables
Use SONARQUBE_URL instead of SONARQUBE_ORG for SonarQube Server.
SONARQUBE_TOKEN
SONARQUBE_TOKEN=<sonarqube_token>SONARQUBE_ORG
SONARQUBE_ORG=<org_key> - 07
Click Add, then enable
Toggle on Cosmos Agent or CLI.
Local command
Suggested name: sonarqube
docker run --init --pull=always -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG mcp/sonarqubeFor SonarQube Server, replace SONARQUBE_ORG with SONARQUBE_URL in the environment and command.
Authentication
API token via env (SONARQUBE_TOKEN). Add SONARQUBE_ORG for SonarQube Cloud or SONARQUBE_URL for SonarQube Server.
| Variable | Example | Required |
|---|---|---|
| SONARQUBE_TOKEN | <sonarqube_token> | Yes |
| SONARQUBE_ORG | <org_key> | Yes |