sonar-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SONAR_URL | Yes | SonarQube server URL | |
| SONAR_TOKEN | Yes | SonarQube API token | |
| SONAR_MCP_HOST | No | Default host for HTTP transports | 127.0.0.1 |
| SONAR_MCP_PORT | No | Default port for HTTP transports | 8000 |
| SONAR_MCP_TRANSPORT | No | Default transport mode (stdio, sse, streamable-http) | stdio |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sonar_list_categoriesA | Discover available SonarQube tools by category. Returns tool names and descriptions. Categories: instance, project, issue, quality, metrics, rules, task Args: category: Optional category name to filter (e.g., "project", "issue"). If provided, returns only that category's tools. Returns: Dictionary with: - success: bool - Operation success status - categories: list - Available categories (when no filter) - category: dict - Single category details (when filtered) - total_tools: int - Total number of tools - error: str - Error message (if success is False) |
| sonar_get_tool_schemaA | Get the full JSON schema for a specific SonarQube tool. Use after list_categories to get parameter details before calling execute_tool. Args: tool_name: Name of the tool (e.g., 'sonar_list_issues', 'sonar_get_project') Returns: Dictionary with: - success: bool - Operation success status - tool_name: str - The tool name - schema: dict - JSON schema for tool parameters - description: str - Tool description from docstring - error: str - Error message (if success is False) |
| sonar_execute_toolA | Execute any SonarQube tool by name with the provided arguments. Use after getting the schema to understand required parameters. Args: tool_name: Name of the tool to execute (e.g., 'sonar_list_issues') arguments: Tool-specific arguments (optional). See sonar_get_tool_schema for details. Returns: The tool's return value, or error dict if tool not found or execution fails. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| code_review | Review code issues from SonarQube and suggest fixes |
| fix_issues | Generate fix recommendations for specific SonarQube issue types |
| quality_report | Generate a comprehensive quality report for a project |
| quality_goals | Check project against custom quality goals |
| security_audit | Perform a security-focused audit of a project |
| vulnerability_fix | Get detailed fix guidance for specific vulnerabilities |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| SonarQube Projects | List all accessible SonarQube projects |
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/wadew/sonar-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server