SonarQube
On this page
Connects Kotharo to SonarQube for static analysis. All adapters
What you need
- An MCP server for SonarQube, connected in Claude Code.
- The
dockercommand, from Docker.
Connect
/kotharo:setup finds SonarQube and takes you through these steps. To connect it by hand:
Make a user token in SonarQube under My Account, Security; project and organization tokens don't work. Run the connect command yourself with Docker running; setup never asks for a token. For SonarQube Server, put --env SONARQUBE_URL=<server url> and -e SONARQUBE_URL in place of the SONARQUBE_ORG pair. For SonarQube Cloud's US region, add --env SONARQUBE_URL=https://sonarqube.us and -e SONARQUBE_URL.
claude mcp add --scope user sonarqube --env SONARQUBE_TOKEN=<user token> --env SONARQUBE_ORG=<organization> --env SONARQUBE_READ_ONLY=true --env SONARQUBE_TOOLSETS=issues,quality-gates -- docker run -i --rm --init --pull=always -e SONARQUBE_TOKEN -e SONARQUBE_ORG -e SONARQUBE_READ_ONLY -e SONARQUBE_TOOLSETS sonarsource/sonarqube-mcpInstall Docker. Its install page covers other systems.
macOS:
curl -fsSLo Docker.dmg https://desktop.docker.com/mac/main/arm64/Docker.dmg
sudo hdiutil attach Docker.dmg
sudo /Volumes/Docker/Docker.app/Contents/MacOS/install
sudo hdiutil detach /Volumes/DockerWindows, in Git Bash:
curl -fsSLo "Docker Desktop Installer.exe" "https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe"
"./Docker Desktop Installer.exe" install --userLinux:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.shSign in
The user token in the connect command is the sign-in; SonarQube's MCP server has no OAuth. Restart Claude Code after connecting. The token's user needs Browse on the project.