MCP.so
ログイン

SonarQube

@dhanush-dev01

SonarQube について

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

基本情報

カテゴリ

その他

トランスポート

stdio

公開者

dhanush-dev01

投稿者

Dhanush L

設定

以下の設定を使って、このサーバーを 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": ""
      }
    }
  }
}

ツール

ツールは検出されませんでした

ツールは 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

FAQ from SonarQube

What is the health check endpoint?

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

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.

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.

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.

Which runtime and package manager are required?

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

コメント

「その他」の他のコンテンツ