# 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](https://docs.sonarsource.com/sonarqube-mcp-server/resources/help "mention") page to get in touch with us, or review the [troubleshooting](https://docs.sonarsource.com/sonarqube-mcp-server/resources/troubleshooting "mention") 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 [#prerequisites](https://docs.sonarsource.com/sonarqube-mcp-server/readme#prerequisites "mention") and make sure that you’ve got everything you need to get going.
{% endstep %}

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

You will need a few [#common-variables](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/environment-variables#common-variables "mention") 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 [#stdio](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/configure#stdio "mention") 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](https://docs.sonarsource.com/sonarqube-mcp-server/using/tools "mention") 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 [#transport-mode](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/configure#transport-mode "mention") you want to use, then grab the correct [environment-variables](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/environment-variables "mention") you'll need.
{% endstep %}

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

Using the [environment-variables](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/environment-variables "mention") you grabbed in step 1, deploy your SonarQube MCP Server using the [#transport-mode](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/configure#transport-mode "mention") 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 [#common-variables](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/environment-variables#common-variables "mention").

> 💡 **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](https://docs.sonarsource.com/sonarqube-mcp-server/using/tools "mention") 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-locally](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/build#build-locally "mention").
{% endstep %}

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

Because you're building your own server locally, you'll need to complete the setup with a [#manual-installation](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/build#manual-installation "mention").
{% endstep %}

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

Finally, check out the [tools](https://docs.sonarsource.com/sonarqube-mcp-server/using/tools "mention") 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 [SonarQube MCP Server #MCP Server in SonarQube Cloud](https://app.gitbook.com/s/B4UT2GNiZKjtxFtcFAL7/ai-capabilities/sonarqube-mcp-server#mcp-server-in-sonarqube-cloud "mention") 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](https://docs.sonarsource.com/sonarqube-mcp-server/build-and-configure/build "mention").

{% 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](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/claude-code "mention") — Claude Code
* [codex-cli](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/codex-cli "mention") — Codex CLI
* [cursor](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/cursor "mention") — Cursor
* [gemini-cli](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/gemini-cli "mention") — Gemini CLI
* [vs-code](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/vs-code "mention") — VS Code with GitHub Copilot
* [github-copilot-cli](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/github-copilot-cli "mention") — GitHub Copilot CLI
* [github-copilot-coding-agent](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/github-copilot-coding-agent "mention") — GitHub Copilot coding agent
* [kiro](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/kiro "mention") — Kiro
* [windsurf](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/windsurf "mention") — Windsurf
* [zed](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide/zed "mention") — Zed
