# MCP Server

For complete details please see [SonarQube MCP Server](https://app.gitbook.com/o/2ibCvzwZt86Nlk2zloB7/s/xNksbUaDXyfRoTpHP0vQ/ "mention") documentation.

## Overview <a href="#overview" id="overview"></a>

The SonarQube MCP Server is a [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server that provides seamless integration with SonarQube Server or SonarQube Cloud for code quality and code security. It enables the analysis of code snippets directly within the agent context and allows you to retrieve information and perform actions on your SonarQube Server instance or SonarQube Cloud organization. Check the [Broken link](https://docs.sonarsource.com/sonarqube-server/2025.4/ai-capabilities/broken-reference "mention") for compatibility details.

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

<figure><img src="broken-reference" alt="Overview of the SonarQube MCP Server setup."><figcaption></figcaption></figure>

## Setting up the SonarQube MCP Server <a href="#setting-up-the-sonarqube-server-with-docker" id="setting-up-the-sonarqube-server-with-docker"></a>

See the SonarQube MCP Server [Quickstart guide](https://app.gitbook.com/s/xNksbUaDXyfRoTpHP0vQ/quickstart-guide "mention") for the easiest way to get going.

## Tools <a href="#tools" id="tools"></a>

Once the SonarQube MCP server is connected, its tools become available. The current list of all tools available with the SonarQube MCP Server are listed on the [Tools](https://app.gitbook.com/s/xNksbUaDXyfRoTpHP0vQ/using/tools "mention") page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/2025.4/ai-capabilities/sonarqube-mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
