@dpesch/mantisbt-mcp-server 1.5.9 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.de.md +22 -11
- package/README.md +22 -11
- package/dist/client.js +37 -23
- package/dist/config.js +41 -50
- package/dist/index.js +23 -13
- package/dist/prompts/index.js +112 -0
- package/dist/resources/index.js +29 -0
- package/dist/tools/config.js +44 -40
- package/docs/cookbook.de.md +218 -0
- package/docs/cookbook.md +218 -0
- package/docs/examples.de.md +42 -0
- package/docs/examples.md +42 -0
- package/package.json +4 -3
- package/server.json +2 -2
- package/tests/client.test.ts +70 -0
- package/tests/config.test.ts +47 -37
- package/tests/helpers/mock-server.ts +61 -0
- package/tests/prompts/prompts.test.ts +242 -0
- package/tests/resources/resources.test.ts +192 -0
package/dist/tools/config.js
CHANGED
|
@@ -25,6 +25,49 @@ function resolveCanonicalName(id, name, canonicalMap) {
|
|
|
25
25
|
const canonical = canonicalMap[id];
|
|
26
26
|
return canonical !== undefined && canonical !== name ? canonical : undefined;
|
|
27
27
|
}
|
|
28
|
+
export async function fetchIssueEnums(client) {
|
|
29
|
+
const params = {};
|
|
30
|
+
ISSUE_ENUM_OPTIONS.forEach((opt, i) => {
|
|
31
|
+
params[`option[${i}]`] = opt;
|
|
32
|
+
});
|
|
33
|
+
const result = await client.get('config', params);
|
|
34
|
+
const configs = result.configs ?? [];
|
|
35
|
+
const keyMap = {
|
|
36
|
+
severity_enum_string: 'severity',
|
|
37
|
+
status_enum_string: 'status',
|
|
38
|
+
priority_enum_string: 'priority',
|
|
39
|
+
resolution_enum_string: 'resolution',
|
|
40
|
+
reproducibility_enum_string: 'reproducibility',
|
|
41
|
+
};
|
|
42
|
+
const enums = {};
|
|
43
|
+
for (const { option, value } of configs) {
|
|
44
|
+
const key = keyMap[option];
|
|
45
|
+
if (!key)
|
|
46
|
+
continue;
|
|
47
|
+
const canonicalMap = MANTIS_CANONICAL_ENUM_NAMES[key] ?? {};
|
|
48
|
+
if (typeof value === 'string') {
|
|
49
|
+
enums[key] = parseEnumString(value).map(({ id, name }) => {
|
|
50
|
+
const entry = { id, name };
|
|
51
|
+
const canonical_name = resolveCanonicalName(id, name, canonicalMap);
|
|
52
|
+
if (canonical_name !== undefined)
|
|
53
|
+
entry.canonical_name = canonical_name;
|
|
54
|
+
return entry;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else if (Array.isArray(value)) {
|
|
58
|
+
enums[key] = value.map(({ id, name, label }) => {
|
|
59
|
+
const entry = { id, name };
|
|
60
|
+
if (label && label !== name)
|
|
61
|
+
entry.label = label;
|
|
62
|
+
const canonical_name = resolveCanonicalName(id, name, canonicalMap);
|
|
63
|
+
if (canonical_name !== undefined)
|
|
64
|
+
entry.canonical_name = canonical_name;
|
|
65
|
+
return entry;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return enums;
|
|
70
|
+
}
|
|
28
71
|
export function registerConfigTools(server, client, cache) {
|
|
29
72
|
// ---------------------------------------------------------------------------
|
|
30
73
|
// get_config
|
|
@@ -116,46 +159,7 @@ to use for API calls — regardless of language.`,
|
|
|
116
159
|
},
|
|
117
160
|
}, async () => {
|
|
118
161
|
try {
|
|
119
|
-
const
|
|
120
|
-
ISSUE_ENUM_OPTIONS.forEach((opt, i) => {
|
|
121
|
-
params[`option[${i}]`] = opt;
|
|
122
|
-
});
|
|
123
|
-
const result = await client.get('config', params);
|
|
124
|
-
const configs = result.configs ?? [];
|
|
125
|
-
const keyMap = {
|
|
126
|
-
severity_enum_string: 'severity',
|
|
127
|
-
status_enum_string: 'status',
|
|
128
|
-
priority_enum_string: 'priority',
|
|
129
|
-
resolution_enum_string: 'resolution',
|
|
130
|
-
reproducibility_enum_string: 'reproducibility',
|
|
131
|
-
};
|
|
132
|
-
const enums = {};
|
|
133
|
-
for (const { option, value } of configs) {
|
|
134
|
-
const key = keyMap[option];
|
|
135
|
-
if (!key)
|
|
136
|
-
continue;
|
|
137
|
-
const canonicalMap = MANTIS_CANONICAL_ENUM_NAMES[key] ?? {};
|
|
138
|
-
if (typeof value === 'string') {
|
|
139
|
-
enums[key] = parseEnumString(value).map(({ id, name }) => {
|
|
140
|
-
const entry = { id, name };
|
|
141
|
-
const canonical_name = resolveCanonicalName(id, name, canonicalMap);
|
|
142
|
-
if (canonical_name !== undefined)
|
|
143
|
-
entry.canonical_name = canonical_name;
|
|
144
|
-
return entry;
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
else if (Array.isArray(value)) {
|
|
148
|
-
enums[key] = value.map(({ id, name, label }) => {
|
|
149
|
-
const entry = { id, name };
|
|
150
|
-
if (label && label !== name)
|
|
151
|
-
entry.label = label;
|
|
152
|
-
const canonical_name = resolveCanonicalName(id, name, canonicalMap);
|
|
153
|
-
if (canonical_name !== undefined)
|
|
154
|
-
entry.canonical_name = canonical_name;
|
|
155
|
-
return entry;
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
162
|
+
const enums = await fetchIssueEnums(client);
|
|
159
163
|
return {
|
|
160
164
|
content: [{ type: 'text', text: JSON.stringify(enums, null, 2) }],
|
|
161
165
|
};
|
package/docs/cookbook.de.md
CHANGED
|
@@ -50,6 +50,15 @@ Tool-orientierte Rezepte für den MantisBT MCP Server — jedes Rezept zeigt gen
|
|
|
50
50
|
- [MCP-Server-Version abrufen](#mcp-server-version-abrufen)
|
|
51
51
|
- [MantisBT-Version abrufen](#mantisbt-version-abrufen)
|
|
52
52
|
- [Aktuellen Benutzer abrufen](#aktuellen-benutzer-abrufen)
|
|
53
|
+
- [Ressourcen](#ressourcen)
|
|
54
|
+
- [Eigenes Benutzerprofil lesen](#eigenes-benutzerprofil-lesen)
|
|
55
|
+
- [Alle Projekte lesen](#alle-projekte-lesen)
|
|
56
|
+
- [Issue-Enum-Werte lesen](#issue-enum-werte-lesen)
|
|
57
|
+
- [Prompts](#prompts)
|
|
58
|
+
- [Bug-Report erstellen](#bug-report-erstellen)
|
|
59
|
+
- [Feature-Request erstellen](#feature-request-erstellen)
|
|
60
|
+
- [Issue zusammenfassen](#issue-zusammenfassen)
|
|
61
|
+
- [Projekt-Status-Report](#projekt-status-report)
|
|
53
62
|
- [Destruktive Operationen](#destruktive-operationen)
|
|
54
63
|
- [Issue löschen](#issue-löschen)
|
|
55
64
|
|
|
@@ -1416,6 +1425,215 @@ Gibt das Profil des Benutzers zurück, der dem konfigurierten API-Key zugeordnet
|
|
|
1416
1425
|
|
|
1417
1426
|
---
|
|
1418
1427
|
|
|
1428
|
+
## Ressourcen
|
|
1429
|
+
|
|
1430
|
+
MCP-Ressourcen sind URI-adressierbare, schreibgeschützte Daten. Clients, die Ressourcen unterstützen, können sie direkt per URI abrufen — kein Tool-Aufruf nötig. Hinweis: Ressourcen werden von MCP-Clients weniger breit unterstützt als Tools; bitte die Dokumentation des jeweiligen Clients prüfen.
|
|
1431
|
+
|
|
1432
|
+
> **Hinweis:** Ressourcen sind schreibgeschützt. Schreiboperationen sind über das Ressourcen-Primitiv nicht möglich — für Änderungen das entsprechende Tool verwenden (`create_issue`, `update_issue` usw.).
|
|
1433
|
+
|
|
1434
|
+
### Eigenes Benutzerprofil lesen
|
|
1435
|
+
|
|
1436
|
+
Gibt das Profil des authentifizierten API-Benutzers zurück.
|
|
1437
|
+
|
|
1438
|
+
**Ressource-URI:** `mantis://me`
|
|
1439
|
+
|
|
1440
|
+
**Abrufverhalten:** Immer live — ruft bei jedem Zugriff `GET /users/me` auf.
|
|
1441
|
+
|
|
1442
|
+
**Response:**
|
|
1443
|
+
|
|
1444
|
+
```json
|
|
1445
|
+
{
|
|
1446
|
+
"id": 4,
|
|
1447
|
+
"name": "jsmith",
|
|
1448
|
+
"real_name": "John Smith",
|
|
1449
|
+
"email": "jsmith@example.com",
|
|
1450
|
+
"access_level": { "id": 55, "name": "developer" }
|
|
1451
|
+
}
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1454
|
+
> **Tipp:** Das Tool `get_current_user` liefert dieselben Daten für Clients ohne Ressourcen-Unterstützung.
|
|
1455
|
+
|
|
1456
|
+
---
|
|
1457
|
+
|
|
1458
|
+
### Alle Projekte lesen
|
|
1459
|
+
|
|
1460
|
+
Gibt alle MantisBT-Projekte zurück, auf die der konfigurierte API-Key Zugriff hat.
|
|
1461
|
+
|
|
1462
|
+
**Ressource-URI:** `mantis://projects`
|
|
1463
|
+
|
|
1464
|
+
**Abrufverhalten:** Wird aus dem MetadataCache bedient (Standard-TTL 24 h). Fällt auf einen Live-API-Aufruf zurück, wenn der Cache leer ist. `sync_metadata` aufrufen, um eine Aktualisierung zu erzwingen.
|
|
1465
|
+
|
|
1466
|
+
**Response:**
|
|
1467
|
+
|
|
1468
|
+
```json
|
|
1469
|
+
[
|
|
1470
|
+
{ "id": 3, "name": "Webshop", "status": { "id": 10, "name": "development" }, "enabled": true },
|
|
1471
|
+
{ "id": 5, "name": "Backend API", "status": { "id": 10, "name": "development" }, "enabled": true }
|
|
1472
|
+
]
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
> **Tipp:** Das Tool `list_projects` liefert dieselben Daten für Clients ohne Ressourcen-Unterstützung.
|
|
1476
|
+
|
|
1477
|
+
---
|
|
1478
|
+
|
|
1479
|
+
### Issue-Enum-Werte lesen
|
|
1480
|
+
|
|
1481
|
+
Gibt gültige ID/Name-Paare für alle Issue-Enum-Felder zurück (Severity, Priority, Status, Resolution, Reproducibility). Vor `create_issue` oder `update_issue` verwenden, um kanonische englische Namen nachzuschlagen.
|
|
1482
|
+
|
|
1483
|
+
**Ressource-URI:** `mantis://enums`
|
|
1484
|
+
|
|
1485
|
+
**Abrufverhalten:** Immer live — ruft bei jedem Zugriff den MantisBT-Config-Endpoint auf.
|
|
1486
|
+
|
|
1487
|
+
**Response:**
|
|
1488
|
+
|
|
1489
|
+
```json
|
|
1490
|
+
{
|
|
1491
|
+
"priorities": [
|
|
1492
|
+
{ "id": 10, "name": "none" },
|
|
1493
|
+
{ "id": 20, "name": "low" },
|
|
1494
|
+
{ "id": 30, "name": "normal" },
|
|
1495
|
+
{ "id": 40, "name": "high" },
|
|
1496
|
+
{ "id": 50, "name": "urgent" },
|
|
1497
|
+
{ "id": 60, "name": "immediate" }
|
|
1498
|
+
],
|
|
1499
|
+
"severities": [
|
|
1500
|
+
{ "id": 10, "name": "feature" },
|
|
1501
|
+
{ "id": 20, "name": "trivial" },
|
|
1502
|
+
{ "id": 50, "name": "major" },
|
|
1503
|
+
{ "id": 60, "name": "crash" }
|
|
1504
|
+
],
|
|
1505
|
+
"statuses": [
|
|
1506
|
+
{ "id": 10, "name": "new" },
|
|
1507
|
+
{ "id": 50, "name": "assigned" },
|
|
1508
|
+
{ "id": 80, "name": "resolved" },
|
|
1509
|
+
{ "id": 90, "name": "closed" }
|
|
1510
|
+
],
|
|
1511
|
+
"resolutions": [
|
|
1512
|
+
{ "id": 10, "name": "open" },
|
|
1513
|
+
{ "id": 20, "name": "fixed" },
|
|
1514
|
+
{ "id": 60, "name": "duplicate" }
|
|
1515
|
+
]
|
|
1516
|
+
}
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1519
|
+
> **Tipp:** Das Tool `get_issue_enums` liefert dieselben Daten für Clients ohne Ressourcen-Unterstützung.
|
|
1520
|
+
|
|
1521
|
+
---
|
|
1522
|
+
|
|
1523
|
+
## Prompts
|
|
1524
|
+
|
|
1525
|
+
MCP-Prompt-Templates starten eine geführte Unterhaltung — der Client sendet die Prompt-Argumente und der Server liefert eine vorgefertigte Nachricht, die den LLM anweist, die passenden Tools aufzurufen. Beispiele in natürlicher Sprache sind in [examples.de.md](examples.de.md) zu finden.
|
|
1526
|
+
|
|
1527
|
+
### Bug-Report erstellen
|
|
1528
|
+
|
|
1529
|
+
Sammelt strukturierte Bug-Daten und ruft `create_issue` auf.
|
|
1530
|
+
|
|
1531
|
+
**Prompt:** `create-bug-report`
|
|
1532
|
+
|
|
1533
|
+
**Pflichtargumente:**
|
|
1534
|
+
- `project_id` — numerische Projekt-ID
|
|
1535
|
+
- `category` — Kategoriename
|
|
1536
|
+
- `summary` — Issue-Titel
|
|
1537
|
+
- `description` — detaillierte Fehlerbeschreibung
|
|
1538
|
+
|
|
1539
|
+
**Optionale Argumente:**
|
|
1540
|
+
- `steps_to_reproduce` — Schritte zur Reproduktion
|
|
1541
|
+
- `expected` — erwartetes Verhalten
|
|
1542
|
+
- `actual` — tatsächliches (beobachtetes) Verhalten
|
|
1543
|
+
- `environment` — Umgebungsangaben (Betriebssystem, Browser, Version usw.)
|
|
1544
|
+
|
|
1545
|
+
**Ablauf:** Der Prompt liefert eine Nachricht, die den LLM anweist, zunächst `get_issue_enums` aufzurufen (um gültige Schweregrad- und Prioritätswerte zu ermitteln) und anschließend `create_issue` mit den übergebenen Daten auszuführen.
|
|
1546
|
+
|
|
1547
|
+
**Beispielaufruf:**
|
|
1548
|
+
|
|
1549
|
+
```json
|
|
1550
|
+
{
|
|
1551
|
+
"project_id": 3,
|
|
1552
|
+
"category": "UI",
|
|
1553
|
+
"summary": "Login-Button reagiert auf Mobile Safari nicht",
|
|
1554
|
+
"description": "Ein Tipp auf den Login-Button auf einem iPhone 14 / Safari 17 bewirkt nichts.",
|
|
1555
|
+
"steps_to_reproduce": "1. Login-Seite auf iPhone 14 öffnen\n2. Auf 'Anmelden' tippen\n3. Nichts passiert",
|
|
1556
|
+
"expected": "Benutzer wird angemeldet und zum Dashboard weitergeleitet",
|
|
1557
|
+
"actual": "Die Seite bleibt auf dem Login-Formular, keine Fehlermeldung",
|
|
1558
|
+
"environment": "iPhone 14, iOS 17, Safari 17"
|
|
1559
|
+
}
|
|
1560
|
+
```
|
|
1561
|
+
|
|
1562
|
+
---
|
|
1563
|
+
|
|
1564
|
+
### Feature-Request erstellen
|
|
1565
|
+
|
|
1566
|
+
Sammelt Feature-Details und ruft `create_issue` auf.
|
|
1567
|
+
|
|
1568
|
+
**Prompt:** `create-feature-request`
|
|
1569
|
+
|
|
1570
|
+
**Pflichtargumente:**
|
|
1571
|
+
- `project_id` — numerische Projekt-ID
|
|
1572
|
+
- `category` — Kategoriename
|
|
1573
|
+
- `summary` — Feature-Titel
|
|
1574
|
+
- `description` — detaillierte Beschreibung des Features
|
|
1575
|
+
|
|
1576
|
+
**Optionale Argumente:**
|
|
1577
|
+
- `use_case` — konkreter Anwendungsfall oder Motivation für das Feature
|
|
1578
|
+
|
|
1579
|
+
**Ablauf:** Der Prompt liefert eine Nachricht, die den LLM anweist, `create_issue` mit dem Schweregrad `feature` aufzurufen.
|
|
1580
|
+
|
|
1581
|
+
**Beispielaufruf:**
|
|
1582
|
+
|
|
1583
|
+
```json
|
|
1584
|
+
{
|
|
1585
|
+
"project_id": 5,
|
|
1586
|
+
"category": "UX",
|
|
1587
|
+
"summary": "Dunkelmodus für Benutzereinstellungen",
|
|
1588
|
+
"description": "Einen Dunkelmodus-Schalter auf der Seite mit den Benutzereinstellungen hinzufügen.",
|
|
1589
|
+
"use_case": "Benutzer, die in schlecht beleuchteten Umgebungen arbeiten, berichten über Augenbelastung durch die aktuelle helle Benutzeroberfläche."
|
|
1590
|
+
}
|
|
1591
|
+
```
|
|
1592
|
+
|
|
1593
|
+
---
|
|
1594
|
+
|
|
1595
|
+
### Issue zusammenfassen
|
|
1596
|
+
|
|
1597
|
+
Ruft ein einzelnes Issue ab und liefert eine prägnante Zusammenfassung.
|
|
1598
|
+
|
|
1599
|
+
**Prompt:** `summarize-issue`
|
|
1600
|
+
|
|
1601
|
+
**Pflichtargumente:**
|
|
1602
|
+
- `issue_id` — numerische Issue-ID
|
|
1603
|
+
|
|
1604
|
+
**Ablauf:** Der Prompt liefert eine Nachricht, die den LLM anweist, `get_issue` aufzurufen und das Ergebnis zusammenzufassen — inklusive Status, Priorität, aktueller Notizen und empfohlener nächster Schritte.
|
|
1605
|
+
|
|
1606
|
+
**Beispielaufruf:**
|
|
1607
|
+
|
|
1608
|
+
```json
|
|
1609
|
+
{
|
|
1610
|
+
"issue_id": 1042
|
|
1611
|
+
}
|
|
1612
|
+
```
|
|
1613
|
+
|
|
1614
|
+
---
|
|
1615
|
+
|
|
1616
|
+
### Projekt-Status-Report
|
|
1617
|
+
|
|
1618
|
+
Listet alle Issues eines Projekts auf und erstellt einen Status-Report nach Schweregrad.
|
|
1619
|
+
|
|
1620
|
+
**Prompt:** `project-status`
|
|
1621
|
+
|
|
1622
|
+
**Pflichtargumente:**
|
|
1623
|
+
- `project_id` — numerische Projekt-ID
|
|
1624
|
+
|
|
1625
|
+
**Ablauf:** Der Prompt liefert eine Nachricht, die den LLM anweist, `list_issues` für das Projekt aufzurufen und einen strukturierten Report zu erstellen: Anzahl offener Issues, Aufschlüsselung nach Schweregrad und eine Liste der kritischsten Einträge.
|
|
1626
|
+
|
|
1627
|
+
**Beispielaufruf:**
|
|
1628
|
+
|
|
1629
|
+
```json
|
|
1630
|
+
{
|
|
1631
|
+
"project_id": 3
|
|
1632
|
+
}
|
|
1633
|
+
```
|
|
1634
|
+
|
|
1635
|
+
---
|
|
1636
|
+
|
|
1419
1637
|
## Destruktive Operationen
|
|
1420
1638
|
|
|
1421
1639
|
### Issue löschen
|
package/docs/cookbook.md
CHANGED
|
@@ -50,6 +50,15 @@ Tool-oriented recipes for the MantisBT MCP server — each recipe shows exactly
|
|
|
50
50
|
- [Get MCP server version](#get-mcp-server-version)
|
|
51
51
|
- [Get MantisBT version](#get-mantis-version)
|
|
52
52
|
- [Get the current user](#get-the-current-user)
|
|
53
|
+
- [Resources](#resources)
|
|
54
|
+
- [Read the current user profile](#read-the-current-user-profile)
|
|
55
|
+
- [Read all projects](#read-all-projects)
|
|
56
|
+
- [Read issue enum values](#read-issue-enum-values)
|
|
57
|
+
- [Prompts](#prompts)
|
|
58
|
+
- [Create a bug report](#create-a-bug-report)
|
|
59
|
+
- [Create a feature request](#create-a-feature-request)
|
|
60
|
+
- [Summarize an issue](#summarize-an-issue)
|
|
61
|
+
- [Project status report](#project-status-report)
|
|
53
62
|
- [Destructive Operations](#destructive-operations)
|
|
54
63
|
- [Delete an issue](#delete-an-issue)
|
|
55
64
|
|
|
@@ -1416,6 +1425,215 @@ Returns the profile of the user associated with the configured API key. Useful t
|
|
|
1416
1425
|
|
|
1417
1426
|
---
|
|
1418
1427
|
|
|
1428
|
+
## Resources
|
|
1429
|
+
|
|
1430
|
+
MCP Resources are URI-addressable, read-only data. Clients that support Resources can fetch them directly by URI — no tool call required. Note that Resource support is less widely implemented in MCP clients than Tools; check your client's documentation.
|
|
1431
|
+
|
|
1432
|
+
> **Note:** Resources are read-only. Writing to them is not possible via the Resource primitive — use the corresponding tool (`create_issue`, `update_issue`, etc.) for write operations.
|
|
1433
|
+
|
|
1434
|
+
### Read the current user profile
|
|
1435
|
+
|
|
1436
|
+
Returns the profile of the authenticated API user.
|
|
1437
|
+
|
|
1438
|
+
**Resource URI:** `mantis://me`
|
|
1439
|
+
|
|
1440
|
+
**Fetch behaviour:** Always live — calls `GET /users/me` on every access.
|
|
1441
|
+
|
|
1442
|
+
**Response:**
|
|
1443
|
+
|
|
1444
|
+
```json
|
|
1445
|
+
{
|
|
1446
|
+
"id": 4,
|
|
1447
|
+
"name": "jsmith",
|
|
1448
|
+
"real_name": "John Smith",
|
|
1449
|
+
"email": "jsmith@example.com",
|
|
1450
|
+
"access_level": { "id": 55, "name": "developer" }
|
|
1451
|
+
}
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1454
|
+
> **Tip:** The `get_current_user` tool provides the same data for clients that do not support Resources.
|
|
1455
|
+
|
|
1456
|
+
---
|
|
1457
|
+
|
|
1458
|
+
### Read all projects
|
|
1459
|
+
|
|
1460
|
+
Returns all MantisBT projects accessible with the configured API key.
|
|
1461
|
+
|
|
1462
|
+
**Resource URI:** `mantis://projects`
|
|
1463
|
+
|
|
1464
|
+
**Fetch behaviour:** Served from the MetadataCache (default TTL 24 h). Falls back to a live API call when the cache is empty. Run `sync_metadata` to force a refresh.
|
|
1465
|
+
|
|
1466
|
+
**Response:**
|
|
1467
|
+
|
|
1468
|
+
```json
|
|
1469
|
+
[
|
|
1470
|
+
{ "id": 3, "name": "Webshop", "status": { "id": 10, "name": "development" }, "enabled": true },
|
|
1471
|
+
{ "id": 5, "name": "Backend API", "status": { "id": 10, "name": "development" }, "enabled": true }
|
|
1472
|
+
]
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
> **Tip:** The `list_projects` tool provides the same data for clients that do not support Resources.
|
|
1476
|
+
|
|
1477
|
+
---
|
|
1478
|
+
|
|
1479
|
+
### Read issue enum values
|
|
1480
|
+
|
|
1481
|
+
Returns valid ID/name pairs for all issue enum fields (severity, priority, status, resolution, reproducibility). Use this to look up canonical English names before calling `create_issue` or `update_issue`.
|
|
1482
|
+
|
|
1483
|
+
**Resource URI:** `mantis://enums`
|
|
1484
|
+
|
|
1485
|
+
**Fetch behaviour:** Always live — calls the MantisBT config endpoint on every access.
|
|
1486
|
+
|
|
1487
|
+
**Response:**
|
|
1488
|
+
|
|
1489
|
+
```json
|
|
1490
|
+
{
|
|
1491
|
+
"priorities": [
|
|
1492
|
+
{ "id": 10, "name": "none" },
|
|
1493
|
+
{ "id": 20, "name": "low" },
|
|
1494
|
+
{ "id": 30, "name": "normal" },
|
|
1495
|
+
{ "id": 40, "name": "high" },
|
|
1496
|
+
{ "id": 50, "name": "urgent" },
|
|
1497
|
+
{ "id": 60, "name": "immediate" }
|
|
1498
|
+
],
|
|
1499
|
+
"severities": [
|
|
1500
|
+
{ "id": 10, "name": "feature" },
|
|
1501
|
+
{ "id": 20, "name": "trivial" },
|
|
1502
|
+
{ "id": 50, "name": "major" },
|
|
1503
|
+
{ "id": 60, "name": "crash" }
|
|
1504
|
+
],
|
|
1505
|
+
"statuses": [
|
|
1506
|
+
{ "id": 10, "name": "new" },
|
|
1507
|
+
{ "id": 50, "name": "assigned" },
|
|
1508
|
+
{ "id": 80, "name": "resolved" },
|
|
1509
|
+
{ "id": 90, "name": "closed" }
|
|
1510
|
+
],
|
|
1511
|
+
"resolutions": [
|
|
1512
|
+
{ "id": 10, "name": "open" },
|
|
1513
|
+
{ "id": 20, "name": "fixed" },
|
|
1514
|
+
{ "id": 60, "name": "duplicate" }
|
|
1515
|
+
]
|
|
1516
|
+
}
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1519
|
+
> **Tip:** The `get_issue_enums` tool provides the same data for clients that do not support Resources.
|
|
1520
|
+
|
|
1521
|
+
---
|
|
1522
|
+
|
|
1523
|
+
## Prompts
|
|
1524
|
+
|
|
1525
|
+
MCP prompt templates initiate a guided conversation — the client sends the prompt arguments and the server returns a pre-filled message that instructs the LLM to call the appropriate tools. For natural language equivalents, see [examples.md](examples.md).
|
|
1526
|
+
|
|
1527
|
+
### Create a bug report
|
|
1528
|
+
|
|
1529
|
+
Collects structured bug data and calls `create_issue`.
|
|
1530
|
+
|
|
1531
|
+
**Prompt:** `create-bug-report`
|
|
1532
|
+
|
|
1533
|
+
**Required arguments:**
|
|
1534
|
+
- `project_id` — numeric project ID
|
|
1535
|
+
- `category` — category name string
|
|
1536
|
+
- `summary` — issue title
|
|
1537
|
+
- `description` — detailed description of the bug
|
|
1538
|
+
|
|
1539
|
+
**Optional arguments:**
|
|
1540
|
+
- `steps_to_reproduce` — step-by-step reproduction instructions
|
|
1541
|
+
- `expected` — expected behavior
|
|
1542
|
+
- `actual` — actual (observed) behavior
|
|
1543
|
+
- `environment` — environment details (OS, browser, version, etc.)
|
|
1544
|
+
|
|
1545
|
+
**What happens:** The prompt returns a message that instructs the LLM to call `get_issue_enums` (to resolve valid severity/priority values) and then `create_issue` with the provided data.
|
|
1546
|
+
|
|
1547
|
+
**Example call:**
|
|
1548
|
+
|
|
1549
|
+
```json
|
|
1550
|
+
{
|
|
1551
|
+
"project_id": 3,
|
|
1552
|
+
"category": "UI",
|
|
1553
|
+
"summary": "Login button unresponsive on mobile Safari",
|
|
1554
|
+
"description": "Tapping the login button on iPhone 14 / Safari 17 does nothing.",
|
|
1555
|
+
"steps_to_reproduce": "1. Open login page on iPhone 14\n2. Tap 'Login'\n3. Nothing happens",
|
|
1556
|
+
"expected": "User is logged in and redirected to dashboard",
|
|
1557
|
+
"actual": "Page stays on login form, no error message",
|
|
1558
|
+
"environment": "iPhone 14, iOS 17, Safari 17"
|
|
1559
|
+
}
|
|
1560
|
+
```
|
|
1561
|
+
|
|
1562
|
+
---
|
|
1563
|
+
|
|
1564
|
+
### Create a feature request
|
|
1565
|
+
|
|
1566
|
+
Collects feature details and calls `create_issue`.
|
|
1567
|
+
|
|
1568
|
+
**Prompt:** `create-feature-request`
|
|
1569
|
+
|
|
1570
|
+
**Required arguments:**
|
|
1571
|
+
- `project_id` — numeric project ID
|
|
1572
|
+
- `category` — category name string
|
|
1573
|
+
- `summary` — feature title
|
|
1574
|
+
- `description` — detailed description of the feature
|
|
1575
|
+
|
|
1576
|
+
**Optional arguments:**
|
|
1577
|
+
- `use_case` — concrete use case or motivation for the feature
|
|
1578
|
+
|
|
1579
|
+
**What happens:** The prompt returns a message that instructs the LLM to call `create_issue` with severity `feature`.
|
|
1580
|
+
|
|
1581
|
+
**Example call:**
|
|
1582
|
+
|
|
1583
|
+
```json
|
|
1584
|
+
{
|
|
1585
|
+
"project_id": 5,
|
|
1586
|
+
"category": "UX",
|
|
1587
|
+
"summary": "Dark mode for user settings",
|
|
1588
|
+
"description": "Add a dark mode toggle to the user settings page.",
|
|
1589
|
+
"use_case": "Users working in low-light environments report eye strain with the current bright UI."
|
|
1590
|
+
}
|
|
1591
|
+
```
|
|
1592
|
+
|
|
1593
|
+
---
|
|
1594
|
+
|
|
1595
|
+
### Summarize an issue
|
|
1596
|
+
|
|
1597
|
+
Fetches a single issue and returns a concise summary.
|
|
1598
|
+
|
|
1599
|
+
**Prompt:** `summarize-issue`
|
|
1600
|
+
|
|
1601
|
+
**Required arguments:**
|
|
1602
|
+
- `issue_id` — numeric issue ID
|
|
1603
|
+
|
|
1604
|
+
**What happens:** The prompt returns a message that instructs the LLM to call `get_issue` and summarize the result — including status, priority, recent notes, and suggested next steps.
|
|
1605
|
+
|
|
1606
|
+
**Example call:**
|
|
1607
|
+
|
|
1608
|
+
```json
|
|
1609
|
+
{
|
|
1610
|
+
"issue_id": 1042
|
|
1611
|
+
}
|
|
1612
|
+
```
|
|
1613
|
+
|
|
1614
|
+
---
|
|
1615
|
+
|
|
1616
|
+
### Project status report
|
|
1617
|
+
|
|
1618
|
+
Lists all issues for a project and generates a status report grouped by severity.
|
|
1619
|
+
|
|
1620
|
+
**Prompt:** `project-status`
|
|
1621
|
+
|
|
1622
|
+
**Required arguments:**
|
|
1623
|
+
- `project_id` — numeric project ID
|
|
1624
|
+
|
|
1625
|
+
**What happens:** The prompt returns a message that instructs the LLM to call `list_issues` for the project and produce a structured report: open issue count, breakdown by severity, and a list of the most critical items.
|
|
1626
|
+
|
|
1627
|
+
**Example call:**
|
|
1628
|
+
|
|
1629
|
+
```json
|
|
1630
|
+
{
|
|
1631
|
+
"project_id": 3
|
|
1632
|
+
}
|
|
1633
|
+
```
|
|
1634
|
+
|
|
1635
|
+
---
|
|
1636
|
+
|
|
1419
1637
|
## Destructive Operations
|
|
1420
1638
|
|
|
1421
1639
|
### Delete an issue
|
package/docs/examples.de.md
CHANGED
|
@@ -109,6 +109,24 @@ Praktische Beispiele für die Interaktion mit MantisBT über Claude, sobald der
|
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
112
|
+
## Geführte Prompt-Workflows
|
|
113
|
+
|
|
114
|
+
Der Server enthält Prompt-Templates, die Claude durch strukturierte Arbeitsabläufe führen — Tool-Namen oder Parameter müssen nicht manuell angegeben werden. Die Prompts werden aus einem MCP-fähigen Client beim Namen aufgerufen.
|
|
115
|
+
|
|
116
|
+
### Issues über Prompt-Templates anlegen
|
|
117
|
+
|
|
118
|
+
> »Verwende den Prompt `create-bug-report` für das Safari-Login-Issue: Projekt 3, Kategorie UI, Titel 'Login-Button reagiert auf Mobile Safari nicht', Beschreibung 'Ein Tipp auf den Login-Button auf iPhone 14 / Safari 17 bewirkt nichts', Schritte: Login-Seite öffnen → Anmelden antippen → nichts passiert, Erwartet: Weiterleitung zum Dashboard, Tatsächlich: Formular bleibt geöffnet.«
|
|
119
|
+
|
|
120
|
+
> »Nutze `create-feature-request` für Projekt 5, Kategorie UX: Dunkelmodus-Schalter auf der Einstellungsseite hinzufügen.«
|
|
121
|
+
|
|
122
|
+
### Zusammenfassen und Berichten
|
|
123
|
+
|
|
124
|
+
> »Führe den Prompt `summarize-issue` für Issue #1042 aus.«
|
|
125
|
+
|
|
126
|
+
> »Verwende den Prompt `project-status` für Projekt 3, um einen Überblick über offene Issues nach Schweregrad zu erhalten.«
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
112
130
|
## Semantische Suche
|
|
113
131
|
|
|
114
132
|
Die semantische Suche versteht die *Bedeutung* deiner Frage — nicht nur einzelne Schlüsselwörter. Sie findet konzeptionell verwandte Issues, auch wenn die genaue Formulierung abweicht. Aktivierung mit `MANTIS_SEARCH_ENABLED=true`.
|
|
@@ -156,3 +174,27 @@ Die semantische Suche versteht die *Bedeutung* deiner Frage — nicht nur einzel
|
|
|
156
174
|
> »Gibt es bekannte Fallstricke beim Einrichten der Deployment-Pipeline?«
|
|
157
175
|
|
|
158
176
|
> »Welche Issues beschreiben Probleme, die beim ersten Einrichten der Entwicklungsumgebung auftreten?«
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Ressourcen
|
|
181
|
+
|
|
182
|
+
MCP-Ressourcen sind URI-adressierbare, schreibgeschützte Daten, die Clients direkt per URI abrufen können — kein Tool-Aufruf nötig. Die Ressourcen-Unterstützung variiert je nach Client; wenn der verwendete Client keine Ressourcen unterstützt, das entsprechende Tool als Alternative verwenden.
|
|
183
|
+
|
|
184
|
+
### Server-Zustand über Ressourcen abrufen
|
|
185
|
+
|
|
186
|
+
> »Lese `mantis://me`, um zu sehen, welches Konto der MCP-Server verwendet.«
|
|
187
|
+
|
|
188
|
+
> »Rufe `mantis://projects` ab, um die Liste der verfügbaren Projekte zu erhalten.«
|
|
189
|
+
|
|
190
|
+
> »Lade `mantis://enums`, um die gültigen Severity- und Priority-Werte einzusehen, bevor ein Issue erstellt wird.«
|
|
191
|
+
|
|
192
|
+
### Alternative Tools für Clients ohne Ressourcen-Unterstützung
|
|
193
|
+
|
|
194
|
+
Wenn der Client keine Ressourcen unterstützt, Claude einfach das entsprechende Tool verwenden lassen:
|
|
195
|
+
|
|
196
|
+
> »Zeig mir mein Benutzerprofil.« *(verwendet `get_current_user`)*
|
|
197
|
+
|
|
198
|
+
> »Welche Projekte sind verfügbar?« *(verwendet `list_projects`)*
|
|
199
|
+
|
|
200
|
+
> »Welche Prioritätswerte sind gültig?« *(verwendet `get_issue_enums`)*
|
package/docs/examples.md
CHANGED
|
@@ -109,6 +109,24 @@ Practical examples of how to interact with MantisBT through Claude once the MCP
|
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
112
|
+
## Guided Prompt Workflows
|
|
113
|
+
|
|
114
|
+
The server ships with prompt templates that guide Claude through structured workflows — no need to specify tool names or parameters manually. Invoke them by name from a MCP-capable client.
|
|
115
|
+
|
|
116
|
+
### Creating issues from a prompt template
|
|
117
|
+
|
|
118
|
+
> "Use the `create-bug-report` prompt to file the Safari login issue: project 3, category UI, summary 'Login button unresponsive on mobile Safari', description 'Tapping login on iPhone 14 / Safari 17 does nothing', steps: open login page → tap Login → nothing happens, expected: redirect to dashboard, actual: form stays open."
|
|
119
|
+
|
|
120
|
+
> "Use `create-feature-request` for project 5, category UX: add a dark mode toggle to the settings page."
|
|
121
|
+
|
|
122
|
+
### Summarizing and reporting
|
|
123
|
+
|
|
124
|
+
> "Run the `summarize-issue` prompt for issue #1042."
|
|
125
|
+
|
|
126
|
+
> "Use the `project-status` prompt for project 3 to get an overview of open issues grouped by severity."
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
112
130
|
## Semantic Search
|
|
113
131
|
|
|
114
132
|
Semantic search understands the *meaning* of your question — not just keywords. It finds conceptually related issues even when the exact wording differs. Enable it with `MANTIS_SEARCH_ENABLED=true`.
|
|
@@ -156,3 +174,27 @@ Semantic search understands the *meaning* of your question — not just keywords
|
|
|
156
174
|
> "Are there any known pitfalls when setting up the deployment pipeline?"
|
|
157
175
|
|
|
158
176
|
> "Which issues describe problems that occur during initial environment setup?"
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Resources
|
|
181
|
+
|
|
182
|
+
MCP Resources are URI-addressable, read-only data that clients can fetch directly by URI — no tool invocation required. Resource support varies by client; if your client does not support Resources, use the equivalent tool instead.
|
|
183
|
+
|
|
184
|
+
### Reading server state via resources
|
|
185
|
+
|
|
186
|
+
> "Read `mantis://me` to see which account the MCP server is using."
|
|
187
|
+
|
|
188
|
+
> "Fetch `mantis://projects` to get the list of available projects."
|
|
189
|
+
|
|
190
|
+
> "Load `mantis://enums` to see valid severity and priority values before creating an issue."
|
|
191
|
+
|
|
192
|
+
### Equivalent tool fallbacks
|
|
193
|
+
|
|
194
|
+
If your client does not support Resources, ask Claude to use the corresponding tool:
|
|
195
|
+
|
|
196
|
+
> "Show me my user profile." *(uses `get_current_user`)*
|
|
197
|
+
|
|
198
|
+
> "Which projects are available?" *(uses `list_projects`)*
|
|
199
|
+
|
|
200
|
+
> "What are the valid priority values?" *(uses `get_issue_enums`)*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpesch/mantisbt-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"mcpName": "io.github.dpesch/mantisbt-mcp-server",
|
|
5
5
|
"description": "MCP server for MantisBT REST API – read and manage bug tracker issues",
|
|
6
6
|
"author": "Dominik Pesch",
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://
|
|
14
|
+
"url": "https://github.com/dpesch/mantisbt-mcp-server",
|
|
15
|
+
"_note": "GitHub mirror for ecosystem compatibility only — canonical source: https://codeberg.org/dpesch/mantisbt-mcp-server"
|
|
15
16
|
},
|
|
16
|
-
"keywords": ["mcp", "mantisbt", "bugtracker", "mantis", "model-context-protocol"],
|
|
17
|
+
"keywords": ["mcp", "mcp-server", "mantisbt", "bugtracker", "mantis", "model-context-protocol"],
|
|
17
18
|
"main": "dist/index.js",
|
|
18
19
|
"bin": {
|
|
19
20
|
"mantisbt-mcp-server": "dist/index.js"
|