
SonarQube MCP Server
by sonarsourceio.github.SonarSource/sonarqube-mcp-serverv1.21.0
Provides seamless integration with SonarQube Server or Cloud, and enables analysis of code snippets directly within the agent context
context tax
queued
security
queued
cold start
queued
freshness
Active1d ago
Install SonarQube MCP server
Install in Claude Code
claude mcp add sonarqube -e SONARQUBE_TOKEN='<sonarqube-token>' -e SONARQUBE_ORG='<sonarqube-org>' -e SONARQUBE_URL='<sonarqube-url>' -- docker run -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG -e SONARQUBE_URL docker.io/sonarsource/sonarqube-mcpInstall in Cursor
{
"mcpServers": {
"sonarqube": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_ORG",
"-e",
"SONARQUBE_URL",
"docker.io/sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<sonarqube-token>",
"SONARQUBE_ORG": "<sonarqube-org>",
"SONARQUBE_URL": "<sonarqube-url>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"sonarqube": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_ORG",
"-e",
"SONARQUBE_URL",
"docker.io/sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<sonarqube-token>",
"SONARQUBE_ORG": "<sonarqube-org>",
"SONARQUBE_URL": "<sonarqube-url>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"sonarqube": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_ORG",
"-e",
"SONARQUBE_URL",
"docker.io/sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<sonarqube-token>",
"SONARQUBE_ORG": "<sonarqube-org>",
"SONARQUBE_URL": "<sonarqube-url>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"sonarqube": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_ORG",
"-e",
"SONARQUBE_URL",
"docker.io/sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<sonarqube-token>",
"SONARQUBE_ORG": "<sonarqube-org>",
"SONARQUBE_URL": "<sonarqube-url>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| SONARQUBE_TOKEN | yes | yes | Your SonarQube USER token |
| SONARQUBE_ORG | — | yes | Your SonarQube Cloud organization key (if using SonarQube Cloud) |
| SONARQUBE_URL | — | yes | Your SonarQube Server URL (if using SonarQube Server) |
Freshness
Active — last maintenance signal 1d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-08 · 1d ago · GitHub
Latest release
2026-09-29 · 10d ago · GitHub · 1.28.0.4397
Package published
no data · npm/PyPI
Registry entry updated
2026-06-25 · 4mo ago · official registry · v1.21.0
FAQ
›How do I install the SonarQube MCP server in Claude Code?
Run: claude mcp add sonarqube -e SONARQUBE_TOKEN='<sonarqube-token>' -e SONARQUBE_ORG='<sonarqube-org>' -e SONARQUBE_URL='<sonarqube-url>' -- docker run -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG -e SONARQUBE_URL docker.io/sonarsource/sonarqube-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does SonarQube require an API key?
Yes. It expects SONARQUBE_TOKEN, SONARQUBE_ORG, SONARQUBE_URL, of which 3 are secrets.
›Can I use SonarQube as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is SonarQube in the official MCP registry?
Yes, as io.github.SonarSource/sonarqube-mcp-server.