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

@teolin/mcp-sonarcloud

v1.0.0

Published

MCP server for SonarCloud/SonarQube code quality analysis and issue management

Readme

SonarCloud MCP Server

Features

Model Context Protocol (MCP) server for SonarCloud and SonarQube integration. Provides comprehensive code quality analysis, issue management, and security hotspot detection.

  • Quality Gate Status: Check if your project passes quality gates
  • Issue Management: List and analyze bugs, vulnerabilities, and code smells
  • Security Hotspots: Identify and review security-sensitive code
  • Project Metrics: Get coverage, duplication, and quality metrics
  • File Browser: Navigate project structure
  • Source Code Access: Read source code with issue context
  • Rule Details: Understand what each rule checks and how to fix it

Prerequisites

  • Node.js >=18.0.0
  • SonarCloud or SonarQube instance with API access
# Setup environment
cp .env.example .env

# For SonarCloud:
# Add:
#   SONAR_HOST_URL=https://sonarcloud.io
#   SONAR_TOKEN=your_token
#   SONAR_ORGANIZATION=your_org_key
#   SONAR_PROJECT_KEY=your_project_key

# For self-hosted SonarQube:
# Add:
#   SONAR_HOST_URL=https://your-sonarqube-instance.com
#   SONAR_TOKEN=your_token
#   SONAR_PROJECT_KEY=your_project_key

Setup

| Method | Pros | Cons | When | | -------------- | ----------------------------- | -------------------------------- | -------------- | | npx | No install, latest version | Slower, needs internet | Quick demos | | Global npm | Instant, offline | Takes disk space, manual updates | Default choice | | Local npm | Version controlled, team sync | Extra disk per project | Shared teams |

# Option 1: npx (fastest)
claude mcp add sonarcloud --scope user -- npx --yes @teolin/mcp-sonarcloud
gemini mcp add sonarcloud npx --yes @teolin/mcp-sonarcloud

# Option 2: Global install (recommended)
npm install --global @teolin/mcp-sonarcloud
claude mcp add sonarcloud --scope user -- sonarcloud-mcp
gemini mcp add sonarcloud sonarcloud-mcp

# Option 3: Local project
npm install @teolin/mcp-sonarcloud
claude mcp add sonarcloud --scope project -- node ./node_modules/@teolin/mcp-sonarcloud/src/index.js

# Verify
claude mcp list
gemini mcp list

# Remove
claude mcp remove sonarcloud --scope user
gemini mcp remove sonarcloud

Available Tools

1. get_project_status

Get the quality gate status for the project. Returns PASSED/FAILED with conditions.

2. get_issues

Get issues (bugs, vulnerabilities, code smells) from the project. Parameters: severities, types, statuses, resolved, pageSize, page.

3. get_issue_details

Get detailed information about a specific issue. Parameters: issueKey (required).

4. get_measures

Get project metrics (bugs, vulnerabilities, code_smells, coverage, duplicated_lines_density, etc.). Parameters: metricKeys (optional).

5. get_security_hotspots

Get security hotspots from the project. Parameters: status, resolution, pageSize, page.

6. get_hotspot_details

Get detailed information about a security hotspot. Parameters: hotspotKey (required).

7. get_files

Get list of files in the project. Parameters: qualifiers, pageSize, page.

8. get_source_code

Get source code of a file. Parameters: fileKey (required), from, to.

Usage Examples

Example 1: Check quality gate

// In Claude Code:
"Is my SonarCloud project passing quality gates?"
// Returns quality gate status

Example 2: List bugs

// In Claude Code:
"Show me all bugs in my SonarCloud project"
// Uses: get_issues with type BUG

Example 3: Security hotspots

// In Claude Code:
"List all security hotspots to review"
// Returns security-sensitive code locations

Example 4: Project metrics

// In Claude Code:
"What's the code coverage of my project?"
// Returns metrics including coverage