npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wallacewen/sonarqube-mcp-server

v1.6.4

Published

Model Context Protocol server for SonarQube

Readme

SonarQube MCP Server

CI Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%) npm version npm downloads License

A Model Context Protocol (MCP) server that integrates with SonarQube to provide AI assistants with access to code quality metrics, issues, and analysis results.

Overview

The SonarQube MCP Server enables AI assistants to interact with SonarQube's code quality analysis capabilities through the Model Context Protocol. This integration allows AI assistants to:

  • Retrieve code metrics and analysis results
  • Access and filter issues
  • Check quality status
  • Analyze project quality over time

Features

  • List all SonarQube projects with pagination support
  • Get detailed issue information from SonarQube projects with extensive filtering options
  • Support for both SonarQube and SonarCloud
  • Comprehensive parameter validation using Zod schemas
  • Full TypeScript support

Usage with Claude Desktop

  1. Edit claude_desktop_config.json:

    • Open Claude Desktop
    • Go to Settings -> Developer -> Edit Config
    • Add the one of the configurations below to the mcpServers section
  2. Restart Claude Desktop to apply the changes

Docker

{
  "mcpServers": {
    "sonarqube": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SONARQUBE_URL",
        "-e",
        "SONARQUBE_TOKEN",
        "-e",
        "SONARQUBE_ORGANIZATION",
        "sapientpants/sonarqube-mcp-server"
      ],
      "env": {
        "SONARQUBE_URL": "https://sonarqube.example.com",
        "SONARQUBE_TOKEN": "your-sonarqube-token",
        "SONARQUBE_ORGANIZATION": "your-organization-key (optional)"
      }
    }
  }
}

NPX

{
  "mcpServers": {
    "sonarqube": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "SONARQUBE_URL": "https://sonarqube.example.com",
        "SONARQUBE_TOKEN": "your-sonarqube-token",
        "SONARQUBE_ORGANIZATION": "your-organization-key (optional)"
      }
    }
  }
}

Available Tools

The SonarQube MCP Server provides the following tools:

SonarQube Tools

  1. projects: List all SonarQube projects

    • Parameters:
      • organization (optional) - Organization key for SonarQube Cloud
      • page (optional) - Page number for results pagination
      • page_size (optional) - Number of items per page
  2. issues: Get issues from a SonarQube project

    • Parameters:
      • project_key (required) - The unique identifier for the SonarQube project
      • severity (optional) - Filter issues by severity (INFO, MINOR, MAJOR, CRITICAL, BLOCKER)
      • organization (optional) - Organization key for SonarQube Cloud
      • page (optional) - Page number for results pagination
      • page_size (optional) - Number of items per page
      • statuses (optional) - Filter issues by status (array of: OPEN, CONFIRMED, REOPENED, RESOLVED, CLOSED, TO_REVIEW, IN_REVIEW, REVIEWED)
      • resolutions (optional) - Filter issues by resolution (array of: FALSE-POSITIVE, WONTFIX, FIXED, REMOVED)
      • resolved (optional) - Whether to return only resolved issues (true) or unresolved issues (false)
      • types (optional) - Filter issues by type (array of: CODE_SMELL, BUG, VULNERABILITY, SECURITY_HOTSPOT)
      • rules (optional) - Array of rule keys to filter issues
      • tags (optional) - Array of tags to filter issues
      • created_after (optional) - Return issues created after the given date (format: YYYY-MM-DD)
      • created_before (optional) - Return issues created before the given date (format: YYYY-MM-DD)
      • created_at (optional) - Return issues created on the given date
      • created_in_last (optional) - Return issues created during a time span before the current time (e.g., "1d" for issues created in the last day)
      • assignees (optional) - Array of assignee login names to filter issues
      • authors (optional) - Array of author login names to filter issues
      • cwe (optional) - Array of CWE identifiers to filter vulnerability issues
      • languages (optional) - Array of languages to filter issues
      • owasp_top10 (optional) - Array of OWASP Top 10 categories to filter issues
      • sans_top25 (optional) - Array of SANS Top 25 categories to filter issues
      • sonarsource_security (optional) - Array of SonarSource security categories to filter issues
      • on_component_only (optional) - Return only issues at the specified component level (true) or issues from the component's subtree (false)
      • facets (optional) - Array of facets to return along with the issues
      • since_leak_period (optional) - Return only issues created since the leak period
      • in_new_code_period (optional) - Return only issues created in the new code period

Environment Variables

  • SONARQUBE_URL - URL of your SonarQube instance (default: https://next.sonarqube.com/sonarqube)
  • SONARQUBE_TOKEN - Authentication token for SonarQube API access
  • SONARQUBE_ORGANIZATION - (Optional) Organization key for SonarQube Cloud

Development

  1. Clone the repository:
git clone https://github.com/sapientpants/sonarqube-mcp-server.git
cd sonarqube-mcp-server
  1. Install dependencies:
pnpm install
  1. Build the project:
pnpm run build
  1. Configure Claude Desktop
{
  "mcpServers": {
    "sonarqube": {
      "command": "node",
      "args": [
        "/path/to/sonarqube-mcp-server/dist/index.js"
      ],
      "env": {
        "SONARQUBE_TOKEN": "your-sonarqube-token"
      }
    }
  }
}

Prerequisites

  • Node.js 20 or higher
  • pnpm 10.7.0 or higher
  • Docker (for container builds)

Scripts

  • pnpm run build - Build the TypeScript code
  • pnpm run start - Start the server
  • pnpm run dev - Start the server in development mode
  • pnpm run test - Run tests
  • pnpm run lint - Run ESLint
  • pnpm run format - Format code with Prettier

License

MIT