SonarQube MCP Server
Provides access to code analysis and security insights from SonarSource products, enabling AI assistants to query project metrics, quality gate status, and detailed analysis results.
Allows AI assistants to interact with SonarCloud's code analysis platform to monitor project health, investigate security hotspots, and track code quality metrics over time.
Provides tools for accessing code quality and security analysis data from SonarQube instances, including project listing, issue searching (bugs, vulnerabilities, code smells), quality gate status checks, and retrieval of code metrics.
π‘οΈ SonarQube MCP Server
π¦ Packages
This monorepo contains two packages:
Package | Description | Docs |
Standalone MCP server (npm, CLI, stdio) | ||
VS Code extension with built-in MCP server |
π§ 12 Tools at a Glance
Tool | What it does |
| List projects with quality status |
| Project overview with metrics |
| Search bugs, vulns & code smells |
| Full issue details |
| Quality gate status & conditions |
| Security hotspots needing review |
| Hotspot details & remediation |
| Code quality metrics |
| Metric trends over time |
| Rule details & guidance |
| Search rules by language/type |
| File tree with metrics |
π Quick Start
Option 1 β VS Code Extension (Recommended)
Install SonarQube MCP from the VS Code Marketplace
Set
sonarqubeMcp.baseUrlandsonarqubeMcp.tokenin VS Code settingsThe MCP server appears automatically in VS Code's MCP panel β start/stop/restart from there
β Extension docs
Option 2 β Standalone CLI
npm install -g sonarqube-mcp-server
export SONAR_MCP_BASE_URL="https://sonarcloud.io"
export SONAR_MCP_TOKEN="squ_your_token"
sonarqube-mcp-serverβ Server docs
Option 3 β MCP Client Config (Claude Desktop, Cursor, etc.)
{
"mcpServers": {
"sonarqube": {
"command": "npx",
"args": ["sonarqube-mcp-server"],
"env": {
"SONAR_MCP_BASE_URL": "https://sonarcloud.io",
"SONAR_MCP_TOKEN": "squ_your_token"
}
}
}
}π License
MIT Β© bhayanak
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/bhayanak/sonarqube-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server