Skip to content
VS Code

SonarQube MCP Server for VS Code

io.github.sonarsource/sonarqube-mcp-server

Analyze code quality and security with SonarQube Server or Cloud directly in AI assistants.

client:VS Code transport:stdio runtime:oci

Install SonarQube MCP Server in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "sonarqube-token",
      "description": "SONARQUBE_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "sonarqube-org",
      "description": "SONARQUBE_ORG",
      "password": true
    },
    {
      "type": "promptString",
      "id": "sonarqube-url",
      "description": "SONARQUBE_URL",
      "password": true
    }
  ],
  "servers": {
    "sonarqube-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/sonarsource/sonarqube-mcp"
      ],
      "env": {
        "SONARQUBE_TOKEN": "${input:sonarqube-token}",
        "SONARQUBE_ORG": "${input:sonarqube-org}",
        "SONARQUBE_URL": "${input:sonarqube-url}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

SonarQube MCP Server in other clients