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 |
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": 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 |
TDQS
Scored across 3 tools
Each tool serves a unique purpose: list_categories allows discovery, get_tool_schema provides parameter details, and execute_tool runs the actual tool. No overlap in functionality.
All tools follow a consistent 'sonar_verb_noun' pattern (list_categories, get_tool_schema, execute_tool), using snake_case and clear action-resource naming.
Three tools is an ideal size for a meta-MCP server that dynamically exposes many underlying tools. Each tool earns its place with a critical role in the workflow.
The set covers the full discovery-execution lifecycle: discover tools, inspect schema, then execute. No gaps for the intended meta-functionality.