# Quickstart guide

We've prepared three user guides to help get you going with the SonarQube MCP Server in the fastest way possible. Each guide is designed for a different configuration that should fit most user's requirements. If you're having troubles with a unique configuration (or for any reason, really), check out the [Help](/sonarqube-mcp-server/resources/help.md) page to get in touch with us, or review the [Troubleshooting](/sonarqube-mcp-server/resources/troubleshooting.md) page for some common issues experiened by other users.

## General user guide

The *General user guide* is designed for users who are operating independently and need a quick setup designed around your specific IDE or CLI:

{% stepper %}
{% step %}
**Check your Prerequisites**

Review the [SonarQube MCP Server](/sonarqube-mcp-server/readme.md#prerequisites) and make sure that you’ve got everything you need to get going.
{% endstep %}

{% step %}
**Gather your variables**

You will need a few [Environment variables](/sonarqube-mcp-server/build-and-configure/environment-variables.md#common-variables) to authenticate your server.

* If you’re using SonarQube Cloud, retrieve your token and organization name.
* For SonarQube Server and SonarQube Community Build, retrieve your *user token* and server URL.

{% hint style="danger" %}
Your SonarQube token is a sensitive credential. Follow these security practices:

**When using CLI commands:**

* *Avoid hardcoding tokens* in command-line arguments because they are saved in your shell history
* *Use environment variables* to securely store and pass tokens rather than exposing them in your command history

**When using configuration files:**

* *Never commit tokens* to version control
* *Use environment variable substitution* to avoid hardcoding sensitive tokens directly in config files
  {% endhint %}
  {% endstep %}

{% step %}
**Find your IDE or CLI and connect**

Have a look at the [#set-up-in-your-ide](#set-up-in-your-ide "mention") instructions below. Find your IDE or CLI in the list and adjust the code samples using your variables. The [Configure your MCP server](/sonarqube-mcp-server/build-and-configure/configure.md#stdio) transport mode will be deployed.

{% hint style="success" %}
We recommend pulling the latest image regularly or before reporting issues to ensure you have the most up-to-date features and fixes.
{% endhint %}
{% endstep %}

{% step %}
**Start using the MCP tools**

Check out the [Tools](/sonarqube-mcp-server/using/tools.md) to get going using the server while you code.
{% endstep %}
{% endstepper %}

## Configuration guide

The *Configuration guide* is designed for setting up a central server that multiple users will access, using their own clients:

{% stepper %}
{% step %}
**Check your deployment**

Depending on how you want to deploy the server, you might If you need a unique configuration. First, figure out which [Configure your MCP server](/sonarqube-mcp-server/build-and-configure/configure.md#transport-mode) you want to use, then grab the correct [Environment variables](/sonarqube-mcp-server/build-and-configure/environment-variables.md) you'll need.
{% endstep %}

{% step %}
**Deploy your server**

Using the [Environment variables](/sonarqube-mcp-server/build-and-configure/environment-variables.md) you grabbed in step 1, deploy your SonarQube MCP Server using the [Configure your MCP server](/sonarqube-mcp-server/build-and-configure/configure.md#transport-mode) you want to use.
{% endstep %}

{% step %}
**Find your IDE or CLI and connect**

Have a look at the [#set-up-in-your-ide](#set-up-in-your-ide "mention") instructions below. Find your IDE or CLI in the list and adjust the code samples using your variables. Each user will connect to the server using their own [Environment variables](/sonarqube-mcp-server/build-and-configure/environment-variables.md#common-variables).

> 💡 **Tip:** We recommend pulling the latest image regularly or before reporting issues to ensure you have the most up-to-date features and fixes.
> {% endstep %}

{% step %}
**Start using the MCP tools**

Check out the [Tools](/sonarqube-mcp-server/using/tools.md) to get going using the server while you code.
{% endstep %}
{% endstepper %}

## Build your own server guide

The *Build your own server guide* is designed for users who need to either use the provided JAR file, or want to build their own from scratch:

{% stepper %}
{% step %}
**Review your options**

Our container image provides the easiest way to get going, but it's possible that it won't work for you. To build your MCP server locally, check out the instructions to [Build your MCP Server](/sonarqube-mcp-server/build-and-configure/build.md#build-locally).
{% endstep %}

{% step %}
**Set up your installation**

Because you're building your own server locally, you'll need to complete the setup with a [Build your MCP Server](/sonarqube-mcp-server/build-and-configure/build.md#manual-installation).
{% endstep %}

{% step %}
**Start using the MCP tools**

Finally, check out the [Tools](/sonarqube-mcp-server/using/tools.md) to get going using the server while you code.
{% endstep %}
{% endstepper %}

## MCP Server in SonarQube Cloud

Use the embedded SonarQube Cloud MCP server to avoid running and maintaining your own MCP infrastructure while always using the current server version. The embedded server exposes a smaller, fixed subset of tools; for the available toolsets and configuration details, check SonarQube Cloud's [MCP Server](/sonarqube-cloud/ai-capabilities/sonarqube-mcp-server.md#mcp-server-in-sonarqube-cloud) page.

## Set up MCP in your IDE or CLI <a href="#set-up-in-your-ide" id="set-up-in-your-ide"></a>

The SonarQube MCP Server is launched using the official container image on the [mcp/sonarqube Docker Hub page](https://hub.docker.com/r/mcp/sonarqube). It is also available on the [GitHub MCP Registry](https://github.com/mcp/SonarSource/sonarqube-mcp-server). For alternatives to the container image, see [Build your MCP Server](/sonarqube-mcp-server/build-and-configure/build.md).

{% hint style="info" %}
Although the examples below use `docker`, any OCI-compatible container runtime works (for example, Podman, nerdctl, etc). Simply replace `docker` with commands specific to your preferred tool.
{% endhint %}

Choose your IDE or CLI for step-by-step setup and workflow instructions:

* [Claude Code](/sonarqube-mcp-server/quickstart-guide/claude-code.md) — Claude Code
* [Codex CLI](/sonarqube-mcp-server/quickstart-guide/codex-cli.md) — Codex CLI
* [Cursor](/sonarqube-mcp-server/quickstart-guide/cursor.md) — Cursor
* [Gemini CLI](/sonarqube-mcp-server/quickstart-guide/gemini-cli.md) — Gemini CLI
* [VS Code with GitHub Copilot](/sonarqube-mcp-server/quickstart-guide/vs-code.md) — VS Code with GitHub Copilot
* [GitHub Copilot CLI](/sonarqube-mcp-server/quickstart-guide/github-copilot-cli.md) — GitHub Copilot CLI
* [GitHub Copilot cloud agent](/sonarqube-mcp-server/quickstart-guide/github-copilot-cloud-agent.md) — GitHub Copilot coding agent
* [Kiro](/sonarqube-mcp-server/quickstart-guide/kiro.md) — Kiro
* [Windsurf](/sonarqube-mcp-server/quickstart-guide/windsurf.md) — Windsurf
* [Zed](/sonarqube-mcp-server/quickstart-guide/zed.md) — Zed


---

# 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-mcp-server/quickstart-guide.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.
