MCP Sonarqube 038e1ed0

MCPAI代理

提供方 MoisesTapia

AI代理 stdio · 本地进程 Token 社区 / 第三方
查看接入方式

一个全面的模型上下文协议(MCP)服务器,实现AI助手与SonarQube的无缝集成,通过自然语言交互进行代码质量分析、项目管理和指标咨询。

一句话选型结论

按资料字段整理

MCP Sonarqube 038e1ed0 属于AI代理类 MCP 服务器,stdio · 本地进程,Token,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式stdio · 本地进程 鉴权Token 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

代码质量分析Python本地部署项目管理自然语言交互SonarQube集成AI助手

安装与配置

stdio · 本地进程 Token
客户端在本机拉起子进程,数据不出本机
python -m venv venv

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好Token对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Sonarqube 038e1ed0当前 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方MoisesTapia上游标注的维护方 MoisesTapia
分类AI代理本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式Token远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Python本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

12.5 KB
来自项目仓库与上游目录的原文,未做删改

SonarQube MCP Integration

A comprehensive Model Context Protocol (MCP) server that enables seamless integration between AI assistants and SonarQube, facilitating code quality analysis, project management, and metrics consultation through natural language interactions.

To continue improve this MCP

🚀 Features

Core Capabilities

  • Natural Language Interface: Interact with SonarQube using conversational AI
  • Comprehensive Project Management: Create, manage, and analyze projects
  • Quality Metrics Analysis: Real-time code quality and coverage metrics
  • Issue Management: Search, assign, and track code issues
  • Security Analysis: Vulnerability detection and security hotspot management
  • Quality Gates: Monitor and manage quality gate status
  • Interactive Dashboard: Web-based UI for visualization and configuration

Technical Features

  • MCP Protocol Compliance: Full implementation of Model Context Protocol
  • High Performance: Redis caching and connection pooling
  • Scalable Architecture: Kubernetes-ready with horizontal scaling
  • Security First: Token-based authentication and comprehensive security measures
  • Production Ready: Docker containers, monitoring, and backup solutions

📋 Prerequisites

  • Python 3.11+
  • SonarQube 9.9+ (Community or Enterprise Edition)
  • Docker 20.10+ (for containerized deployment)
  • Kubernetes 1.25+ (for production deployment)
  • Redis (optional, for caching)

🛠️ Quick Start

Option 1: Docker Compose (Recommended)

  1. Clone the repository:bash git clone https://github.com/your-org/sonarqube-mcp.git cd sonarqube-mcp

  2. Configure environment:```bash
    # Copy and edit the development environment file
    cp docker/environments/.env.development docker/environments/.env.development.local

# Edit the file and replace 'your_sonarqube_token_here' with your actual token
nano docker/environments/.env.development.local
```

  1. Start the services:bash # Start all services with development configuration docker compose -f docker/compose/base/docker-compose.yml \ -f docker/compose/environments/development.yml \ --env-file docker/environments/.env.development \ up --build

  2. Access applications:

Service URL Port Credentials
Streamlit UI http://localhost:8501 8501 -
SonarQube http://localhost:9000/sonarqube 9000 admin / admin
MCP Server http://localhost:8001/health 8001 -
pgAdmin http://localhost:8082 8082 admin@example.com / admin
Redis Commander http://localhost:8081 8081 -
Mailhog http://localhost:8025 8025 -
PostgreSQL localhost:5432 5432 sonarqube / sonarqube_dev_password
Redis localhost:6379 6379 redis_dev_password
  1. Configure SonarQube connection:
    - Open Streamlit app at http://localhost:8501
    - Go to Configuration page
    - Enter SonarQube URL: http://localhost:9000/sonarqube
    - Enter your SonarQube token
    - Test and save configuration

📖 For detailed Docker configuration, see docker/README.md

Docker Helper Script

