sonarcloud-mcp
sonarcloud/sonarqube cloud MCP server for fetching issues
Documentation
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
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)j
- `SONARCLOUD_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": "",
"SONARCLOUD_ORGANISATION": "",
"SONARCLOUD_PROJECT_KEY": ""
}
}
}
}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": "",
"SONARCLOUD_ORGANISATION": "",
"SONARCLOUD_PROJECT_KEY": ""
}
}
}
}Available Tools
- `fetch_sonarcloud_issues`: Fetches SonarCloud issues for a specific pull request.
Frequently asked questions
What is sonarcloud-mcp?
sonarcloud-mcp is sonarcloud/sonarqube cloud MCP server for fetching issues
How do I install sonarcloud-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is sonarcloud-mcp open source?
Yes — it is hosted on GitHub at https://github.com/dozzman/sonarcloud-mcp and has 4 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP