> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-mcp-server/setup.md).

# Setup

This section contains guides for setting up the SonarQube MCP Server with your favorite IDE and CLI.

Set up the SonarQube MCP Server with your IDE or CLI using the guides in this section.

To use the MCP server without managing your own infrastructure, connect to a hosted server:

* [SonarQube Cloud-hosted](/sonarqube-mcp-server/setup/sonarqube-cloud-hosted.md): for SonarQube Cloud users. Embedded in SonarQube Cloud with nothing to install. Provides a smaller, fixed subset of tools.
* [SonarQube Server-hosted](/sonarqube-mcp-server/setup/sonarqube-server-hosted.md): for SonarQube Server 2026.3 and later (Developer, Enterprise, and Data Center editions). An administrator installs it as an extension on your instance. You then [connect your AI agent](/sonarqube-mcp-server/setup/sonarqube-server-hosted.md#connect-your-ai-agent). Provides the full toolset, except Sonar Vortex, which needs local filesystem access.

Sonar Vortex requires local filesystem access and is not available on the SonarQube Cloud-hosted or SonarQube Server-hosted options. To run the MCP server yourself with full Vortex support, use one of the [IDE/CLI quickstart guides](/sonarqube-mcp-server/setup/quickstart-guides.md).

* [Prerequisites](/sonarqube-mcp-server/setup/prerequisites.md)
* [Environment considerations](/sonarqube-mcp-server/setup/environment-considerations.md)
* [SonarQube Cloud-hosted](/sonarqube-mcp-server/setup/sonarqube-cloud-hosted.md)
* [SonarQube Server-hosted](/sonarqube-mcp-server/setup/sonarqube-server-hosted.md)
* [IDE/CLI quickstart guides](/sonarqube-mcp-server/setup/quickstart-guides.md)
* [Self-hosted](/sonarqube-mcp-server/setup/self-hosted.md)
* [Prompt examples](/sonarqube-mcp-server/setup/prompt-examples.md)
* [Build](/sonarqube-mcp-server/setup/build.md)
* [Integrate with SonarQube for IDE](/sonarqube-mcp-server/setup/integrate-with-sonarqube-for-ide.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-mcp-server/setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
