Skip to content
MCP server

Sonar MCP Server

Read-only SonarQube Community Build access for AI agents: issues, hotspots, rules, code…

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.1.0
Listing updated
6 days ago

About Sonar MCP Server

Sonar MCP Server is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Read-only SonarQube Community Build access for AI agents: issues, hotspots, rules, code snippets

Install

Run in a terminal

claude mcp add sonar-mcp-server --env SONAR_URL='<SONAR_URL>' --env SONAR_TOKEN='<SONAR_TOKEN>' -- docker run -i --rm -e SONAR_URL -e SONAR_TOKEN ghcr.io/igorolv/sonar-mcp-server:0.1.0

Add to claude_desktop_config.json

{
  "mcpServers": {
    "sonar-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SONAR_URL",
        "-e",
        "SONAR_TOKEN",
        "ghcr.io/igorolv/sonar-mcp-server:0.1.0"
      ],
      "env": {
        "SONAR_URL": "<SONAR_URL>",
        "SONAR_TOKEN": "<SONAR_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "sonar-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SONAR_URL",
        "-e",
        "SONAR_TOKEN",
        "ghcr.io/igorolv/sonar-mcp-server:0.1.0"
      ],
      "env": {
        "SONAR_URL": "<SONAR_URL>",
        "SONAR_TOKEN": "<SONAR_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "sonar-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SONAR_URL",
        "-e",
        "SONAR_TOKEN",
        "ghcr.io/igorolv/sonar-mcp-server:0.1.0"
      ],
      "env": {
        "SONAR_URL": "<SONAR_URL>",
        "SONAR_TOKEN": "<SONAR_TOKEN>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "sonar-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SONAR_URL",
        "-e",
        "SONAR_TOKEN",
        "ghcr.io/igorolv/sonar-mcp-server:0.1.0"
      ],
      "env": {
        "SONAR_URL": "<SONAR_URL>",
        "SONAR_TOKEN": "<SONAR_TOKEN>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "sonar-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SONAR_URL",
        "-e",
        "SONAR_TOKEN",
        "ghcr.io/igorolv/sonar-mcp-server:0.1.0"
      ],
      "env": {
        "SONAR_URL": "<SONAR_URL>",
        "SONAR_TOKEN": "<SONAR_TOKEN>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • SONAR_URLBase URL of the SonarQube instance, e.g. https://sonar.example.comRequired
  • SONAR_TOKENSonarQube user token (My Account -> Security -> Generate Tokens)Required
  • SONAR_DEFAULT_PROJECT_KEYProject key used when a tool call does not name one

Pricing

Open source

Sonar MCP Server FAQ

Is Sonar MCP Server free?

Yes. Sonar MCP Server is open source, so you can use and self-host it for free.

How do I add Sonar MCP Server to Claude Code?

Run this command in your terminal: claude mcp add sonar-mcp-server --env SONAR_URL='<SONAR_URL>' --env SONAR_TOKEN='<SONAR_TOKEN>' -- docker run -i --rm -e SONAR_URL -e SONAR_TOKEN ghcr.io/igorolv/sonar-mcp-server:0.1.0

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers