sonarlint-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SONAR_TOKEN | No | Authentication token for connected mode; read from the environment and never written to disk. | |
| SONARQUBE_ORG | No | SonarQube Cloud organization for connected mode; used together with SONAR_PROJECT_KEY. | |
| SONARQUBE_URL | No | SonarQube Server (self-hosted) URL for connected mode; used together with SONAR_PROJECT_KEY. | |
| SONARCLOUD_REGION | No | SonarQube Cloud region, either EU or US. Optional when binding to SonarQube Cloud. | |
| SONAR_PROJECT_KEY | No | Project key for connected mode binding. | |
| SONARLINT_CACHE_DIR | No | Location of the extracted language server and analyzer cache. | <install>/sonarlint |
| SONARLINT_MCP_DEBUG | No | Any value enables verbose LSP logging to stderr. | |
| SONARLINT_ALLOW_ANY_PATH | No | Any value lifts the workspace-root confinement. | |
| SONARLINT_SCAN_TIMEOUT_MS | No | Overall scan deadline in milliseconds. | 180000 |
| SONARLINT_COMPILE_COMMANDS | No | Path to a compile_commands.json for C/C++ analysis. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sonarlint_scan_fileA | Run a local SonarLint (SonarQube for IDE engine) analysis on a single file and return code-quality, bug and security issues as JSON. Use after editing a file. |
| sonarlint_scan_folderB | Run a local SonarLint analysis on every analyzable file under a folder (skips node_modules, build dirs, .git, etc.). Returns issues grouped by file. |
| sonarlint_scan_projectA | Run a local SonarLint analysis over the entire current workspace/project (equivalent to a full folder scan from the workspace root). |
| sonarlint_list_rulesA | List the SonarLint rules currently active for the workspace. |
| sonarlint_get_ruleA | Get details (severity, type, description) for a SonarLint rule key, e.g. 'typescript:S3923'. |
| sonarlint_statusA | Report the state of the SonarLint engine: whether it is running, the workspace root, and the cached analyzer version. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Most tools have clearly distinct purposes: scanning a file, scanning a folder, scanning the project, listing rules, getting a rule, and checking status. The main overlap is between sonarlint_scan_folder and sonarlint_scan_project, since a project scan is essentially a folder scan from the workspace root; the descriptions clarify this, but an agent may still hesitate between them.
All tools share the sonarlint_ prefix and mostly follow a verb_noun pattern: scan_folder, scan_project, scan_file, get_rule, list_rules. The only minor deviation is sonarlint_status, which uses a noun-only form rather than a verb, but it is still readable and consistent with the overall prefix.
Six tools is well-scoped for a SonarLint analysis server. Each tool covers a distinct operation needed for scanning code and inspecting rules/status, with no obvious filler.
The surface covers the core lifecycle: scan individual files, folders, and the whole project, plus inspect active rules, get rule details, and check engine status. Minor gaps exist around configuring rule activation/exclusions or retrieving richer issue metadata/fixes, but agents can work around these for basic analysis workflows.