Sonar MCP Server
A read-only MCP server for self-hosted SonarQube Community Build 26.4+ that allows AI agents to fetch project issues, security hotspots, rule descriptions, and source-code snippets to fix findings locally. It exposes a focused set of tools for diagnosing code quality issues without modifying the SonarQube instance.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Fetch a project's issue list
- Read security hotspots
- Get rule descriptions
- Pull source-code snippets around issues
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
ghcr.io/igorolv/sonar-mcp-server:0.1.0
{
"transport": "stdio",
"identifier": "ghcr.io/igorolv/sonar-mcp-server:0.1.0",
"registryType": "oci",
"environmentVariables": [
{
"name": "SONAR_URL",
"format": "string",
"isRequired": true,
"description": "Base URL of the SonarQube instance, e.g. https://sonar.example.com"
},
{
"name": "SONAR_TOKEN",
"format": "string",
"isRequired": true,
"description": "SonarQube user token (My Account -> Security -> Generate Tokens)"
},
{
"name": "SONAR_DEFAULT_PROJECT_KEY",
"format": "string",
"description": "Project key used when a tool call does not name one"
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"sonar-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL=<YOUR_SONAR_URL>",
"-e",
"SONAR_TOKEN=<YOUR_SONAR_TOKEN>",
"-e",
"SONAR_DEFAULT_PROJECT_KEY=<YOUR_SONAR_DEFAULT_PROJECT_KEY>",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<YOUR_SONAR_URL>",
"SONAR_TOKEN": "<YOUR_SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<YOUR_SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}Cline
{
"mcpServers": {
"sonar-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL=<YOUR_SONAR_URL>",
"-e",
"SONAR_TOKEN=<YOUR_SONAR_TOKEN>",
"-e",
"SONAR_DEFAULT_PROJECT_KEY=<YOUR_SONAR_DEFAULT_PROJECT_KEY>",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<YOUR_SONAR_URL>",
"SONAR_TOKEN": "<YOUR_SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<YOUR_SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}VS Code
{
"servers": {
"sonar-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL=<YOUR_SONAR_URL>",
"-e",
"SONAR_TOKEN=<YOUR_SONAR_TOKEN>",
"-e",
"SONAR_DEFAULT_PROJECT_KEY=<YOUR_SONAR_DEFAULT_PROJECT_KEY>",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<YOUR_SONAR_URL>",
"SONAR_TOKEN": "<YOUR_SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<YOUR_SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"sonar-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL=<YOUR_SONAR_URL>",
"-e",
"SONAR_TOKEN=<YOUR_SONAR_TOKEN>",
"-e",
"SONAR_DEFAULT_PROJECT_KEY=<YOUR_SONAR_DEFAULT_PROJECT_KEY>",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "<YOUR_SONAR_URL>",
"SONAR_TOKEN": "<YOUR_SONAR_TOKEN>",
"SONAR_DEFAULT_PROJECT_KEY": "<YOUR_SONAR_DEFAULT_PROJECT_KEY>"
}
}
}
}Let your agent find its tools
Find servers like Sonar MCP Server from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.