Sonarqube Agentic Analysis Claude Code banner
kcarlsen-sonarsource kcarlsen-sonarsource

Sonarqube Agentic Analysis Claude Code

Development community

Description

Get started with SonarQube Agentic Analysis using Claude Code — step-by-step blueprint with config files and screenshots

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Get started with SonarQube Agentic Analysis using Claude Code

Overview

The [SonarQube MCP Server](https://docs.sonarsource.com/sonarqube-mcp-server/quickstart-guide) gives you tools that query existing code quality and code security analysis data in [SonarQube Cloud](https://www.sonarsource.com/products/sonarqube/cloud/) (issues, quality gates, coverage, security hotspots). [SonarQube Agentic Analysis](https://docs.sonarsource.com/sonarqube-cloud/analyzing-source-code/agentic-analysis) goes further: it sends code to SonarQube Cloud's remote analysis engine, which has CI-derived project context and your team's quality profile, and returns new findings in real time. SonarQube Agentic Analysis applies the same rules and configuration your CI pipeline uses.

This guide configures Claude Code to run that analysis in real time. By the end, your agent can run a complete analyze, fix, and re-verify loop before any code reaches a pull request.

SonarQube Agentic Analysis maps to the Verify stage of the [Agentic Centric Development Cycle (AC/DC)](https://www.sonarsource.com/blog/the-future-is-ac-dc-the-agent-centric-development-cycle/).

When to use this

You're on SonarQube Cloud, you use Claude Code (or another MCP-compatible agent), and you want CI-grade [code verification](https://www.sonarsource.com/resources/library/code-verification/) inside the agent's workflow instead of waiting for the PR to fail the quality gate.

What you'll achieve

  • SonarQube MCP Server configured with Agentic Analysis enabled
  • Claude Code verifying code against your team's quality profile in real time
  • A working analyze, fix, and re-verify loop before commit
  • (Optional) A CLAUDE.md directive for automatic verification after code generation

Architecture

![Architecture diagram showing Claude Code, SonarQube MCP Server, and SonarQube Cloud with two-phase context flow](screenshots/architecture.webp)

The two-phase architecture gives Agentic Analysis full project context that l