Sonarqube API MCP
MCP server by yozzone Verified · npm:sonarqube-api-mcp
Sonarqube API MCP is a Docker-free MCP server for read-only access to the SonarQube Web API. It gives coding agents issues, source context and quality data so they can fix code issues in a repository.
Install Sonarqube API MCP
Built from the published package, never by AI.
claude mcp add sonarqube-api-mcp -- npx -y sonarqube-api-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"sonarqube-api-mcp": {
"args": [
"-y",
"sonarqube-api-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"sonarqube-api-mcp": {
"args": [
"-y",
"sonarqube-api-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"sonarqube-api-mcp": {
"args": [
"-y",
"sonarqube-api-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add sonarqube-api-mcp -- npx -y sonarqube-api-mcp{
"mcpServers": {
"sonarqube-api-mcp": {
"args": [
"-y",
"sonarqube-api-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add sonarqube-api-mcp npx -y sonarqube-api-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the sonarqube-api-mcp block.
About
Sonarqube API MCP is a Docker-free MCP server for read-only access to the SonarQube Web API. It runs with npx sonarqube-api-mcp and requires Node.js 20 or later, a SonarQube base URL, and a token with permission to browse the target project. It uses only the public Web API, not private SonarQube UI GraphQL endpoints.
It is built for coding-agent workflows such as fixing new code issues or overall code issues. The server fetches issues, source context, rule details and quality data so the agent can edit the checked-out repository. The project can be set with SONAR_PROJECT_KEY or passed per tool call by key or name. It suits teams that use SonarQube and want an AI assistant to work through the findings.
Written from the project's README and checked against it.
Tools it gives your assistant
search_sonar_projectsFinds SonarQube project keys by project name or key.get_sonar_fix_planGets unresolved issues grouped by file for agentic fixing workflows.get_sonar_issue_contextGets one issue with surrounding source lines and optional rule details.search_sonar_issuesSearches issues in a project and handles pagination.get_quality_gate_statusReturns the quality gate status for a project.get_rule_detailsReturns details for a SonarQube rule by rule key.get_component_measuresReturns metric values for a project or component.get_sonar_sourcesReturns source lines for a component from SonarQube.
What you need
- Node.js 20 or later
- A SonarQube token with permission to browse the target project
- A SonarQube base URL set in SONAR_HOST_URL
Try asking
- Fix all new code issues in the SonarQube project hvmb-app
- Show the quality gate status for my feature branch project
- Find the SonarQube project keys that match my repo name
Good to know
- Read-only: the server fetches data and does not edit the repository.
- Uses only the public SonarQube Web API, not private UI GraphQL endpoints.
- If a project name matches several projects, the tool returns candidates and asks for a retry with projectKey.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Sonarqube API MCP
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
Sonarqube API MCP: common questions
Does Sonarqube API MCP need Docker?
No. The source describes it as Docker-free and lists Node.js 20+ as the runtime requirement.
Can it change code in my repository?
No. The server stays read-only and only fetches SonarQube data, so the calling agent makes any edits.
How does it authenticate to SonarQube?
It sends SONAR_TOKEN as Basic Auth, using base64 of the token followed by a colon.
How do I install Sonarqube API MCP?
In Claude Code run claude mcp add sonarqube-api-mcp -- npx -y sonarqube-api-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Sonarqube API MCP the official server?
Sonarqube API MCP is published by npm:sonarqube-api-mcp from its verified domain in the official MCP Registry.
Is Sonarqube API MCP free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Sonarqube API MCP safe to use?
It scores 55 of 100. Grades: maintenance D, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Sonarqube API MCP?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Sonarqube API MCP work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
