SonarQube MCP
A lightweight MCP for SonarQube reports
README
SonarQube MCP Server
A Model Context Protocol (MCP) server for interacting with SonarQube APIs, providing tools for authentication, project management, and metrics retrieval.
Features
- ✅ Token-based authentication
- 🔍 Project listing and details
- 📊 Metrics retrieval
- 🚀 Lightweight and fast
- 🔄 Standardized MCP interface
🛠️ Getting Started
Requirements
- Node.js >= v20.0.0
- Cursor or Windsurf
Installation CLI
npm install -g @lomas/sonarqubemcp
# or
npx @lomas/sonarqubemcp@latest
Configuration
Set these environment variables:
export SONARQUBE_URL="http://your-sonarqube-server:9000"
export SONARQUBE_TOKEN="<token>"
Usage
Cursor IDE
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
Configure SonarQube MCP on Cursor
{
"mcpServers": {
"SonarQube MCP": {
"command": "npx",
"args": [
"-y",
"@lomas/sonarqubemcp@1.0.3",
"sonarqubemcp"
],
"env": {
"SONARQUBE_URL": "<url>",
"SONARQUBE_TOKEN": "<token>"
}
}
}
}
In Windsurf
Add this to your Windsurf MCP config file. See Windsurf MCP docs for more info.
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}
}
}
In VS Code
Install in VS Code
Add this to your VS Code MCP config file. See VS Code MCP docs for more info.
{
"servers": {
"Context7": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}
}
}
Available tools (via MCP protocol):
- authenticate
- list_projects
- get_project_details
- get_project_metrics
API Endpoints
| Tool | Parameters | Description |
|---|---|---|
authenticate |
token? |
Validate SonarQube token |
list_projects |
token? |
List all projects |
get_project_details |
token?, projectKey |
Get details for specific project |
get_project_metrics |
token?, projectKey, metrics |
Get metrics for project |
Troubleshooting
Error: Connection refused
- Verify SonarQube server is running
- Check
SONARQUBE_URLis correct
Error: Invalid token
- Regenerate your SonarQube token
- Ensure token has proper permissions
License
MIT © Akash Lomas
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.