FastMCP server & helper clients that expose SonarQube metrics and issue data as easy-to-call MCP tools (health-check, create/delete projects, list projects, get metrics/history/component-tree, get issues) so that developers or LLM agents can chat with their SonarQube instance.
https://github.com/ArchAI-Labs/fastmcp-sonarqube-metricsStop digging through SonarQube dashboards to understand your code quality metrics. This MCP server transforms your SonarQube instance into a conversational interface—ask questions in plain English and get instant answers about bugs, vulnerabilities, coverage trends, and technical debt.
You know the drill: stakeholders want a code quality report, so you spend 20 minutes navigating SonarQube's UI, switching between projects, copying metrics into spreadsheets, and trying to spot trends across time periods. Now you can just ask: "Show me critical bugs introduced this week" or "Compare test coverage between our microservices" and get structured answers immediately.
This MCP server exposes eight powerful tools that turn your SonarQube data into natural conversation:
Project Management
Metrics & Analysis
Daily Standups: "What new issues appeared since yesterday's deployment?"
Code Reviews: "Show me code smell hotspots in the authentication module"
Release Planning: "How has test coverage changed over the last sprint?"
Technical Debt Tracking: "List all major vulnerabilities by component"
Automated Reporting: Build dashboards that pull metrics programmatically instead of manual screenshots
Claude Desktop Integration: Add to your claude_desktop_config.json
and chat directly with your SonarQube data through Claude's interface.
Custom Applications: Use the FastMCP client to build automated reporting tools, Slack bots, or integrate with your existing DevOps workflows.
LangChain Support: Included client demonstrates how to incorporate SonarQube insights into agent-based workflows.
GUI Testing: Ships with a Tkinter client for immediate testing and exploration.
git clone https://github.com/ArchAI-Labs/fastmcp-sonarqube-metrics.git
cd fastmcp-sonarqube-metrics
# Configure your SonarQube connection
echo "SONARQUBE_URL=https://your-sonar-instance.com" > .env
echo "SONARQUBE_TOKEN=your-api-token" >> .env
echo "TRANSPORT=stdio" >> .env
# Install dependencies
pip install fastmcp httpx pydantic python-dotenv
# Run the server
python server.py
For Claude Desktop, add this to your MCP configuration:
{
"mcpServers": {
"fastmcp-sonarqube-metrics": {
"command": "uv",
"args": [
"--directory",
"/path/to/fastmcp-sonarqube-metrics",
"run",
"server.py"
]
}
}
}
Built on FastMCP for reliable message passing with async HTTP requests to SonarQube's REST API. Supports both stdio and Server-Sent Events (SSE) transport modes. The modular design makes it straightforward to extend with additional SonarQube endpoints or customize the data processing.
Each tool handles pagination automatically and includes comprehensive error handling for network issues, authentication problems, and malformed responses.
Ready to stop clicking through SonarQube dashboards? Your code quality conversations are about to get a lot more productive.