/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
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill sonarqube-mcp --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/sonarqube-mcp
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
sonarqube-mcp.SKILL.mdname: sonarqube-mcp
description: 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 rule", "pre-push analysis".
allowed-tools: Read
SonarQube MCP Integration
Leverage SonarQube and SonarCloud capabilities directly through the Model Context Protocol (MCP) server to enforce code quality, discover issues, and run pre-push analysis inside the agent workflow.
Overview
This skill provides instructions and patterns for using the [SonarQube MCP Server](https://github.com/SonarSource/sonarqube-mcp-server) tools. It enables automated workflows for:
- Checking quality gate status before merges or deployments
- Discovering and triaging issues by severity and project
- Analyzing code snippets locally before committing (shift-left)
- Understanding SonarQube rules with full documentation
When to Use
Use this skill when:
- The user wants to check if a project passes its quality gate before merging a PR
- The user wants to find critical or blocker issues in one or more SonarQube projects
- The user wants to analyze a code snippet for issues before pushing to CI
- The user wants to understand why a specific Sonar rule flagged their code
- The user asks for pre-commit or pre-push quality feedback
**Trigger phrases:** "check quality gate", "sonarqube quality gate", "find sonar issues", "search sonar issues", "analyze code with sonar", "check sonar rule", "sonarcloud issues", "pre-push sonar check", "sonar pre-commit"
Prerequisites and Setup
The plugin includes a `.mcp.json` that starts the SonarQube MCP Server automatically via Docker. Before using this skill, set the required environment variables:
**SonarQube Server (remote or local):**
export SONARQUBE_TOKEN="squ_your_token"
export SONARQUBE_URL="https://sonarqube.mycompany.com" # or http://host.docker.internal:9000 for local Docker
**SonarCloud:**
export SONARQUBE_TOKEN="squ_your_token"
export SONARQUBE_ORG="your-org-key" # required for SonarCloud
# SONARQUBE_URL is not needed for SonarCloud
**Requirements:**
- Docker must be installed and running
- `SONARQUBE_TOKEN` is always required
- `SONARQUBE_URL` is required for SonarQube Server (use `host.docker.internal` for local instances)
- `SONARQUBE_ORG` is required for SonarCloud (omit `SONARQUBE_URL` in that case)
Quick Start
1. Set your SonarQube/SonarCloud credentials:
# SonarQube Server
export SONARQUBE_TOKEN="squ_your_token"
export SONARQUBE_URL="https://sonarqube.mycompany.com"
# SonarCloud
export SONARQUBE_TOKEN="squ_your_token"
export SONARQUBE_ORG="your-org-key"
2. Verify MCP tool availability:
- Tool names follow the pattern: `mcp__sonarqube-mcp__<tool-name>`
3. If the MCP server fails to start, check:
- Docker is running
- Environment variables are set
- Reference: [mcp/sonarqube on Docker Hub](https://hub.docker.com/r/mcp/sonarqube)
Reference Documents
- `references/metrics.md` — Common SonarQube metrics and their meaning
- `references/severity-levels.md` — Sonar severity levels and impact categories
- `references/best-practices.md` — Workflows for PR checks and pre-commit analysis
- `references/llm-context.md` — Tool selection guide and parameter mapping for LLM agents
Instructions
Step 1: Identify the Required Operation
Determine which operation the user needs:
| User Intent | Tool to Use | |---|---| | Check if project passes quality gate | `get_project_quality_gate_status` | | Find critical issues in a project | `search_sonar_issues_in_projects` | | Analyze code before committing | `analyze_code_snippet` | | Understand a flagged rule | `show_rule` | | Get detailed project metrics | `get_component_measures` | | Mark an issue as false positive | `change_sonar_issue_status` |
If the user's intent is ambiguous, ask for the project key and the goal before proceeding.
Step 2: Quality Gate Monitoring
Use `get_project_quality_gate_status` to verify a project meets its quality standards.
**Parameters:**
- `projectKey` (string) — Project key in SonarQube/SonarCloud
- `pullRequest` (string, optional) — Pull request ID for PR-specific gate check
- `analysisId` (string, optional) — Specific analysis ID
> Note: There is no `branch` parameter on this tool. Without a `pullRequest` or `analysisId`, the tool returns the quality gate status for the default branch.
**Pattern — Check default branch gate:**
{
"name": "get_project_quality_gate_status",
"arguments": {
"projectKey": "my-application"
}
}**Pattern — Check PR gate before merge:**
{
"name": "get_project_quality_gate_status",
"arguments": {
"projectKey": "backend-service",
"pullRequest": "456"
}
}**Interpreting the response:**
- `status: "OK"` — Gate passed, safe to merge/deploy
- `status: "ERROR"` — Gate failed; check `conditions` array for failing metrics
- Each condition shows: `metricKey`, `actualValue`, `errorThreshold`, `comparator`
For more on metric keys, see `references/metrics.md`.
Step 3: Issue Discovery and Triaging
Use `search_sonar_issues_in_projects` to find and prioritize issues.
**Parameters:**
- `projects` (array, optional) — List of project keys; omit to search all accessible projects
- `severities` (array, optional) — Filter: `BLOCKER`, `HIGH`, `MEDIUM`, `LOW`, `INFO`
- `pullRequestId` (string, optional) — Limit search to a specific PR
- `p` (integer, optional) — Page number (default: 1)
- `ps` (integer, optional) — Page size (default: 100, max: 500)
**Pattern — Find blockers and critical issue
Read more
name: sonarqube-mcp description: 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 rule", "pre-push analysis". allowed-tools: Read
SonarQube MCP Integration
Leverage SonarQube and SonarCloud capabilities directly through the Model Context Protocol (MCP) server to enforce code quality, discover issues, and run pre-push analysis inside the agent workflow.
Overview
This skill provides instructions and patterns for using the [SonarQube MCP Server](https://github.com/SonarSource/sonarqube-mcp-server) tools. It enables automated workflows for:
- Checking quality gate status before merges or deployments
- Discovering and triaging issues by severity and project
- Analyzing code snippets locally before committing (shift-left)
- Understanding SonarQube rules with full documentation
When to Use
Use this skill when:
- The user wants to check if a project passes its quality gate before merging a PR
- The user wants to find critical or blocker issues in one or more SonarQube projects
- The user wants to analyze a code snippet for issues before pushing to CI
- The user wants to understand why a specific Sonar rule flagged their code
- The user asks for pre-commit or pre-push quality feedback
**Trigger phrases:** "check quality gate", "sonarqube quality gate", "find sonar issues", "search sonar issues", "analyze code with sonar", "check sonar rule", "sonarcloud issues", "pre-push sonar check", "sonar pre-commit"
Prerequisites and Setup
The plugin includes a `.mcp.json` that starts the SonarQube MCP Server automatically via Docker. Before using this skill, set the required environment variables:
**SonarQube Server (remote or local):**
export SONARQUBE_TOKEN="squ_your_token" export SONARQUBE_URL="https://sonarqube.mycompany.com" # or http://host.docker.internal:9000 for local Docker
**SonarCloud:**
export SONARQUBE_TOKEN="squ_your_token" export SONARQUBE_ORG="your-org-key" # required for SonarCloud # SONARQUBE_URL is not needed for SonarCloud
**Requirements:**
- Docker must be installed and running
- `SONARQUBE_TOKEN` is always required
- `SONARQUBE_URL` is required for SonarQube Server (use `host.docker.internal` for local instances)
- `SONARQUBE_ORG` is required for SonarCloud (omit `SONARQUBE_URL` in that case)
Quick Start
1. Set your SonarQube/SonarCloud credentials:
# SonarQube Server export SONARQUBE_TOKEN="squ_your_token" export SONARQUBE_URL="https://sonarqube.mycompany.com" # SonarCloud export SONARQUBE_TOKEN="squ_your_token" export SONARQUBE_ORG="your-org-key"
2. Verify MCP tool availability:
- Tool names follow the pattern: `mcp__sonarqube-mcp__<tool-name>`
3. If the MCP server fails to start, check:
- Docker is running
- Environment variables are set
- Reference: [mcp/sonarqube on Docker Hub](https://hub.docker.com/r/mcp/sonarqube)
Reference Documents
- `references/metrics.md` — Common SonarQube metrics and their meaning
- `references/severity-levels.md` — Sonar severity levels and impact categories
- `references/best-practices.md` — Workflows for PR checks and pre-commit analysis
- `references/llm-context.md` — Tool selection guide and parameter mapping for LLM agents
Instructions
Step 1: Identify the Required Operation
Determine which operation the user needs:
| User Intent | Tool to Use | |---|---| | Check if project passes quality gate | `get_project_quality_gate_status` | | Find critical issues in a project | `search_sonar_issues_in_projects` | | Analyze code before committing | `analyze_code_snippet` | | Understand a flagged rule | `show_rule` | | Get detailed project metrics | `get_component_measures` | | Mark an issue as false positive | `change_sonar_issue_status` |
If the user's intent is ambiguous, ask for the project key and the goal before proceeding.
Step 2: Quality Gate Monitoring
Use `get_project_quality_gate_status` to verify a project meets its quality standards.
**Parameters:**
- `projectKey` (string) — Project key in SonarQube/SonarCloud
- `pullRequest` (string, optional) — Pull request ID for PR-specific gate check
- `analysisId` (string, optional) — Specific analysis ID
> Note: There is no `branch` parameter on this tool. Without a `pullRequest` or `analysisId`, the tool returns the quality gate status for the default branch.
**Pattern — Check default branch gate:**
{
"name": "get_project_quality_gate_status",
"arguments": {
"projectKey": "my-application"
}
}**Pattern — Check PR gate before merge:**
{
"name": "get_project_quality_gate_status",
"arguments": {
"projectKey": "backend-service",
"pullRequest": "456"
}
}**Interpreting the response:**
- `status: "OK"` — Gate passed, safe to merge/deploy
- `status: "ERROR"` — Gate failed; check `conditions` array for failing metrics
- Each condition shows: `metricKey`, `actualValue`, `errorThreshold`, `comparator`
For more on metric keys, see `references/metrics.md`.
Step 3: Issue Discovery and Triaging
Use `search_sonar_issues_in_projects` to find and prioritize issues.
**Parameters:**
- `projects` (array, optional) — List of project keys; omit to search all accessible projects
- `severities` (array, optional) — Filter: `BLOCKER`, `HIGH`, `MEDIUM`, `LOW`, `INFO`
- `pullRequestId` (string, optional) — Limit search to a specific PR
- `p` (integer, optional) — Page number (default: 1)
- `ps` (integer, optional) — Page size (default: 100, max: 500)
**Pattern — Find blockers and critical issue
Showing the first part of this file.
Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI.
Repo: giuseppe-trisciuoglio/developer-kit
Other skills on developer-kit.
- /chunking-strategy
Provides chunking strategies for RAG systems. Generates chunk size recommendations (256-1024 tokens), overlap percentages (10-20%), and semantic boundary detection methods. Validates semantic coherence and evaluates retrieval precision/recall metrics. Use when building
Open skill - /prompt-engineering
Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection, chain-of-thought structuring, system prompt design, and template composition. Use when the user asks to write or improve a prompt, wants help with few-shot examples,
Open skill - /rag
Implements document chunking, embedding generation, vector storage, and retrieval pipelines for Retrieval-Augmented Generation systems. Use when building RAG applications, creating document Q&A systems, or integrating AI with knowledge bases.
Open skill - /aws-cloudformation-auto-scaling
Provides AWS CloudFormation patterns for Auto Scaling including EC2, ECS, and Lambda. Use when creating Auto Scaling groups, launch configurations, launch templates, scaling policies, lifecycle hooks, and predictive scaling. Covers template structure with Parameters, Outputs,
Open skill - /aws-cloudformation-bedrock
Provides AWS CloudFormation patterns for Amazon Bedrock resources including agents, knowledge bases, data sources, guardrails, prompts, flows, and inference profiles. Use when creating Bedrock agents with action groups, implementing RAG with knowledge bases, configuring vector
Open skill - /aws-cloudformation-cloudfront
Provides AWS CloudFormation patterns for CloudFront distributions, origins (ALB, S3, Lambda@Edge, VPC Origins), CacheBehaviors, Functions, SecurityHeaders, parameters, Outputs and cross-stack references. Use when creating CloudFront distributions with CloudFormation, configuring
Open skill

