fastmcp-sonarqube-metrics

fastmcp-sonarqube-metrics

4

Chat with your SonarQube data: explore metrics, compare trends, and track issues—effortlessly.

FastMCP SonarQube Metrics

Overview

This project provides tools for accessing SonarQube data using the FastMCP framework. It allows users to retrieve metrics, historical data, and component tree metrics for SonarQube projects, facilitating reporting and analysis. The system abstracts SonarQube API complexities and integrates data with other systems, tailored for developers and DevOps engineers. The repository includes client and server components for communication and data retrieval.

Supported MCP Tools

  • Health check on SonarQube.
  • List and filter SonarQube projects.
  • Retrieve specified metrics and historical metrics for a project.
  • Fetch project issues, with filtering options.

Technology Stack

  • Python
  • FastMCP
  • Libraries: httpx, pydantic, dotenv
  • Tools: SonarQube API

Getting Started

Prerequisites

  • Python 3.7+
  • SonarQube instance with API access and token
  • FastMCP, httpx, pydantic, python-dotenv installed

General Build Steps

  1. Clone the repository and navigate to it.
  2. Set up environment variables in a .env file with SonarQube URL and token.
  3. Run the server and client applications.

Usage with TRANSPORT=SSE

  • Start server in SSE mode to enable real-time updates.
  • Connect and browse available tools via MCP Inspector.