sonarqube-mcp
Supports SonarCloud via the SONARQUBE_ORGANIZATION environment variable, allowing the same SonarQube tools to work with SonarCloud projects.
Provides tools to interact with SonarQube, enabling AI agents to search projects, check quality gates, retrieve measures (bugs, smells, coverage, ratings), list issues, view security hotspots, explore rules, and view source code.
Click on "Install 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., "@sonarqube-mcplist open issues sorted by severity"
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.
sonarqube-mcp
An MCP server that exposes SonarQube data as AI agent tools.
Quick start
{
"mcp": {
"sonarqube": {
"type": "local",
"command": ["npx", "-y", "github:metalralf/sonarqube-mcp"],
"enabled": true,
"environment": {
"SONARQUBE_URL": "http://localhost:9000",
"SONARQUBE_TOKEN": "squ_...",
"SONARQUBE_PROJECT": "my_project"
}
}
}
}Related MCP server: sonarqube-mcp
Tools
Tool | Purpose |
| Discover project keys |
| Gate pass/fail + failing conditions |
| Bugs, smells, coverage, ratings, ncloc, dup |
| Open issues sorted by severity |
| Security hotspots (needs user token) |
| Explain a rule (why an issue fired) |
| View flagged source lines |
| Escape hatch — any GET endpoint |
Or copy .mcp.json.example to .mcp.json in your project root (openocode reads it automatically):
{
"mcp": {
"sonarqube": {
"type": "local",
"command": ["npx", "-y", "github:metalralf/sonarqube-mcp"],
"enabled": true,
"environment": {
"SONARQUBE_URL": "${SONARQUBE_URL}",
"SONARQUBE_TOKEN": "${SONARQUBE_TOKEN}",
"SONARQUBE_PROJECT": "${SONARQUBE_PROJECT}"
}
}
}
}Configuration
Env var | Description |
| SonarQube instance base URL |
| Auth token |
| Default project key |
| SonarCloud org key |
|
|
Token types
Type | Prefix | Hotspots? |
User token |
| ✅ |
Project analysis |
| ❌ 403 |
Global analysis |
| ❌ 403 |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/metalralf/sonarqube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server