Best for
- Teams using SonarQube
- Developers who want to integrate static analysis into AI workflows
- Organizations needing automated code review and compliance checks
The SonarQube MCP Server is an officially maintained server providing a rich set of code quality and security tools, supporting multiple clients and transports, but requires valid SonarQube credentials and careful security configuration.
The SonarQube MCP Server is an official MCP server that enables AI agents to directly access code quality and security data from SonarQube Server or Cloud. It supports analyzing code snippets directly in the agent context and provides a rich set of tools for searching issues, security hotspots, quality gates, coverage, dependency risks, and more. The server supports both Stdio and Streamable HTTP transports, with configurable options like selective toolset enablement, read-only mode, and workspace mounting to reduce context usage. It works with all major AI coding assistants, including Claude, VS Code, Cursor, and others.
{
"mcpServers": {
"sonarqube": {
"command": "docker",
"args": [
"run",
"--init",
"--pull=always",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_ORG",
"sonarsource/sonarqube-mcp"
],
"env": {
"SONARQUBE_TOKEN": "<your-token>",
"SONARQUBE_ORG": "<your-org>"
}
}
}
}