SonarCloud MCP Server
Provides tools for fetching SonarCloud issues related to pull requests, with the ability to filter by organization, project, PR number, and issue status, supporting authentication via API token.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SonarCloud MCP Server fetch open issues for PR #42 in my-org/my-project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SonarCloud MCP Server
An MCP server that provides tools for fetching SonarCloud issues related to pull requests.
Example prompt:
Fetch the list of OPEN or ACCEPTED issues from sonarcloud for this PR, which are assigned to __me__, fix them and push the changes to this PR.
Emphasis on the __me__ part, which is a special value in the sonarcloud API to reference the current user (token owner). You can stick this in your .claude/tools folder as sonarcloud-issues.md to have a shortcut which requests claude code to fetch and fix issues from SonarCloud.
Features
Fetch issues from SonarCloud for specific pull requests
Filter by organization, project, and PR number
Supports authentication via API token
Returns formatted issue data with severity, type, and location information
Related MCP server: SonarQube MCP Server
Installation
Prerequisite: Generate a SonarCloud API token
Follow the instructions in the SonarCloud documentation to generate a SonarCloud API token.
Option 1: Docker (Recommended)
# Build the Docker image
npm run docker:build
# Or build directly
docker build -t sonarcloud-mcp .Option 2: Local Installation
npm ci
npm run buildUsage
Docker Usage
Run via docker:
docker run -i --rm \
-e SONARCLOUD_TOKEN=your_token_here \
-e SONARCLOUD_ORGANISATION=your_organisation_here \
-e SONARCLOUD_PROJECT_KEY=your_project_key_here \
sonarcloud-mcpLocal Usage
Export the required environment variables and run the server:
export SONARCLOUD_TOKEN=your_token_here
export SONARCLOUD_ORGANISATION=your_organisation_here
export SONARCLOUD_PROJECT_KEY=your_project_key_here
npm startEnvironment Variables
SONARCLOUD_TOKEN: Your SonarCloud API token (required)jSONARCLOUD_ORGANISATION: Your SonarCloud organization key (optional, can be passed as a parameter)SONARCLOUD_PROJECT_KEY: Your SonarCloud project key (optional, can be passed as a parameter)
Claude Desktop / Claude Code Integration
Docker Configuration (Recommended)
Add to your claude_desktop_config.json or claude.json:
{
"mcpServers": {
"sonarcloud": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONARCLOUD_TOKEN",
"-e",
"SONARCLOUD_ORGANISATION",
"-e",
"SONARCLOUD_PROJECT_KEY",
"sonarcloud-mcp"
],
"env": {
"SONARCLOUD_TOKEN": "<your token here>",
"SONARCLOUD_ORGANISATION": "<your organisation here>",
"SONARCLOUD_PROJECT_KEY": "<your project key here>"
}
}
}
}Local Configuration
Add to your claude_desktop_config.json or claude.json:
{
"mcpServers": {
"sonarcloud-mcp": {
"command": "node",
"args": [
"/path/to/sonarcloud_mcp/dist/index.js"
],
"env": {
"SONARCLOUD_TOKEN": "<your token here>",
"SONARCLOUD_ORGANISATION": "<your organisation here>",
"SONARCLOUD_PROJECT_KEY": "<your project key here>"
}
}
}
}Available Tools
fetch_sonarcloud_issues: Fetches SonarCloud issues for a specific pull request.
Available Tools
2 toolsfetch_sonarcloud_issuesC
Fetch SonarCloud issues for a specific pull request
Inputs: additionalFields, asc, assigned, assignees, +29 more.
summarize_sonarcloud_issuesB
Get a high-level summary of SonarCloud issues for a PR
Inputs: pullRequest, token, impactSeverities, sinceLeakPeriod, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one fetches issues, the other provides a summary. There is no overlap or ambiguity between them.
Both tools follow a consistent 'verb_noun' naming pattern (fetch_sonarcloud_issues, summarize_sonarcloud_issues), making the naming predictable and clear.
With only 2 tools, the server feels thin. While it may serve a narrow purpose, the tool count is at the borderline of being insufficient for a typical server scope.
The tools cover fetching and summarizing issues for a PR, but are missing operations like retrieving details for a single issue or listing all issues for a project. The surface is notably incomplete for broader SonarCloud operations.
Maintenance
Related MCP Connectors
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
The Jam MCP server provides AI tools with instant bug context without manual prompting, enabling a streamlined workflow from bug identification to ticket creation and pull request generation without switching between tools.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that provides tools for retrieving SonarQube project metrics and quality data through a simplified message-based approach, allowing users to programmatically access metrics, historical data, and component-level information from SonarQube.14Apache 2.0
- AlicenseNot gradedqualityDmaintenanceServer for SonarQube Give AI assistants direct access to your code quality, security & analysis data3MIT
- AlicenseAqualityCmaintenanceAn MCP server for SonarQube that enables LLM agents to discover projects, analyze code quality metrics, check Quality Gate status, search issues with filters, and rank projects by worst-performing metrics. It provides read-only, safe access to SonarQube instances with structured outputs and error handling.590 PyPI1MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server that provides AI assistants with access to SonarQube code quality, security, and project analytics data.7115 npmMIT