Skip to main content
Glama

SonarQube MCP

by akashlomas

SonarQube MCP Server

A Model Context Protocol (MCP) server for interacting with SonarQube APIs, providing tools for authentication, project management, and metrics retrieval.

Features

  • ✅ Token-based authentication
  • 🔍 Project listing and details
  • 📊 Metrics retrieval
  • 🚀 Lightweight and fast
  • 🔄 Standardized MCP interface

🛠️ Getting Started

Requirements

- Node.js >= v20.0.0 - Cursor or Windsurf

Installation CLI

npm install -g @lomas/sonarqubemcp # or npx @lomas/sonarqubemcp@latest

Configuration

Set these environment variables:

export SONARQUBE_URL="http://your-sonarqube-server:9000" export SONARQUBE_TOKEN="<token>"

Usage

Cursor IDE

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server

Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.

Configure SonarQube MCP on Cursor

{ "mcpServers": { "SonarQube MCP": { "command": "npx", "args": [ "-y", "@lomas/sonarqubemcp@1.0.3", "sonarqubemcp" ], "env": { "SONARQUBE_URL": "<url>", "SONARQUBE_TOKEN": "<token>" } } } }

In Windsurf

Add this to your Windsurf MCP config file. See Windsurf MCP docs for more info.

{ "mcpServers": { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } } }

In VS Code

Install in VS Code

Add this to your VS Code MCP config file. See VS Code MCP docs for more info.

{ "servers": { "Context7": { "type": "stdio", "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } } }

Available tools (via MCP protocol):

- authenticate - list_projects - get_project_details - get_project_metrics

API Endpoints

ToolParametersDescription
authenticatetoken?Validate SonarQube token
list_projectstoken?List all projects
get_project_detailstoken?, projectKeyGet details for specific project
get_project_metricstoken?, projectKey, metricsGet metrics for project

Troubleshooting

Error: Connection refused

  • Verify SonarQube server is running
  • Check SONARQUBE_URL is correct

Error: Invalid token

  • Regenerate your SonarQube token
  • Ensure token has proper permissions

License

MIT © Akash Lomas

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A lightweight MCP for SonarQube reports

  1. Features
    1. 🛠️ Getting Started
      1. Requirements
    2. Installation CLI
      1. Configuration
        1. Usage
          1. Cursor IDE
          2. In Windsurf
          3. In VS Code
        2. Available tools (via MCP protocol):
          1. API Endpoints
            1. Troubleshooting
              1. License

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A simple MCP server for creating and managing notes with support for summarization functionality.
                  Last updated -
                  1
                  Python
                • -
                  security
                  A
                  license
                  -
                  quality
                  An MCP server that integrates with Sonar API to provide Claude with real-time web search capabilities for comprehensive research.
                  Last updated -
                  2
                  JavaScript
                  MIT License
                • -
                  security
                  A
                  license
                  -
                  quality
                  Provides tools for retrieving analytics reports and metrics from PlainSignal through the Model Context Protocol (MCP).
                  Last updated -
                  2
                  1
                  JavaScript
                  MIT License

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/akashlomas/sonarqubemcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server