Skip to main content
Glama
Cerios-TechLab

Quality Transformation Coach Assistent MCP server

README.md
# Quality Transformation Coach MCP Server

[![smithery server](https://img.shields.io/badge/smithery%20server-blue)](https://smithery.ai/servers/djsteavy/quality-transformation-coach-mcp)

Een MCP-server die als assistent dient voor software quality transformation — bedoeld voor zowel de quality transformation coach (overzicht, advisering, maturity assessments) als het development/test team (hands-on kwaliteitsanalyse, testondersteuning, CI/CD-inzichten).

## Functionaliteiten

De server biedt 16 tools verdeeld over 5 categorieën:

### Code Analyse
| Tool | Beschrijving |
|---|---|
| `analyze_code_quality` | Scan een repo voor code kwaliteits-metrieken (complexity, duplication, smells) |
| `analyze_test_coverage` | Analyseer test coverage en identificeer gaps |
| `detect_test_patterns` | Herken test patterns (unit/integration/e2e) en anti-patterns |
| `analyze_flaky_tests` | Detecteer flaky tests op basis van CI-logs |

### Issue & Defect Analyse
| Tool | Beschrijving |
|---|---|
| `defect_trend_analysis` | Analyseer issue-trends (aanwas, resolutietijd, severity) |
| `quality_hotspot_detection` | Identificeer modules met hoogste defect-dichtheid |
| `root_cause_categories` | Categoriseer bugs per oorzaak (code, design, requirements, security) |

### CI/CD
| Tool | Beschrijving |
|---|---|
| `pipeline_health` | Analyseer CI/CD pipeline gezondheid (success rate, doorlooptijd) |
| `test_result_summary` | Agregeer test results vanuit CI runs |
| `cicd_readiness_scan` | Voer een CI/CD Readiness Scan uit (102 vragen, 5 domeinen) |
| `quality_gate_check` | Controleer of kwaliteits gates behaald zijn |

### AI Readiness
| Tool | Beschrijving |
|---|---|
| `ai_readiness_scan` | Voer een AI Readiness Scan uit (60 vragen, 5 AI-domeinen) |

### Kennis & Maturity
| Tool | Beschrijving |
|---|---|
| `maturity_assessment` | Voer een TMMi/ISO 25010 maturity scan uit |
| `quality_recommendations` | Geef context-gevoelige verbeteradviezen |
| `framework_lookup` | Raadpleeg kennisbank voor kwaliteitsmodellen |
| `generate_quality_report` | Genereer een compleet kwaliteitsrapport in Markdown |

## Installatie

### Vereisten
- Python 3.11+
- GitHub Personal Access Token (voor issue/PR data)

### Lokale installatie

```bash
git clone git@github.com:Cerios-TechLab/quality-transformation-coach-assistent.git
cd quality-transformation-coach-assistent
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
```

### Configuratie

Kopieer `config.example.yaml` naar `config.yaml` en pas aan:

```yaml
github:
  token_env: GITHUB_TOKEN
  default_org: "Cerios-TechLab"

cicd:
  provider: github_actions

coverage:
  source: local
  format: cobertura

projects:
  - name: "cerios-clinic"
    repo: "/srv/cerios-clinic"
    github: "Steavy/cerios-clinic"
```

### OpenCode integratie

Voeg toe aan `~/.config/opencode/opencode.json` onder `mcp`:

```jsonc
"quality-coach": {
  "type": "local",
  "command": [
    "/opt/quality-coach-mcp/.venv/bin/python",
    "-m",
    "quality_coach_mcp.server"
  ],
  "cwd": "/opt/quality-coach-mcp",
  "enabled": true
}
```

Herstart OpenCode na wijzigingen:
```bash
systemctl restart opencode-serve-4096
```

## Gebruik

### Via OpenCode chat

De tools zijn beschikbaar als MCP-tools in elke OpenCode-sessie. Voorbeelden:

- "Wat is de test coverage van `/srv/cerios-clinic`?"
- "Geef een maturity assessment voor project X met scores `{'test_planning': 3, 'test_design': 2}`"
- "Genereer een quality report voor gateway met een periode van 30 dagen"
- "Wat zegt ISO 25010 over Maintainability?"
- "Check de quality gate pull_request voor Steavy/cerios-clinic"

### Directe Python API

```python
from quality_coach_mcp.tools.code_analysis import CodeAnalysisTools
from quality_coach_mcp.config import load_config

config = load_config()
tools = CodeAnalysisTools(config)

import asyncio
result = asyncio.run(tools.analyze_code_quality("/srv/cerios-clinic"))
print(result)
```

## Kennisbank

De server bevat een embedded kennisbank met:

- **ISO 25010** — 8 kwaliteitskenmerken met sub-characteristics
- **TMMi** — 5 maturity levels met assessment areas
- **Test Patterns** — Herkenbare patronen en anti-patterns
- **Quality Gates** — Standaard criteria voor PR, release, sprint
- **Recommendations** — Context-gevoelige verbeteradviezen
- **CI/CD Readiness** — Maturitychecklist voor CI/CD-processen (102 vragen)
- **AI Readiness** — Maturitychecklist voor AI-toepassing (60 vragen, 5 domeinen)

Kennisbank-bestanden staan in `src/quality_coach_mcp/knowledge/` als YAML.

## Development

### Tests draaien

```bash
pip install -e ".[dev]"
pytest tests/ -v
```

### Projectstructuur

```
src/quality_coach_mcp/
├── server.py              # FastMCP server entry point (16 tools)
├── config.py              # Config loading
├── models/types.py        # Pydantic data models
├── tools/
│   ├── code_analysis.py   # Code kwaliteitsanalyse
│   ├── issue_analysis.py  # Issue & defect analyse
│   ├── cicd_tools.py      # CI/CD pipeline tools
│   └── knowledge_tools.py # Kennis & maturity tools
├── adapters/
│   ├── github_adapter.py  # GitHub API wrapper
│   └── cicd_adapter.py    # CI/CD resultaten parser
└── knowledge/
    ├── iso25010.yaml
    ├── tmmi.yaml
    ├── test_patterns.yaml
    ├── quality_gates.yaml
    ├── recommendations.yaml
    ├── cicd_readiness.yaml
    └── ai_readiness.yaml
```

## Licentie

Onderdeel van [Cerios TechLab](https://github.com/Cerios-TechLab).

TDQS

B3.3/5.0

Scored across 16 tools

Disambiguation4/5

Each tool targets a distinct aspect of quality (pipeline health, test results, code quality, readiness scans, defects), and the descriptions help differentiate them. There is mild overlap between analysis tools like analyze_code_quality and quality_hotspot_detection, but their scopes are clear enough to avoid major misselection.

Naming Consistency3/5

All names are snake_case and descriptive, making the set readable. However, the convention is mixed: some tools use noun phrases (pipeline_health, framework_lookup) while others use verb-led names (analyze_code_quality, detect_test_patterns, generate_quality_report), so the naming pattern is not fully consistent.

Tool Count4/5

At 16 tools, the set is slightly over the ideal 3-15 range but still reasonable given the broad quality transformation domain. Each tool earns its place by covering a distinct part of the assessment, analysis, and reporting workflow.

Completeness4/5

The tool surface covers assessment, analysis, recommendations, and report generation across code quality, testing, CI/CD, and maturity frameworks. A minor gap is the lack of operational follow-up tools such as tracking remediation progress, but the core workflow is well covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues