sonarqube
Model Context Protocol (MCP) server for SonarQube
claude mcp add --transport stdio sapientpants-sonarqube-mcp-server node server.js \ --env JAVA_HOME="Path to Java installation (required by SonarQube)" \ --env MCP_LOG_LEVEL="Logging verbosity for MCP server (e.g., info, debug)" \ --env SONARQUBE_HOME="Path to SonarQube installation (optional placeholder)"
How to use
This MCP server is a connector intended to bridge an MCP client with a SonarQube instance. It is based on the SonarQube MCP server model and is documented as deprecated in favor of the official SonarSource release. If you choose to experiment with this repository, start by ensuring you have a compatible Node.js environment and a running SonarQube instance. The server exposes endpoints to interact with SonarQube data through the MCP protocol; use your MCP client to connect to the server name (sonarqube) defined in your configuration, and send requests as described by the MCP protocol to fetch or stream metrics, quality profiles, issues, and related SonarQube data.
Typical usage flow:
- Start the MCP server using the node entry point (the maintained approach is to run the server script referenced in the configuration).
- Connect an MCP client to the server name (sonarqube) and perform operations supported by the MCP interface, such as requesting project metrics, quality profiles, or issues compatible with SonarQube data structures.
- Consume responses, adapt your tooling, and monitor logs for any compatibility notes or deprecations flagged by the official SonarQube MCP server implementation.
Note: This repository points to the official SonarQube MCP server for production use. If you require up-to-date features, long-term support, and compatibility guarantees, prefer the official repository and release channels.
How to install
Prerequisites:
- Node.js (LTS version recommended)
- npm (bundled with Node.js) or yarn
- A working SonarQube instance (required by the MCP server to bridge data)
Installation steps:
- Clone the repository and navigate into the project directory.
- Install dependencies:
npm install
or if using Yarn:
yarn install - Ensure SonarQube is installed and accessible. Verify JAVA_HOME is set if required by SonarQube.
- Configure environment variables if needed. At minimum, provide paths for SONARQUBE_HOME and JAVA_HOME in your environment or in a .env file loaded by your process manager.
- Run the server:
node server.js
Alternatively, use your process manager to keep it running in production (e.g., PM2).
- Point your MCP client to the server endpoint and begin interacting with SonarQube data through the MCP protocol.
Additional notes
This MCP server repository is no longer maintained and references the official SonarQube MCP server for production use. If you rely on this project, be aware of potential compatibility issues with newer SonarQube versions. Always prefer the official MCP server release for active development and security updates. Common issues include Java version mismatches, required environment variables not being set (JAVA_HOME, SONARQUBE_HOME), and network connectivity problems between the MCP server and SonarQube.
Environment variables to consider:
- JAVA_HOME: Path to your JDK installation
- SONARQUBE_HOME: Path to your SonarQube home directory
- MCP_LOG_LEVEL: Logging level (e.g., error, warn, info, debug)
Configuration tips:
- Keep the mcpServers.sonarqube object aligned with the actual entry point in your deployment (server.js in this placeholder configuration).
- If you migrate to the official release, follow their configuration schema and deployment recommendations for production reliability.
Related MCP Servers
XcodeBuildMCP
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Matryoshka
MCP server for token-efficient large document analysis via the use of REPL state
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
Agentic -Skill
Agentic-MCP, Progressive MCP client with three-layer lazy loading. Validates AgentSkills.io pattern for efficient token usage. Use MCP without pre-install & wasting full-loading
mcp -python-template
This template provides a streamlined foundation for building Model Context Protocol (MCP) servers in Python. It's designed to make AI-assisted development of MCP tools easier and more efficient.
Convert-Markdown-PDF
Markdown To PDF Conversion MCP