For the complete documentation index, see llms.txt. This page is also available as Markdown.

Zed

Set up the SonarQube MCP Server in Zed and start using Sonar tools with your agent.

Zed is a next-generation code editor built for performance and collaboration. Use this MCP server setup when you want Sonar tools available within a Zed AI workflow.

The SonarQube MCP Server is available as a Zed extension. For a custom configuration, use the Zed custom configuration repository.

Choose your setup

The SonarQube MCP Server lets an AI agent query your SonarQube projects. With it, Zed can look up issues, quality gates, and coverage while it works. You can use a server that SonarQube hosts, run your own. Choose how to connect:

Option
Is best for
What you get
Who sets it up

SonarQube Cloud users

Nothing to install and a smaller, fixed subset of tools. No Sonar Vortex.

You connect

SonarQube Server 2026.3 and later (Developer, Enterprise, and Data Center editions)

Nothing to install on your machine. No Sonar Vortex.

An administrator installs it, and then you connect

Full control

The MCP server that you run yourself, with the Sonar Vortex analysis and context tools through the Stdio transport

You

The configuration generator gives you a snippet to paste into your Zed settings.json file.

Connect to a SonarQube-hosted MCP server

To avoid running and maintaining your own MCP infrastructure while always using the current server version, connect to a SonarQube-hosted MCP server:

  • SonarQube Cloud-hosted: for SonarQube Cloud users. The MCP server is embedded in SonarQube Cloud, so there's nothing to install, and it exposes a smaller, fixed subset of tools. To connect, see the SonarQube Cloud-hosted page.

  • SonarQube Server-hosted: for SonarQube Server users on Developer, Enterprise, and Data Center editions, version 2026.3 and newer. An administrator installs the MCP server extension on your instance, and then you connect your AI agent. To install the extension, see the SonarQube Server-hosted page.

Neither the SonarQube Cloud-hosted nor the SonarQube Server-hosted option supports Sonar Vortex, which requires local filesystem access. Sonar Vortex is not installed by a plugin or the SonarQube CLI for Zed. To use it, set up a self-hosted MCP server. See Vortex with the MCP server.

To get the connection snippet for either option, use the configuration generator and select the matching hosting method.

Set up a self-hosted MCP server

A self-hosted MCP server runs on your machine or in your own environment, and you manage it yourself.

Before you start

The following common variables are required. SONARQUBE_TOKEN applies to stdio transport only. For HTTP, HTTPS, or the SonarQube Cloud-hosted MCP server, use the Authorization: Bearer <YourSonarQubeUserToken> header instead.

  • SONARQUBE_TOKEN: Your SonarQube user token (stdio transport).

  • SONARQUBE_ORG: Your SonarQube Cloud organization key. Required for SonarQube Cloud only.

  • SONARQUBE_URL: Your SonarQube Server or Community Build URL. Also required for SonarQube Cloud in the US region (https://sonarqube.us). Not needed for SonarQube Cloud in the EU region.

Important: Your SonarQube token is a sensitive credential. Use environment variables to pass tokens rather than hardcoding them in configuration files. Never commit tokens to version control.

Warning: User tokens are required when setting up connected mode or your SonarQube MCP server with SonarQube (Server, Cloud). Your binding will not function properly if you use project tokens, global tokens, or scoped organization tokens during setup.

When using these features, your SONARQUBE_TOKEN lets your local MCP server configured for Stdio mode authenticate to the SonarQube Cloud API. See Sonar Vortex analysis and Sonar Vortex context for more information.

Install the Zed extension

The Zed extension for the SonarQube MCP Server uses Stdio transport. It's also the transport mode used in your Sonar Vortex analysis and Sonar Vortex context workflows.

Note: The Zed extension supports Stdio transport only. For HTTPS or HTTP transport, use the custom configuration repository.

Use the official SonarQube MCP Server configuration generator to get a configuration code snippet for your setup:

  1. Identify the target MCP Client.

  2. Choose a hosting method.

  3. Enter the information into the configuration generator.

  4. Paste the generated configuration into your configuration file.

Navigate to the Extensions view in Zed and search for SonarQube MCP Server. When installing the extension, you'll be prompted to enter the necessary environment variables:

Note: SONARQUBE_URL should be defined as https://sonarqube.us each time you use a SonarQube Cloud configuration (SONARQUBE_TOKEN + SONARQUBE_ORG) and want to connect to a US-region instance. See the Connecting to SonarQube Cloud in the US region section for details.

Zed with SonarQube Cloud

Zed with SonarQube Server

The docker_path is the path to a container runtime executable. Examples:

  • Linux/macOS: /usr/bin/docker or /usr/local/bin/docker

  • Windows: C:\Program Files\Docker\Docker\resources\bin\docker.exe

Tip: To verify the connection, ask your AI agent to call the SonarQube MCP ping_system tool. For example: "Ping the SonarQube MCP server."

Tip: Restart your AI agent for good measure, although it might not be required.

Use Sonar tools from Zed

Once connected, Zed can call SonarQube MCP tools on your behalf. See the SonarQube MCP Tools page for the full list of available tools.

Last updated

Was this helpful?