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.
Strongest · Documentation 17/20 Weakest · Reliability 10/20
Static review · not runListed 2026-08-07
Read the FMRS scoring method →Runtime:Docker
SONARQUBE_TOKEN
SonarQube user token from your account's Tokens page; must be a USER token when connecting to SonarQube Server.
SONARQUBE_ORG
SonarQube Cloud organization key, found at sonarcloud.io/account/organizations; setting it selects Cloud mode.
SONARQUBE_URL
SonarQube Server URL (or https://sonarqube.us for Cloud US); required when SONARQUBE_ORG is not set.
SONARQUBE_HTTPS_KEYSTORE_PASSWORD
HTTPS keystore password; treat as a secret.
STORAGE_PATH
Mandatory absolute path to a writable directory for logs and server files; provided automatically by the container image.
SONARQUBE_PROJECT_KEY
Optional default project key; removes the projectKey parameter from tools that require it.
SONARQUBE_IDE_PORT
Port (64120-64130) used to connect with SonarQube for IDE.
SONARQUBE_DEBUG_ENABLED
Set to true to enable debug logging to file and STDERR for troubleshooting.
SONARQUBE_LOG_TO_FILE_DISABLED
Set to true to disable file logging entirely; useful in containerized environments.
SONARQUBE_TOOLSETS
Comma-separated list of toolsets to enable; reduces context overhead by disabling others.
SONARQUBE_READ_ONLY
Set to true to disable all write operations such as changing issue status.
SONARQUBE_TRANSPORT
Set to http or https to enable Streamable HTTP transport; defaults to stdio.
SONARQUBE_HTTP_PORT
Listening port for HTTP(S) mode, default 8080.
SONARQUBE_HTTP_HOST
Host to bind in HTTP(S) mode, defaults to 127.0.0.1.
SONARQUBE_HTTP_ALLOWED_ORIGINS
Comma-separated browser origins allowed for CORS.
SONARQUBE_MCP_IN_CONTAINER
Set to true when running in other OCI runtimes (Podman, Kubernetes); the official image sets it automatically.
SONARQUBE_HTTPS_KEYSTORE_PATH
Path to the keystore file (.p12 or .jks) for HTTPS mode.
SONARQUBE_HTTPS_KEYSTORE_TYPE
Keystore type (PKCS12 or JKS), default PKCS12.
{
"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>"
}
}
}
}
Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"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>"
}
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
claude mcp add sonarqube -e 'SONARQUBE_TOKEN=<your-token>' -e 'SONARQUBE_ORG=<your-org>' -- docker run --init --pull=always -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG sonarsource/sonarqube-mcp
Run it in a terminal; replace any <…> placeholders with your own values first.
After starting the client, confirm the sonarqube tools (e.g. search_my_sonarqube_projects) appear in the tool list, or ask it to list your SonarQube projects to prove the connection works.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
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.
Upstash's official server providing up-to-date third-party library docs for AI coding assistants
AI-powered NPM package analysis MCP server
An independent control layer that gives AI coding agents budgets, brakes, and receipts
GitHub's official MCP server for managing repos, issues, PRs, and workflows via natural language
Source revision f579f7658136 Data synced 2026-10-12 Read the FMRS scoring method