FastMCP SonarQube Metrics MCP Server

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

Remote serverstreamable-httpPython

What is the FastMCP SonarQube Metrics MCP server?

FastMCP SonarQube Metrics MCP server is a hosted integration for AI assistants that speak the Model Context Protocol. Chat with your SonarQube data: explore metrics, compare trends, and track issues—effortlessly.

What you get

This project provides a set of tools for retrieving information about SonarQube projects using the FastMCP (Fast Model Context Protocol) framework. It serves as an interface to SonarQube, allowing users to programmatically access metrics, historical data, and component tree metrics for specified projects. This automated access enables reporting, analysis, and integration of SonarQube data with other systems.

What the assistant can call

Once FastMCP SonarQube Metrics is connected, these are the calls the assistant has available:

  • get_status — Performs a health check on the configured SonarQube instance
  • create_sonarqube_project — Creates a new SonarQube project. Requires administrator privileges
  • delete_sonarqube_project — Deletes a SonarQube project. Requires administrator privileges. USE WITH CAUTION!
  • list_projects — Lists all accessible SonarQube projects, optionally filtered by name or key
  • get_sonarqube_metrics — Retrieves specified metrics (bugs, vulnerabilities, code smells, coverage, duplication density) for a given SonarQube project key
  • get_sonarqube_metrics_history — Retrieves historical metrics (bugs, vulnerabilities, code smells, coverage, duplication density) for a given SonarQube project using
  • get_sonarqube_component_tree_metrics — Retrieves metric values for all components (e.g., files or directories) in a project using /api/measures/component_tree Automatically handles
  • get_project_issues — Fetch SonarQube issues for a given project, optionally filtered by type, severity, and resolution status. Returns up to limit results (default: 10)
  • project_key — the SonarQube project key
  • Prerequisites — The Prerequisites tool exposed by this server

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

Configuration and credentials

You will need 4 environment variables: SONARQUBE_URL, SONARQUBE_TOKEN, GEMINI_API_KEY, AZURE_OPENAI_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.7+ * SonarQube instance with API access * A SonarQube API token with appropriate permissions * FastMCP installed (pip install fastmcp) * httpx installed (pip install httpx) * pydantic installed (pip install pydantic) * python-dotenv installed (pip install python-dotenv)

Choosing this one

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. FastMCP SonarQube Metrics's toolset — get_status, create_sonarqube_project, delete_sonarqube_project and 7 more — is a fair guide to whether it matches your workflow. It is maintained by ArchAI-Labs; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch FastMCP SonarQube Metrics.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the fastmcp sonarqube metrics mcp server does with a few real requests.

Available tools

ToolWhat it does
get_statusPerforms a health check on the configured SonarQube instance.
create_sonarqube_projectCreates a new SonarQube project. Requires administrator privileges.
delete_sonarqube_projectDeletes a SonarQube project. Requires administrator privileges. **USE WITH CAUTION!**
list_projectsLists all accessible SonarQube projects, optionally filtered by name or key.
get_sonarqube_metricsRetrieves specified metrics (bugs, vulnerabilities, code smells, coverage, duplication density) for a given SonarQube project key.
get_sonarqube_metrics_historyRetrieves historical metrics (bugs, vulnerabilities, code smells, coverage, duplication density) for a given SonarQube project using /api/measures/search_history. Optional date filters can be applied.
get_sonarqube_component_tree_metricsRetrieves metric values for all components (e.g., files or directories) in a project using /api/measures/component_tree Automatically handles pagination to retrieve all results.
get_project_issuesFetch SonarQube issues for a given project, optionally filtered by type, severity, and resolution status. Returns up to *limit* results (default: 10).
project_keythe SonarQube project key
PrerequisitesThe Prerequisites tool exposed by this server.

How to install the FastMCP SonarQube Metrics MCP server

{
    "mcpServers": {
        "fastmcp-sonarqube-metrics": {
            "command": "uv",
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/PARENT/FOLDER/fastmcp-sonarqube-metrics",
                "run",
                "server.py"
            ]
        }
    }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.7+ * SonarQube instance with API access * A SonarQube API token with appropriate permissions * FastMCP installed (pip install fastmcp) * httpx installed (pip install httpx) * pydantic installed (pip install pydantic) * python-dotenv installed (pip install python-dotenv)
VariableDescriptionRequired
SONARQUBE_URLEndpoint or connection string the server talks to.Yes
SONARQUBE_TOKENCredential the server authenticates with.Yes
GEMINI_API_KEYCredential the server authenticates with.Yes
AZURE_OPENAI_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use FastMCP SonarQube Metrics to get status.
  • Use FastMCP SonarQube Metrics to create sonarqube project.
  • Use FastMCP SonarQube Metrics to delete sonarqube project.

Frequently asked questions

Python 3.7+, a running SonarQube instance with API access, a valid SonarQube API token, and installed packages: fastmcp, httpx, pydantic, python-dotenv.