Back to Skills

sonarqube-mcp

Provides SonarQube and SonarCloud integration patterns via the Model Context Protocol (MCP) server. Enables quality gate monitoring, issue discovery and triaging, pre-push code analysis, and rule education directly in the agent workflow. Use when the user wants to check quality gates, search for Sonar issues, analyze code snippets before committing, or understand SonarQube rules. Triggers on "sonarqube", "sonarcloud", "quality gate", "sonar issues", "analyze with sonar", "check sonar", "sonar ru

320stars37forksUpdated 8/6/2026

Security Assessment

Safe(93/100)
Security Score93/100

About sonarqube-mcp

This skill provides patterns for integrating SonarQube and SonarCloud into the agent workflow through the SonarQube Model Context Protocol (MCP) server. It addresses the need to enforce code quality without leaving the development loop: checking quality gate status before merges or deployments, discovering and triaging issues by severity and project, analyzing code snippets locally before committing (shift-left), and understanding why specific Sonar rules fired.

The skill documents the MCP tool surface and how to use it: getting quality gate status, searching issues across projects, analyzing code snippets, showing rule documentation with compliant and noncompliant examples, and retrieving component measures such as bugs, vulnerabilities, coverage, and ratings. It includes common agent patterns (PR review combining gate plus issues, pre-commit shift-left analysis, project triage by severity, and release gate checks). Notably, it emphasizes safe practice: the change_sonar_issue_status tool is documented with a warning never to call it without explicit user confirmation and a documented reason. The plugin ships a .mcp.json that starts the server via Docker, and setup documents the required environment variables (SONARQUBE_TOKEN, and SONARQUBE_URL or SONARQUBE_ORG) as standard configuration.

It targets developers and teams who use SonarQube or SonarCloud and want quality-gate monitoring, issue triage, and rule education directly in their agent workflow. The skill declares only the Read tool; its operations are predominantly read-only analysis and reporting, with the single state-changing operation gated behind explicit confirmation.

FAQ

What does this skill let me do?

Check quality gate status, search and triage Sonar issues by severity and project, analyze code snippets before committing, and read rule documentation, all through the SonarQube MCP server.

What setup is required?

Docker running (the plugin's .mcp.json starts the server via Docker) and environment variables: SONARQUBE_TOKEN always, plus SONARQUBE_URL for SonarQube Server or SONARQUBE_ORG for SonarCloud.

Is it read-only?

Almost entirely. The skill declares only the Read tool and most operations are analysis and reporting. The one state-changing tool, changing an issue status, is documented as requiring explicit user confirmation and a reason.

How are credentials handled?

Via a standard SONARQUBE_TOKEN environment variable that you set yourself; the skill documents the required variables but does not transmit tokens anywhere beyond the configured Sonar server.

What common workflows does it support?

PR review (gate plus issues), pre-commit shift-left snippet analysis, project triage from blocker to medium severity, and release readiness gate checks.

All Files

5 files
references/llm-context.md8.2 KB
View
references/best-practices.md5.9 KB
View
references/metrics.md4.4 KB
View
references/severity-levels.md4.5 KB
View
SKILL.md13.0 KB
View

Install sonarqube-mcp

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill