For the complete documentation index, see llms.txt. This page is also available as Markdown.

About the MCP Server

The SonarQube MCP Server is a Model Context Protocol (MCP) server that connects your AI coding agent to SonarQube's code quality and security data.

The SonarQube MCP Server gives your AI coding agent access to SonarQube's code quality and security data. It's a tool bag: a set of tools your agent can call to analyze code, retrieve issues, check quality gates, inspect security hotspots, measure coverage, and more.

It also powers the SonarQube agent through GitHub agent apps.

Overview of the SonarQube MCP Server setup.

Tools

The server exposes tools in these categories:

  • Analysis: analyze code snippets or files directly in the agent context

  • Issues: search, review, and update code issues

  • Quality gates: check quality gate status for a project

  • Security Hotspots: search and review security hotspots

  • Coverage: find under-covered files and get line-by-line coverage details

  • Projects: search projects and pull requests

  • Dependency risks: SCA issues found in a project

  • Vortex context: code architecture search, call flows, coding guidelines, and SCA dependency checks (requires an active subscription)

  • Architecture: read the current architecture, intended architecture, project directives, and project findings, replace intended architecture, and manage project directives (enable the architecture toolset; SonarQube Cloud requires a Team or Enterprise plan, and SonarQube Server requires version 2026.6 or later and Developer edition or higher)

See the Tools page for the full reference.

Some tools require an active Sonar Vortex subscription on SonarQube Cloud or in SonarQube Server. To set these up, the recommended methods are the SonarQube plugin or SonarQube CLI. See Sonar Vortex analysis and Sonar Vortex context for more details about the features.

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, your source code, or share data with anyone else.

Collection of telemetry can be disabled with: TELEMETRY_DISABLED=true. For a sample of the data collected, see telemetry-sample.md in the source repository.

License

The SonarQube MCP Server is licensed under the Sonar Source-Available License v1.0.1. Using the SonarQube MCP Server in compliance with this documentation is a Non-Competitive Purpose and is permitted under the SSAL.

Your use of SonarQube via MCP is governed by the Sonar Primary Customer Agreement.

Next steps

Read the Environment considerations to find the setup that matches your needs and follow the quickstart guides to quickly get started with your favorite IDE or CLI.

Last updated

Was this helpful?