- Updated the dashboard layout schema to include new widgets: DashboardGreeting, QuickWeightToday, BodyStatStrip, StatusPills, ProfileGoalsProgress, TrendKcalWeight, NutritionActivitySummary, RecoverySleepRest, and TrainingTypeDistribution. - Improved widget configuration validation to support new features, including chart days for trend and distribution widgets. - Refactored the default lab layout to align with the updated widget catalog and ensure proper default activation. - Bumped app_dashboard version to 1.6.0 to reflect the addition of new widgets and configuration enhancements.
68 lines
2.6 KiB
Markdown
68 lines
2.6 KiB
Markdown
# Gitea MCP-Server für Cursor
|
||
|
||
Damit der Agent **strukturierte Tools** nutzen kann (`gitea_list_issues`, `gitea_close_issue`, …), registrierst du diesen MCP-S **lokal** in Cursor.
|
||
|
||
## 1. Abhängigkeit
|
||
|
||
```powershell
|
||
pip install -r scripts/gitea/requirements-mcp.txt
|
||
```
|
||
|
||
Oder: `pip install "mcp>=1.2.0"`
|
||
|
||
## 2. Secrets
|
||
|
||
Wie beim CLI: **`GITEA_*` in der Repo-Root `.env`** (wird von `gitea_lib` geladen), **oder** dieselben Variablen in der MCP-`env` (siehe unten).
|
||
|
||
**Niemals** Tokens in Git committen.
|
||
|
||
## 3. Cursor MCP konfigurieren
|
||
|
||
**Variante A – UI:** Einstellungen → **MCP** / Tools → Server hinzufügen → Typ „Command“:
|
||
|
||
- **Command:** `python` (oder voller Pfad zu `python.exe`)
|
||
- **Args:** vollständiger Pfad zu `mcp_server_gitea.py`, z. B.
|
||
`C:\Dev\mitai-jinkendo\scripts\gitea\mcp_server_gitea.py`
|
||
- **Working directory (optional):** `C:\Dev\mitai-jinkendo\scripts\gitea`
|
||
- **Env:** nur nötig, wenn du **keine** `.env` im Repo nutzt:
|
||
|
||
```text
|
||
GITEA_BASE_URL=http://192.168.2.144:3000
|
||
GITEA_OWNER=Lars
|
||
GITEA_REPO=mitai-jinkendo
|
||
GITEA_TOKEN=…
|
||
```
|
||
|
||
**Variante B – JSON:** Datei `~/.cursor/mcp.json` (Benutzer) oder projektbezogen laut Cursor-Doku. Beispielinhalt siehe **`.cursor/mcp.json.example`** im Repo (Platzhalter, ohne echtes Token).
|
||
|
||
Cursor nach Änderung **vollständig neu starten**.
|
||
|
||
## 4. Netzwerk
|
||
|
||
Die Gitea-URL muss von deinem Rechner erreichbar sein (z. B. `192.168.2.144:3000` im LAN).
|
||
|
||
## 5. Repo-Zugriff
|
||
|
||
- **API:** Tool `gitea_get_repo_file` (Dateiinhalt / Metadaten).
|
||
- **Git (lokal):** unverändert `git pull` / Agent liest Workspace-Dateien – dafür brauchst du kein MCP.
|
||
|
||
## Bereitgestellte Tools (Kurzüberblick)
|
||
|
||
| Tool | Zweck |
|
||
|------|--------|
|
||
| `gitea_list_issues` | Issues listen, optional alle Seiten |
|
||
| `gitea_get_issue` | Ein Issue mit Body |
|
||
| `gitea_comment_issue` | Kommentar |
|
||
| `gitea_patch_issue` | Titel und/oder **Beschreibung** des Issues ändern (PATCH) |
|
||
| `gitea_create_issue` | Neu anlegen |
|
||
| `gitea_close_issue` / `gitea_reopen_issue` | Status |
|
||
| `gitea_get_repo_file` | Datei remote via API |
|
||
|
||
**MCP vs. CLI:** Sehr lange Issue-Bodies oder Vorlagen aus Datei → `python scripts/gitea/gitea_api.py issues edit … --body-file` (siehe README). Kurze Updates direkt im Agent → `gitea_patch_issue`.
|
||
|
||
## Issue-Triage durch den Agent
|
||
|
||
Sinnvoller Ablauf: Issues listen → je Issue **Code/Commits prüfen** → bei eindeutig erledigt: kurzer Kommentar + **close**; bei teilweise: Kommentar mit Checkboxen; bei unklar: nur Kommentar, **nicht** schließen.
|
||
|
||
Autonom alles schließen ist fehleranfällig; klare Regeln oder manuelle Freigabe für `close` empfohlen.
|