For convenience, use the Docker helper script:```bash

Make the script executable (Linux/Mac)

chmod +x scripts/docker-helper.sh

Initial setup

./scripts/docker-helper.sh setup

Start services

./scripts/docker-helper.sh start

Check status and URLs

./scripts/docker-helper.sh status
./scripts/docker-helper.sh urls

View logs

./scripts/docker-helper.sh logs mcp-server

Open shell in container

./scripts/docker-helper.sh shell postgres

For help with all commands

./scripts/docker-helper.sh


### Option 2: Local Development

1. **Install dependencies**:```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   pip install -r requirements.txt
   ```

2. **Configure environment**:```bash
   export SONARQUBE_URL="https://your-sonarqube-instance.com"
   export SONARQUBE_TOKEN="your_sonarqube_token"
   ```

3. **Start services**:```bash
   # Terminal 1: Start MCP Server
   python -m src.mcp_server.server

   # Terminal 2: Start Streamlit App
   streamlit run src/streamlit_app/app.py
   ```

### Option 3: Kubernetes Production Deployment

1. **Deploy infrastructure**:```bash
   kubectl apply -f k8s/namespace.yaml
   kubectl apply -f k8s/secrets.yaml
   kubectl apply -f k8s/postgres.yaml
   kubectl apply -f k8s/redis.yaml
   ```

2. **Deploy applications**:```bash
   kubectl apply -f k8s/mcp-server.yaml
   kubectl apply -f k8s/streamlit-app.yaml
   kubectl apply -f k8s/ingress.yaml
   ```

3. **Deploy monitoring** (optional):```bash
   kubectl apply -f k8s/monitoring/
   ```

## 📖 Documentation

### User Documentation
- Setup Guide - Complete installation and configuration guide
- API Documentation - Comprehensive API reference
- Troubleshooting Guide - Common issues and solutions

### Developer Documentation
- Architecture Overview - System architecture and design
- Contributing Guide - How to contribute to the project
- Development Setup - Local development environment

### Docker Documentation
- Docker Setup Guide - Complete Docker configuration guide
- Configuration Files - Service configuration documentation

## 🔧 Configuration

### Environment Variables

| Variable | Description | Required | Default |
|----------|-------------|----------|---------|
| `SONARQUBE_URL` | SonarQube instance URL | Yes | - |
| `SONARQUBE_TOKEN` | SonarQube user token | Yes | - |
| `SONARQUBE_ORGANIZATION` | Organization key (SonarCloud) | No | - |
| `REDIS_URL` | Redis connection URL | No | `redis://localhost:6379/0` |
| `CACHE_TTL` | Cache time-to-live (seconds) | No | `300` |
| `LOG_LEVEL` | Logging level | No | `INFO` |

### SonarQube Token Setup

1. Log into your SonarQube instance
2. Go to **My Account** → **Security**
3. Generate a new token with appropriate permissions:
   - Browse projects
   - Execute analysis
   - Administer issues
   - Administer security hotspots

## 🎯 Usage Examples

### MCP Tool Usage```json
{
  "name": "list_projects",
  "arguments": {
    "search": "my-project",
    "page": 1,
    "page_size": 50
  }
}
``````json
{
  "name": "get_measures",
  "arguments": {
    "component": "my-project",
    "metric_keys": "coverage,bugs,vulnerabilities,code_smells"
  }
}
``````json
{
  "name": "search_issues",
  "arguments": {
    "componentKeys": "my-project",
    "severities": "MAJOR,CRITICAL",
    "statuses": "OPEN"
  }
}

Natural Language Queries

With an AI assistant connected to the MCP server:

  • "Show me the code coverage for my-project"
  • "List all critical issues in the authentication module"
  • "What's the quality gate status for the latest build?"
  • "Assign all security vulnerabilities to john.doe"

🏗️ Architecture```mermaid

graph TB
subgraph "Client Layer"
AI[AI Assistant]
UI[Streamlit UI]
end

subgraph "Application Layer"
    MCP[MCP Server]
    WEB[Streamlit App]
end

subgraph "Service Layer"
    SQC[SonarQube Client]
    CACHE[Redis Cache]
end

subgraph "Data Layer"
    SQ[SonarQube Server]
end

AI --> MCP
UI --> WEB
MCP --> SQC
WEB --> SQC
SQC --> CACHE
SQC --> SQ

## 🔒 Security

- **Token-based Authentication**: Secure SonarQube token authentication
- **HTTPS Enforcement**: All communications encrypted in transit
- **Input Validation**: Comprehensive input sanitization and validation
- **RBAC Support**: Role-based access control through SonarQube permissions
- **Security Hardening**: Container security best practices

## 📊 Monitoring

### Health Checks
- MCP Server: `GET /health`
- Streamlit App: `GET /_stcore/health`
- SonarQube: `GET /api/system/status`

### Metrics (Prometheus)
- Request count and duration
- Cache hit ratio
- Error rates
- Active connections

### Logging
- Structured JSON logging
- Request/response tracing
- Error tracking
- Performance metrics

## 🚀 Deployment

### Production Checklist

- [ ] Configure HTTPS/TLS certificates
- [ ] Set up monitoring and alerting
- [ ] Configure backup procedures
- [ ] Implement log aggregation
- [ ] Set resource limits and auto-scaling
- [ ] Configure network policies
- [ ] Set up CI/CD pipeline

### Scaling Considerations

- **Horizontal Scaling**: MCP Server and Streamlit App are stateless
- **Caching**: Redis cluster for distributed caching
- **Load Balancing**: Nginx or cloud load balancer
- **Database**: SonarQube with PostgreSQL master/replica setup

## 🧪 Testing```bash
# Run unit tests
pytest tests/unit/ -v

