SonarQube

官方 Sonar 安全

让智能体使用 SonarQube Server 或 Cloud 检查代码质量和安全性。 摘要由 AI Index 撰写。

Registry 描述:Analyze code quality and security with SonarQube Server or Cloud directly in AI assistants.

本地安装包(oci) 需要密钥:SONARQUBE_TOKEN

添加到你的客户端

把 SonarQube MCP 服务器添加到 Claude Code

  1. 运行命令

    claude mcp add -e SONARQUBE_TOKEN=<SONARQUBE_TOKEN> sonarqube -- docker run -i --rm -e SONARQUBE_TOKEN -e SONARQUBE_ORG -e SONARQUBE_URL docker.io/sonarsource/sonarqube-mcp
  2. 填写取值 ↓

  3. 确认已连接

如果文件里已有其他服务器,把这一项加到已有的对象里。 确认是否已连接:重启或重新加载客户端,在它的 MCP 服务器列表里找到 sonarqube。需要登录的服务器会在第一次使用时打开登录。

需要填写的值

必填项以 <NAME> 占位符出现在片段里;可选项按同样方式添加。说明来自服务器在 Registry 里的条目。

  • <SONARQUBE_TOKEN> 环境变量 必填 · 密钥

    Your SonarQube USER token

  • <SONARQUBE_ORG> 环境变量 可选 · 密钥

    Your SonarQube Cloud organization key (if using SonarQube Cloud)

  • <SONARQUBE_URL> 环境变量 可选 · 密钥

    Your SonarQube Server URL (if using SonarQube Server)

客户端兼容性

按传输方式判断:客户端文档列出的传输方式里是否有这个服务器提供的。不涉及登录等其他要求。

来源

This data comes from the Official MCP Registry.