back to home

SonarSource / sonarqube-mcp-server

SonarQube MCP Server

427 stars
68 forks
6 issues
JavaPythonDockerfile

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing SonarSource/sonarqube-mcp-server in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/SonarSource/sonarqube-mcp-server)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

SonarQube MCP Server The SonarQube MCP Server is a Model Context Protocol (MCP) server that enables seamless integration with SonarQube Server or Cloud for code quality and security. It also supports the analysis of code snippet directly within the agent context. Quick setup The simplest method is to rely on our container image hosted at mcp/sonarqube. Read below if you want to build it locally. > **Note:** While the examples below use , any OCI-compatible container runtime works (e.g., Podman, nerdctl). Simply replace with your preferred tool. Security Best Practices > 🔒 **Important**: Your SonarQube token is a sensitive credential. Follow these security practices: **When using CLI commands:** • **Avoid hardcoding tokens** in command-line arguments - they get saved in shell history • **Use environment variables** - set tokens in environment variables before running commands **When using configuration files:** • **Never commit tokens** to version control • **Use environment variable substitution** in config files when possible Antigravity SonarQube MCP Server is available in the Antigravity MCP Store. Follow these instructions: • Open the **Agent Side Panel** • Click the three dots (**...**) at the top right and select **MCP Servers** • Search for and select **Install** • Provide the required SonarQube User token. You can also provide your organization key for SonarQube Cloud or the SonarQube URL if connecting to SonarQube Server. For **SonarQube Cloud US**, set the URL to . Alternatively, you can manually configure the server via : • To connect with SonarQube Cloud: In the Agent Side Panel, click the three dots (**...**) -> **MCP Store** -> **Manage MCP Servers** -> **View raw config**, and add the following: For **SonarQube Cloud US**, manually add to the section and to the array. • To connect with SonarQube Server: Claude Code • To connect with SonarQube Cloud: For **SonarQube Cloud US**, add to the command. • To connect with SonarQube Server: Codex CLI Manually edit the configuration file at and add the following configuration: • To connect with SonarQube Cloud: For **SonarQube Cloud US**, add to the section and to the array. • To connect with SonarQube Server: Cursor • To connect with SonarQube Cloud: For **SonarQube Cloud US**, manually add to the section in your MCP configuration after installation. • To connect with SonarQube Server: Gemini CLI You can install our MCP server extension by using the following command: You will need to set the required environment variables before starting Gemini: **Environment Variables Required:** • **For SonarQube Cloud:** • - Your SonarQube Cloud token • - Your organization key • - (Optional) Set to for SonarQube Cloud US • **For SonarQube Server:** • - Your SonarQube Server USER token • - Your SonarQube Server URL Once installed, the extension will be installed under . GitHub Copilot CLI After starting Copilot CLI, run the following command to add the SonarQube MCP server: You will have to provide different information about the MCP server, you can use tab to navigate between fields. • To connect with SonarQube Cloud: For **SonarQube Cloud US**, add to Arguments and to Environment Variables. • To connect with SonarQube Server: The configuration file is located at . GitHub Copilot coding agent GitHub Copilot coding agent can leverage the SonarQube MCP server directly in your CI/CD. To add the secrets to your Copilot environment, follow the Copilot documentation. Only secrets with names prefixed with **COPILOT_MCP_** will be available to your MCP configuration. In your GitHub repository, navigate under **Settings -> Copilot -> Coding agent**, and add the following configuration in the MCP configuration section: • To connect with SonarQube Cloud: For **SonarQube Cloud US**, add to the array and to the section, then set the secret . • To connect with SonarQube Server: Kiro Create a file in your workspace directory (or edit if it already exists), add the following configuration: • To connect with SonarQube Cloud: For **SonarQube Cloud US**, add to the array and to the section. • To connect with SonarQube Server: VS Code You can use the following buttons to simplify the installation process within VS Code. For **SonarQube Cloud US**, manually add to the section in your MCP configuration after installation. Windsurf SonarQube MCP Server is available as a Windsurf plugin. Follow these instructions: • Open Windsurf **Settings** > **Cascade** > **MCP Servers** and select **Open MCP Marketplace** • Search for on the Cascade MCP Marketplace • Choose the **SonarQube MCP Server** and select **Install** • Add the required SonarQube User token. Then add the organization key if you want to connect with SonarQube Cloud, or the SonarQube URL if you want to connect to SonarQube Server or Community Build. For **SonarQube Cloud US**, set the URL to . Zed Navigate to the **Extensions** view in Zed and search for **SonarQube MCP Server**. When installing the extension, you will be prompted to provide the necessary environment variables: • When using SonarQube Cloud: For **SonarQube Cloud US**, add to the configuration. • When using SonarQube Server: The is the path to a docker executable. Examples: Linux/macOS: or Windows: > 💡 **Tip:** We recommend pulling the latest image regularly or before reporting issues to ensure you have the most up-to-date features and fixes. Manual installation You can manually install the SonarQube MCP server by copying the following snippet in the MCP servers configuration file: • To connect with SonarQube Cloud: • To connect with SonarQube Server: Integration with SonarQube for IDE The SonarQube MCP Server can integrate with SonarQube for IDE to further enhance your development workflow, providing better code analysis and insights directly within your IDE. When using SonarQube for IDE, the environment variable should be set with the correct port number. SonarQube for VS…