Quickstart guide
This page lays out the process of getting your SonarQube MCP Server up and running in the most simple way possible. Three different user configurations are outlined below.
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 page to get in touch with us, or review the Troubleshooting 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:
Check your Prerequisites
Review the Prerequisites and make sure that you’ve got everything you need to get going.
Gather your variables
You will need a few 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.
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
Find your IDE or CLI and connect
Have a look at the Set up MCP in your IDE or CLI instructions below. Find your IDE or CLI in the list and adjust the code samples using your variables. The Stdio transport mode will be deployed.
We recommend pulling the latest image regularly or before reporting issues to ensure you have the most up-to-date features and fixes.
Start using the MCP tools
Check out the Tools to get going using the server while you code.
Configuration guide
The Configuration guide is designed for setting up a central server that multiple users will access, using their own clients:
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 you want to use, then grab the correct Environment variables you'll need.
Deploy your server
Using the Environment variables you grabbed in step 1, deploy your SonarQube MCP Server using the Transport mode you want to use.
Find your IDE or CLI and connect
Have a look at the Set up MCP in your IDE or CLI 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.
💡 Tip: We recommend pulling the latest image regularly or before reporting issues to ensure you have the most up-to-date features and fixes.
Start using the MCP tools
Check out the Tools to get going using the server while you code.
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:
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.
Set up your installation
Because you're building your own server locally, you'll need to complete the setup with a Manual installation.
Start using the MCP tools
Finally, check out the Tools to get going using the server while you code.
MCP Server in SonarQube Cloud
To always use the most up to date version of the SonarQube MCP Server, connect directly to SonarQube Cloud's embedded server. Check SonarQube Cloud's Setting up a local MCP Server page for the complete configuration details.
Set up MCP in your IDE or CLI
The SonarQube MCP Server is launched using the official container image on the mcp/sonarqube Docker Hub page. It is also available on the GitHub MCP Registry. For alternatives to the container image, see Build your SonarQube MCP Server.
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.
Choose your IDE or CLI for step-by-step setup and workflow instructions:
Claude Code — Claude Code
Codex CLI — Codex CLI
Cursor — Cursor
Gemini CLI — Gemini CLI
VS Code with GitHub Copilot — VS Code with GitHub Copilot
GitHub Copilot CLI — GitHub Copilot CLI
GitHub Copilot coding agent — GitHub Copilot coding agent
Kiro — Kiro
Windsurf — Windsurf
Zed — Zed
Last updated
Was this helpful?

