Get the FREE Ultimate OpenClaw Setup Guide →

sonarqube -zed

A SonarQube MCP Server extension for Zed

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sonarsource-sonarqube-mcp-server-zed docker run -i sonarsource-sonarqube-mcp-server-zed \
  --env SONAR_URL="https://sonarqube.example.com" \
  --env DOCKER_PATH="PATH_TO_DOCKER_EXECUTABLE" \
  --env SONAR_TOKEN="YOUR_SONARQUBE_TOKEN" \
  --env SONAR_ORGANIZATION_KEY="SONARQUBE_ORGANIZATION_KEY"

How to use

This MCP server provides a SonarQube MCP (Model Context Protocol) extension for Zed, allowing Zed to interact with SonarQube data and operations via the MCP interface. It runs inside a Docker container to simplify deployment and isolation. Once the container is running, you can connect to it using the MCP protocol from your Zed workspace and access SonarQube-related capabilities such as querying projects, pulling quality metrics, and integrating SonarQube data into your MCP-enabled tooling. The server relies on SonarQube authentication tokens and the SonarQube server URL to access the SonarQube API; these should be provided as environment variables or configuration when starting the container.

How to install

Prerequisites:

  • Docker installed and in PATH
  • Optional: Rust and cargo if you plan to build the extension from source

Install steps (using the Docker image):

  1. Ensure Docker is installed and accessible from your environment. If you need to specify a custom docker executable path, set DOCKER_PATH accordingly in the environment used by the container.
  2. Pull or build the MCP server Docker image:
    • If a prebuilt image is available: docker pull sonarsource/sonarqube-mcp-server-zed
    • If you need to build locally and you have a Dockerfile in this repository: docker build -t sonarsource-sonarqube-mcp-server-zed .
  3. Run the MCP server inside Docker with required environment variables:
    • You must provide SonarQube credentials and URL as described in the README. Example run: docker run -i
      -e SONAR_TOKEN=YOUR_SONARQUBE_TOKEN
      -e SONAR_ORGANIZATION_KEY=SONARQUBE_ORGANIZATION_KEY
      -e SONAR_URL=https://sonarqube.example.com
      -e DOCKER_PATH=/usr/bin/docker
      sonarsource/sonarqube-mcp-server-zed
  4. Confirm the server is reachable by connecting an MCP client (such as a Zed workspace) and verifying the available SonarQube-related capabilities.

If you prefer building from source (Rust/Cargo):

  1. Install Rust and cargo from https://www.rust-lang.org/tools/install
  2. Clone the repository and navigate to the project root
  3. Run cargo build to compile the extension
  4. Package or run the built binary/container as needed following the repository’s guidance

Additional notes

Environment variables to configure SonarQube access are required. Common issues include invalid tokens, incorrect SonarQube URLs, or insufficient permissions on the SonarQube project. If using Docker on Windows, ensure the Docker daemon is accessible and Docker Desktop is running. The docker_path variable in the environment should point to the actual docker executable on your system if the container needs to invoke Docker commands locally. When upgrading SonarQube or the MCP server, revalidate tokens and endpoints, and restart the container to apply changes.

Related MCP Servers

Sponsor this space

Reach thousands of developers