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?

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.

Configuration and credentials

  • 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)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

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

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.