MCP Server Studio
Read-only SonarQube Community Build access for AI agents: issues, hotspots, rules, code snippets
Registry name: io.github.igorolv/sonar-mcp-server
Add to claude_desktop_config.json:
{
"mcpServers": {
"sonar-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL",
"-e",
"SONAR_TOKEN",
"-e",
"SONAR_DEFAULT_PROJECT_KEY",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<SONAR_URL>",
"SONAR_TOKEN": "<SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}Run in your terminal:
claude mcp add sonar-mcp-server -e SONAR_URL='<SONAR_URL>' -e SONAR_TOKEN='<SONAR_TOKEN>' -e SONAR_DEFAULT_PROJECT_KEY='<SONAR_DEFAULT_PROJECT_KEY>' -- docker run -i --rm -e SONAR_URL -e SONAR_TOKEN -e SONAR_DEFAULT_PROJECT_KEY ghcr.io/igorolv/sonar-mcp-server:0.1.0Add to .cursor/mcp.json:
{
"mcpServers": {
"sonar-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL",
"-e",
"SONAR_TOKEN",
"-e",
"SONAR_DEFAULT_PROJECT_KEY",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<SONAR_URL>",
"SONAR_TOKEN": "<SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}Add to .vscode/mcp.json:
{
"servers": {
"sonar-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL",
"-e",
"SONAR_TOKEN",
"-e",
"SONAR_DEFAULT_PROJECT_KEY",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<SONAR_URL>",
"SONAR_TOKEN": "<SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"sonar-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL",
"-e",
"SONAR_TOKEN",
"-e",
"SONAR_DEFAULT_PROJECT_KEY",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<SONAR_URL>",
"SONAR_TOKEN": "<SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}| Name | Required | What it is |
|---|---|---|
SONAR_URL | Yes | Base URL of the SonarQube instance, e.g. https://sonar.example.com |
SONAR_TOKEN | Yes | SonarQube user token (My Account -> Security -> Generate Tokens) |
SONAR_DEFAULT_PROJECT_KEY | No | Project key used when a tool call does not name one |