Back to MCP directory
publicPublicdnsLocal runtime

sonarqube-mcp-server

SonarQube MCP服务器为AI助手提供代码质量分析集成

article

README

🚀 项目介绍

这是一个用于与 SonarQube 实例交互的 MCP 服务器。该服务器可通过查询接口获取项目和问题信息,能有效提升项目管理和质量检测的效率。

🚀 快速开始

本服务器可通过查询接口获取项目和问题信息,以下是使用前的准备步骤。

✨ 主要特性

  • 📊 获取项目的详细信息
  • 🔍 检索特定项目中的问题
  • 🎛️ 支持多种过滤参数,例如严重性、状态、分辨率等
  • ⏭️ 支持分页和排序功能

📦 安装指南

克隆仓库

git clone https://github.com/sapientpants/sonarqube-mcp-server.git
cd sonarqube-mcp-server

安装依赖项

pnpm install

构建项目

pnpm run build

📚 详细文档

配置 Claude Desktop

将以下内容添加到配置文件中:

{
  "mcpServers": {
    "sonarqube": {
      "command": "node",
      "args": [
        "/path/to/sonarqube-mcp-server/dist/index.js"
      ],
      "env": {
        "SONARQUBE_TOKEN": "your-sonarqube-token"
      }
    }
  }
}

先决条件

  • Node.js 20 或更高版本
  • pnpm 10.7.0 或更高版本
  • Docker(用于容器构建)

脚本命令

pnpm run build   # 构建 TypeScript 代码
pnpm run start    # 启动服务器
pnpm run dev      # 在开发模式下启动服务器
pnpm run test     # 运行测试
pnpm run lint     # 运行 ESLint
pnpm run format   # 使用 Prettier 格式化代码

📄 许可证

MIT

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client