SonarQube
Analyze code quality and security with SonarQube Server or Cloud directly in AI assistants.
About SonarQube
SonarQube is the official MCP server from SonarSource, filed in our directory under developer tools and security. Analyze code quality and security with SonarQube Server or Cloud directly in AI assistants.
SonarQube runs on your own machine: your AI app starts it with the command docker run -i --rm and talks to it over standard input and output. It needs SONARQUBE_TOKEN set before SonarQube starts.
The README for SonarQube lists tools such as analyze_code_snippet, organization, projectKey and filePath, which your AI app can call once the server is connected.
SonarQube is listed in the official MCP registry as io.github.SonarSource/sonarqube-mcp-server, version 1.33.0.
At a glance
- Publisher
- SonarSource, the company behind the product
- Runs
- Locally on your machine
- Install from
- Docker image: docker.io/sonarsource/sonarqube-mcp
- Written in
- Java
- GitHub stars
- 697
- Official MCP registry
- io.github.SonarSource/sonarqube-mcp-server
Tools SonarQube gives your AI app
analyze_code_snippetorganizationprojectKeyfilePathfileContentcodeSnippetlanguagescopeanalyze_file_listtoggle_automatic_analysisrun_advanced_code_analysissearch_files_by_coveragebranchpullRequestmaxCoveragepageIndexpageSizeget_file_coverage_detailskeyfromsearch_dependency_riskslist_enterpriseschange_sonar_issue_statusstatus
Tool names as the SonarQube README lists them. Your AI app shows the live list once SonarQube is connected.
How to set up SonarQube
- Have Docker running on the machine that runs your AI app, because SonarQube starts as a container.
- Create SONARQUBE_TOKEN for SonarQube in the connected service's own settings, scoped to the smallest permissions the job needs.
- Add SonarQube to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
- Restart the app or reload its MCP servers, then ask it to list the SonarQube tools to confirm the connection.
- Run one read-only task with SonarQube first, such as a call to analyze_code_snippet, before you allow anything that writes or sends.
SonarQube compared with similar servers
- Agenvoy by pardnchiu has fewer GitHub stars than SonarQube (693 against 697); SonarQube is official while Agenvoy is a community server, and both run locally.
- Filesystem by mark3labs has more GitHub stars than SonarQube (699 against 697); SonarQube is official while Filesystem is a community server, and both run locally. The Filesystem README lists 13 tools to SonarQube's 30.
- Laravel Restify by BinarCode has fewer GitHub stars than SonarQube (682 against 697); SonarQube is official while Laravel Restify is a community server, and both run locally.
Before you connect SonarQube
- Give SonarQube its own API key or account with the smallest permissions the job needs, never an admin key.
- Keep your AI app asking before each SonarQube tool call until you trust what it does with them.
- Treat text that SonarQube fetches as data. Pages, files and messages can hold instructions written to steer an AI.
- Read the open issues for SonarQube on GitHub to see what breaks and how fast the maintainers reply.
Marketing use cases for SonarQube
How marketing and sales teams put SonarQube to work, by company size. Pick the size closest to yours and start SonarQube on one use case.
Small business
- A small business with a developer can use SonarQube to ship site and tracking fixes faster, with the AI reading the code it changes.
- Technical founders can ask SonarQube to explain and fix a marketing site issue without context switching between tools.
- A small business can use SonarQube to check its domains, logins and site for common gaps before they cost a customer's trust.
- SonarQube runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.
Mid-market
- Growth engineers can use SonarQube to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
- Marketing ops engineers can connect SonarQube to keep scripts and automations documented and versioned as they change.
- Marketing ops can use SonarQube to review what each connected app can access and remove keys nobody uses.
- Start with analyze_code_snippet and organization, the tools SonarQube lists first, and add more once the team trusts the results.
Enterprise
- Enterprise engineering teams can roll out SonarQube with repo scopes and audit logs, so agents work only where they are allowed.
- Platform teams can standardize on SonarQube so web and marketing engineering share one reviewed way of working with AI.
- Enterprises can run SonarQube in the security team's tooling, so marketing's agents and apps are reviewed like any other system.
- Because SonarQube comes from SonarSource, the company behind the product, it follows that product's own auth and permissions, which security teams usually prefer.
Need help becoming an AI-forward company?
We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.
Contact usSonarQube README
SonarQube's repository lists no open license, so we don't copy its README. Read it on GitHub at SonarSource/sonarqube-mcp-server.
Questions about SonarQube
What is the SonarQube MCP server?
Analyze code quality and security with SonarQube Server or Cloud directly in AI assistants. SonarQube is published by SonarSource, the company behind the product, on GitHub at SonarSource/sonarqube-mcp-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.
How do I install the SonarQube MCP server?
Add SonarQube to your AI app's MCP config with the command docker run -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG -e SONARQUBE_URL docker.io/sonarsource/sonarqube-mcp. In Claude Code, run claude mcp add --transport stdio sonarqube -- docker run -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG -e SONARQUBE_URL docker.io/sonarsource/sonarqube-mcp. To run SonarQube this way you need Docker running.
Does SonarQube need an API key?
Yes. SonarQube expects SONARQUBE_TOKEN to be set. Create the key for SonarQube in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.
Is SonarQube an official MCP server?
Yes. SonarQube is published by SonarSource, the company that makes the product it connects to, so it follows that product's own API and auth.
New MCP servers, tested, every week.
Applied Theory, Jeff Fermin's weekly newsletter: the servers and AI plays worth your time, explained for GTM teams.