# ArchAI-Labs/fastmcp-sonarqube-metrics [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/ArchAI-Labs/fastmcp-sonarqube-metrics  
**GitHub Stars:** 14  
**npm Downloads (last month):** 2082971  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/archai-labs-fastmcp-sonarqube-metrics

## Description
A Model Context Protocol (MCP) server that provides a set of tools for retrieving information about SonarQube projects like metrics (actual and historical), issues, health status.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "fastmcp-sonarqube-metrics": {
    "command": "uvx",
    "args": ["fastmcp"],
    "env": {
      "SONARQUBE_URL": "",
      "SONARQUBE_TOKEN": "",
      "TRANSPORT": ""
    }
  }
}
```

**Requires environment variables:** `SONARQUBE_URL`, `SONARQUBE_TOKEN`, `TRANSPORT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What ArchAI-Labs/fastmcp-sonarqube-metrics MCP server does

ArchAI-Labs/fastmcp-sonarqube-metrics MCP server connects an MCP client to a configured SonarQube instance. Its tools expose project quality data without requiring the client to construct SonarQube HTTP requests directly. The available data includes current measures such as bugs, vulnerabilities, code smells, coverage, and duplication density, along with historical values for those measures.

The server can also report the health of the SonarQube instance, list accessible projects, retrieve issues, and return metrics for components within a project. Issue queries support optional filters for issue type, severity, and resolution status, with a configurable result limit. Project creation and deletion are available as administrative operations; deletion should be treated as a destructive action.

## How it works

The implementation is written in Python and uses FastMCP to define the MCP server and its tools. HTTP communication with SonarQube is handled through the project’s API client code, with libraries including httpx and pydantic. The component-tree operation handles pagination so it can collect all returned component results rather than stopping at the first response page.

A local MCP client can connect to the server over the configured transport and invoke tools by name. The repository includes test, graphical, and LangChain-based clients, but the test client is intended for experimentation rather than as the primary user interface. Claude Desktop or a custom MCP client can connect to the server instead.

## Setup and configuration

ArchAI-Labs/fastmcp-sonarqube-metrics MCP server requires Python 3.7 or newer, a reachable SonarQube instance with API access, and a SonarQube API token with suitable permissions. Install the documented Python dependencies, including FastMCP, httpx, pydantic, and python-dotenv. Create a `.env` file in the project directory or otherwise provide the configuration through the environment.

Set `SONARQUBE_URL` to the SonarQube base URL and `SONARQUBE_TOKEN` to the API token. The README also documents `TRANSPORT` with `stdio` or `sse` values. Run the server with `python server.py`. The repository describes additional LLM-related variables for its example clients, including Gemini and Azure OpenAI settings; those are client configuration rather than the SonarQube connection itself.

## Tools and capabilities

The server provides these named tools:

- `get_status` checks the configured SonarQube instance.
- `create_sonarqube_project` creates a project and requires administrator privileges.
- `delete_sonarqube_project` removes a project and requires administrator privileges.
- `list_projects` lists accessible projects, with optional name or key filtering.
- `get_sonarqube_metrics` retrieves selected current measures for a project key.
- `get_sonarqube_metrics_history` returns historical measures and supports optional date filters.
- `get_sonarqube_component_tree_metrics` returns measures for project components such as files or directories.
- `get_project_issues` retrieves project issues with optional filters and a result limit.

## Limitations and notes

The repository is marked as a work in progress, so some behavior may not be complete. Access to projects and issue data depends on the permissions of the configured SonarQube token. Administrative permissions are explicitly required for project creation and deletion. The included clients are mainly examples or testing tools, and the README recommends using Claude Desktop or building a custom client for regular MCP interaction. A hosted deployment is listed through Fronteir AI, but its operational details are not specified in the provided material.

_Full upstream README: https://allmcps.com/mcp/archai-labs-fastmcp-sonarqube-metrics/readme_

