MCP.so
登录

SonarQube MCP Server

@dhanush-dev01

基本信息

分类

其他

传输方式

stdio

作者

dhanush-dev01

提交者

Dhanush L

关于 SonarQube MCP Server

The SonarQube MCP (Model Context Protocol) Server is a custom-built AI-powered backend designed to integrate with SonarQube and enable intelligent, context-aware interactions between static code analysis and modern AI agents like GitHub Copilot, VS Code Agents, or any LLM-powered

SonarQube MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "sonarqubemcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--init",
        "-e",
        "SONARQUBE_URL",
        "-e",
        "SONARQUBE_TOKEN",
        "-e",
        "PROJECT_KEY",
        "dhanushhypervisor/sonarqube_mcp_server"
      ],
      "env": {
        "SONARQUBE_URL": "",
        "SONARQUBE_TOKEN": "",
        "PROJECT_KEY": ""
      }
    }
  }
}

SonarQube MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is SonarQube?

This server bridges SonarQube APIs to MCP-compliant clients, enabling you to monitor and analyze code quality. It provides tools for health checks, token validation, project issues, project listing, and project metrics.

How to use SonarQube?

Set the environment variables SONARQUBE_URL, SONARQUBE_TOKEN, and PROJECT_KEY. Install the required dependencies (FastMCP, Requests) from requirements.txt and run the server using Python. Alternatively, use Docker by passing the environment variables at runtime. The server can be integrated with VS Code via the MCP settings.

Key features of SonarQube

  • Health check endpoint to verify server status
  • Token validation to authenticate and retrieve user info
  • Fetch unresolved issues (bugs, code smells, vulnerabilities)
  • List all accessible SonarQube projects
  • Retrieve key quality metrics (bugs, coverage, duplication, ratings)

Use cases of SonarQube

  • Continuous code quality monitoring in CI/CD pipelines
  • Automated issue reporting for developer teams
  • Project onboarding with quick quality overview
  • Integration with IDEs for real‑time code analysis
  • Auditing code health across multiple projects

常见问题

1

What is the health check endpoint?

The `sonar_health_check` endpoint returns the current health status and connection information of your SonarQube server.

2

How do I validate my authentication token?

Use the `get_token_info` endpoint. It validates your `SONARQUBE_TOKEN` and returns authentication status and associated user details.

3

What happens if I provide an invalid project key?

The server returns a detailed error message. Error handling covers invalid project keys, connection issues, authentication failures, and permission problems.

4

Can I run this server without Docker?

Yes. Set the required environment variables, install the dependencies listed in `requirements.txt`, and run the Python server directly.

5

Which runtime and package manager are required?

Python 3.10 and the `uv` package manager are used for dependency management and execution.

评论

其他 分类下的更多 MCP 服务器