Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

MCP server · Code and developer tools

SonarQube MCP server

Connects an assistant to SonarQube Cloud or Server to analyse code, review issues and hotspots, and check quality gates.

Maintainer
SonarSource (official)
Licence
Not published (hosted service)
Runs
Locally (docker)
Sign-in
A token or API key
Registry version
1.21.0 (updated 2026-06-25)
Last activity
2026-10-14

Overview

What it does

SonarSource’s MCP server links an assistant to SonarQube Cloud or SonarQube Server. The recommended setup runs the sonarsource/sonarqube-mcp container image over stdio, with a user token and either your SonarQube Cloud organisation key or your server URL. An online configuration generator produces ready-made settings for common clients. HTTP and HTTPS transports are available for shared deployments. It is published under the SONAR Source-Available Licence v1.0, not an open source licence.

Use it when your projects are already analysed by SonarQube and you want an assistant to read issues, fix them and confirm the quality gate passes. It can also analyse code snippets or files in the agent’s context. Tools come in toolsets, and only a core set (analysis, issues, projects, quality gates, rules, measures, security hotspots and more) is on by default; SONARQUBE_TOOLSETS changes the list. Mounting your project at /app/mcp-workspace lets the server read files from disk, which saves context.

Tools

What the assistant can do

  • Analyse code snippets and files against Sonar rules
  • Search issues and change their status
  • Search and review Security Hotspots
  • Check quality gate status and project measures
  • Browse rules, duplications and test coverage
  • Analyse dependency risks (SCA)
  • Opt-in portfolio, webhook and system administration toolsets

Install

Install SonarQube MCP server in your app

You need:

  • Docker or another OCI container runtime
  • A SonarQube Cloud organisation key, or a SonarQube Server URL (pass SONARQUBE_URL instead of SONARQUBE_ORG)
  • A SonarQube user token

Run in your project. --scope local keeps the servers private to you in this project; use user for every project.

Terminal
claude mcp add --env SONARQUBE_TOKEN="${SONARQUBE_TOKEN}" --env SONARQUBE_ORG="${SONARQUBE_ORG}" --scope local sonarqube -- docker run --init --pull=always -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG sonarsource/sonarqube-mcp
Native Windows (PowerShell)
claude mcp add --env SONARQUBE_TOKEN="$env:SONARQUBE_TOKEN" --env SONARQUBE_ORG="$env:SONARQUBE_ORG" --scope local sonarqube -- docker run --init --pull=always -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG sonarsource/sonarqube-mcp
  • Set SONARQUBE_TOKEN, SONARQUBE_ORG first, e.g. export SONARQUBE_TOKEN=… in your shell. The command saves the value, not the variable.

Want it alongside other servers? Open SonarQube MCP Server in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.

Before you install

  • Set SONARQUBE_READ_ONLY=true to disable write tools such as changing issue status, and use SONARQUBE_TOOLSETS to limit the tools offered.
  • Mounting a directory at /app/mcp-workspace gives the server read access to those files.
  • The server sends anonymous usage data to SonarSource. Set TELEMETRY_DISABLED=true to turn it off.
  • A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.

Why it’s listed

Why we list it

Puts an established code quality and security platform in the assistant’s loop, with read-only and toolset controls documented by the vendor.

Related

All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?