SonarSource/sonarqube-mcp-server
SonarQube MCP Server
What's novel
SonarQube MCP Server
Code Analysis
15 files read · 5 roundsAn MCP (Model Context Protocol) server that exposes SonarQube's code quality and security APIs as tools for AI agents, and also performs local code analysis via SonarLint Core for analyzing code snippets directly within the agent context.
Strengths
Well-structured architecture with clean separation between transport (stdio/HTTP), tool definitions, SonarQube API client, and SonarLint backend. The tool framework with schema generation, argument validation, enum checking, and per-request entitlement gating is production-grade. The AnalyzeCodeSnippetTool demonstrates real depth — it fetches quality profiles from SonarQube, configures SonarLint rules, runs local analysis, and filters results by snippet location.
Weaknesses
The main entry point (SonarQubeMcpServer.java at 41.7kb) is a god-class that orchestrates too many concerns (transport setup, tool registration, organization resolution, instruction composition, analytics). The serverapi package with 122 files is essentially a hand-rolled REST client that could be more DRY. The snippet-finding algorithm in AnalyzeCodeSnippetTool is a naive O(n*m) line-by-line comparison that would be slow on large files.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
321
Contributors
16
Files
395
Active weeks
40
Repository
Language
Java
Stars
425
Forks
68
License
NOASSERTION