# Run integration tests
pytest tests/integration/ -v

# Run with coverage
pytest --cov=src --cov-report=html

# Run linting
ruff check src/ tests/
black --check src/ tests/
mypy src/

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Run the test suite
  6. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

  • Documentation: Check our comprehensive documentation
  • Issues: Report bugs or request features via GitHub Issues
  • Discussions: Join community discussions in GitHub Discussions
  • Security: Report security issues to security@yourorg.com

🗺️ Roadmap

Current Version (v2.0.1) - Latest Release

  • ✅ Core MCP protocol implementation
  • ✅ SonarQube integration
  • ✅ Streamlit web interface
  • ✅ Docker containerization
  • ✅ Kubernetes deployment
  • ✅ NEW: Fixed MCP server port consistency (8001)
  • ✅ NEW: Improved error handling and session state management
  • ✅ NEW: Updated Streamlit compatibility (v1.50+)
  • ✅ NEW: Enhanced Docker configuration and health checks
  • ✅ NEW: Production-ready configuration templates

Upcoming Features (v3.0.0)

  • [ ] Advanced analytics and reporting
  • [ ] Custom quality gate templates
  • [ ] Webhook integrations
  • [ ] Multi-tenant support
  • [ ] Enhanced security features
  • [ ] Real-time notifications
  • [ ] Improved caching strategies

Future Enhancements (v4.0)

  • [ ] Machine learning insights
  • [ ] Advanced visualization
  • [ ] Plugin architecture
  • [ ] Mobile application
  • [ ] Enterprise features

📈 Performance

Benchmarks

  • Response Time: < 2 seconds for most operations
  • Throughput: 100+ requests per minute per instance
  • Cache Hit Ratio: > 70% with proper configuration
  • Memory Usage: < 512MB per service instance

Optimization Tips

  • Enable Redis caching for better performance
  • Use connection pooling for high-throughput scenarios
  • Configure appropriate resource limits
  • Monitor and tune cache TTL values

📝 Changelog

v1.1.0 (2024-10-24) - Stability and Configuration Updates

🔧 Fixed

  • MCP Server Port Consistency: Standardized MCP server port to 8001 across all configurations
  • Session State Errors: Fixed Streamlit session state initialization issues
  • Deprecation Warnings: Updated use_container_width to width=&quot;stretch&quot; for Streamlit 1.50+
  • Docker Compose Syntax: Removed obsolete version field from production configuration
  • Health Check Recursion: Fixed infinite recursion in MCP client health checks

🚀 Improved

  • Error Handling: Enhanced error handling with graceful fallbacks
  • Async Operations: Better async/await patterns in MCP client
  • Docker Configuration: Cleaned up production overrides and service definitions
  • Logging: Improved structured logging with better error tracking
  • Documentation: Updated README files with current configurations and troubleshooting

🔒 Security

  • Container Security: Improved file permission handling
  • Network Configuration: Better service isolation and communication
  • Production Templates: Enhanced production configuration templates

v1.0.0 (2024-10-20) - Initial Release

✨ Features

  • Complete MCP protocol implementation
  • SonarQube integration with comprehensive API coverage
  • Streamlit web interface with real-time data
  • Docker containerization with multi-environment support
  • Kubernetes deployment configurations
  • Redis caching for performance optimization
  • Comprehensive monitoring and health checks

🏆 Acknowledgments

  • FastMCP - MCP protocol implementation
  • Streamlit - Web application framework
  • SonarQube - Code quality platform
  • httpx - HTTP client library

Made with ❤️ by Moises Tapia (Cl0nR3v)

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
MCP Sonarqube 038e1ed0 怎么安装?

在客户端按下面的安装命令接入:python -m venv venv。装完在客户端配置里引用同一个包或端点。

MCP Sonarqube 038e1ed0 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

MCP Sonarqube 038e1ed0 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Sonarqube 038e1ed0 需要 API Key 吗?

资料标注需要Token认证,使用前准备好对应凭据,并按最小权限配置。

MCP Sonarqube 038e1ed0 能提供哪些能力?

资料显示能力标签包括 自然语言交互、Python、项目管理。具体工具清单以官方文档为准。

MCP Sonarqube 038e1ed0 需要什么运行环境?

运行时为 Python;属于本地进程,需要在本机装好运行环境。

MCP Sonarqube 038e1ed0 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。