SonarQube MCP Server

The SonarQube MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with SonarQube Server or SonarQube Cloud for code quality and code security.

The SonarQube MCParrow-up-right Server is a centralized service that connects code analysis and developer tools so teams can consistently enforce standards, automate checks, and improve code quality across repositories. Teams get a single source of truth for code health, enabling faster remediation, standardized workflows, and reliable gates that improve release confidence.

The SonarQube MCP Server can act as a hub that complements SonarQube by coordinating analysis triggers and aggregating insights from multiple projects. It helps standardize policy enforcement so SonarQube conditions become part of your CI checks, keeping quality at the source and ensuring new code quality gates are applied consistently.

The SonarQube MCP Server can align cloud-based project analysis, ensuring unified governance and reporting. For developers, pairing MCP Server with SonarQube for IDE brings issues into the editor so they can fix problems before commit, strengthening quality at the source and reducing pipeline churn.

Overview

The SonarQube MCP Server allows you to retrieve information and perform actions on your SonarQube Server instance or SonarQube Cloud organization. It is compatible with MCP clients listed in the Prerequisites below.

Upon receiving a request from an MCP client, the SonarQube MCP Server calls the SonarQube Server or SonarQube Cloud API to perform actions:

Overview of the SonarQube MCP Server setup.

Prerequisites

  • Run or build a version of the SonarQube MCP Server:

    • For the container installation, you must use a container management tool, such as Docker.

    • To build the server locally, you will need either:

      • a Java Development Kit (JDK) version 21 or later,

      • or build the server with Gradle.

  • The SonarQube MCP Server integrates with:

    • your organization on SonarQube Cloud including organizations in the US region,

    • your instance of SonarQube Server 2025.1 or newer,

    • or your instance of SonarQube Community Build.

  • Be using one of the MCP Clients compatible with the SonarQube MCP Server, for example:

    • Claude Code, Cursor, Gemini CLI, VS Code with GitHub Copilot, Kiro, Windsurf, or the Zed editor. See the IDE setup instructions on the Quickstart guide page for full instructions.

Using the server

To get started using the SonarQube Server, use the Quickstart guide, read about how to Build and configure your server, then review all the Tools at your disposal.

When you're ready, check out the Using SonarQube MCP Server page for an overview, then Integrate with SonarQube for IDE and Analyze your code for setup and usage examples.

If needed, there's some Help and Troubleshooting resources at your disposal.

MCP Server in SonarQube Cloud

To always use the most up to date version of the SonarQube MCP Server, connect directly to SonarQube Cloud's embedded server. Check SonarQube Cloud's Setting up a local MCP Server page for the complete configuration details.

Data and telemetry

The SonarQube MCP Server collects anonymous usage data and sends it to Sonar to help improve the product. Sonar does not collect your IP address, does not collect your source code, and does not share the data with anyone else.

Collection of telemetry can be disabled with the following system property or environment variable: TELEMETRY_DISABLED=true. See this page in the source repositoryarrow-up-right to see a sample of the data that is collected.

License

Licensed under the SONAR Source-Available License v1.0arrow-up-right. Using the SonarQube MCP Server in compliance with this documentation is a Non-Competitive Purpose and so is allowed under the SSAL.

Your use of SonarQube via MCP is governed by the SonarQube Cloud Terms of Servicearrow-up-right or SonarQube Server Terms and Conditionsarrow-up-right, including use of the Results Data solely for your internal software development purposes.

Last updated

Was this helpful?