@mtaap/mcp 0.2.1 → 0.2.2
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/dist/cli.js +132 -38
- package/dist/cli.js.map +1 -1
- package/dist/index.js +93 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -28,16 +28,19 @@ var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
|
28
28
|
var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
29
29
|
|
|
30
30
|
// src/version.ts
|
|
31
|
-
var VERSION = "0.2.
|
|
31
|
+
var VERSION = "0.2.2";
|
|
32
|
+
|
|
33
|
+
// src/index.ts
|
|
34
|
+
var import_zod3 = require("zod");
|
|
32
35
|
|
|
33
36
|
// ../../packages/core/dist/constants/enums.js
|
|
34
37
|
var TaskState;
|
|
35
|
-
(function(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
(function(TaskState2) {
|
|
39
|
+
TaskState2["BACKLOG"] = "BACKLOG";
|
|
40
|
+
TaskState2["READY"] = "READY";
|
|
41
|
+
TaskState2["IN_PROGRESS"] = "IN_PROGRESS";
|
|
42
|
+
TaskState2["REVIEW"] = "REVIEW";
|
|
43
|
+
TaskState2["DONE"] = "DONE";
|
|
41
44
|
})(TaskState || (TaskState = {}));
|
|
42
45
|
var UserRole;
|
|
43
46
|
(function(UserRole2) {
|
|
@@ -401,42 +404,43 @@ var ListTasksInputSchema = import_zod2.z.object({
|
|
|
401
404
|
state: import_zod2.z.nativeEnum(TaskState).optional(),
|
|
402
405
|
assigneeId: import_zod2.z.string().optional()
|
|
403
406
|
});
|
|
407
|
+
var cuidOrPrefixedId = import_zod2.z.string().regex(/^([a-z0-9]+|[a-z]+_[a-zA-Z0-9]+)$/);
|
|
404
408
|
var GetTaskInputSchema = import_zod2.z.object({
|
|
405
|
-
taskId:
|
|
409
|
+
taskId: cuidOrPrefixedId
|
|
406
410
|
});
|
|
407
411
|
var AssignTaskInputSchema = import_zod2.z.object({
|
|
408
|
-
projectId:
|
|
409
|
-
taskId:
|
|
412
|
+
projectId: cuidOrPrefixedId,
|
|
413
|
+
taskId: cuidOrPrefixedId,
|
|
410
414
|
expectedState: import_zod2.z.nativeEnum(TaskState).default(TaskState.READY)
|
|
411
415
|
});
|
|
412
416
|
var UpdateProgressInputSchema = import_zod2.z.object({
|
|
413
|
-
taskId:
|
|
417
|
+
taskId: cuidOrPrefixedId,
|
|
414
418
|
statusMessage: import_zod2.z.string().max(1e3).optional(),
|
|
415
419
|
completedCheckpointIds: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
416
420
|
currentCheckpointIndex: import_zod2.z.number().int().optional()
|
|
417
421
|
});
|
|
418
422
|
var CompleteTaskInputSchema = import_zod2.z.object({
|
|
419
|
-
projectId:
|
|
420
|
-
taskId:
|
|
423
|
+
projectId: cuidOrPrefixedId,
|
|
424
|
+
taskId: cuidOrPrefixedId,
|
|
421
425
|
pullRequestTitle: import_zod2.z.string().min(1).max(300).optional(),
|
|
422
426
|
pullRequestBody: import_zod2.z.string().max(1e4).optional()
|
|
423
427
|
});
|
|
424
428
|
var ReportErrorInputSchema = import_zod2.z.object({
|
|
425
|
-
taskId:
|
|
429
|
+
taskId: cuidOrPrefixedId,
|
|
426
430
|
errorType: import_zod2.z.nativeEnum(ErrorType),
|
|
427
431
|
errorMessage: import_zod2.z.string().min(1).max(1e3),
|
|
428
432
|
context: import_zod2.z.string().max(2e3).optional()
|
|
429
433
|
});
|
|
430
434
|
var GetProjectContextInputSchema = import_zod2.z.object({
|
|
431
|
-
projectId:
|
|
435
|
+
projectId: cuidOrPrefixedId
|
|
432
436
|
});
|
|
433
437
|
var AddNoteInputSchema = import_zod2.z.object({
|
|
434
|
-
taskId:
|
|
438
|
+
taskId: cuidOrPrefixedId,
|
|
435
439
|
content: import_zod2.z.string().min(1).max(500)
|
|
436
440
|
});
|
|
437
441
|
var AbandonTaskInputSchema = import_zod2.z.object({
|
|
438
|
-
projectId:
|
|
439
|
-
taskId:
|
|
442
|
+
projectId: cuidOrPrefixedId,
|
|
443
|
+
taskId: cuidOrPrefixedId,
|
|
440
444
|
deleteBranch: import_zod2.z.boolean().optional()
|
|
441
445
|
});
|
|
442
446
|
var CreatePersonalProjectInputSchema = import_zod2.z.object({
|
|
@@ -450,7 +454,7 @@ var CreateOrganizationInputSchema = import_zod2.z.object({
|
|
|
450
454
|
slug: import_zod2.z.string().min(1).max(100).regex(/^[a-z0-9-]+$/).optional()
|
|
451
455
|
});
|
|
452
456
|
var UpdateOrganizationInputSchema = import_zod2.z.object({
|
|
453
|
-
organizationId:
|
|
457
|
+
organizationId: cuidOrPrefixedId,
|
|
454
458
|
name: import_zod2.z.string().min(1).max(255).optional(),
|
|
455
459
|
logoUrl: import_zod2.z.string().url().nullable().optional(),
|
|
456
460
|
accentColor: import_zod2.z.string().regex(/^#[0-9A-Fa-f]{6}$/, "Invalid hex color format. Expected #RRGGBB").nullable().optional(),
|
|
@@ -473,7 +477,7 @@ var UpdateProjectInputSchema = import_zod2.z.object({
|
|
|
473
477
|
tags: import_zod2.z.array(import_zod2.z.string()).optional()
|
|
474
478
|
});
|
|
475
479
|
var CreateEpicInputSchema = import_zod2.z.object({
|
|
476
|
-
projectId:
|
|
480
|
+
projectId: cuidOrPrefixedId,
|
|
477
481
|
name: import_zod2.z.string().min(1).max(200),
|
|
478
482
|
description: import_zod2.z.string().max(2e3).optional()
|
|
479
483
|
});
|
|
@@ -505,14 +509,14 @@ var AssignTaskWebappInputSchema = import_zod2.z.object({
|
|
|
505
509
|
userId: import_zod2.z.string().min(1)
|
|
506
510
|
});
|
|
507
511
|
var CreateTagInputSchema = import_zod2.z.object({
|
|
508
|
-
organizationId:
|
|
512
|
+
organizationId: cuidOrPrefixedId,
|
|
509
513
|
name: import_zod2.z.string().min(1).max(50).regex(/^[a-zA-Z0-9\s-]+$/)
|
|
510
514
|
});
|
|
511
515
|
var UpdateTagInputSchema = import_zod2.z.object({
|
|
512
516
|
name: import_zod2.z.string().min(1).max(50).regex(/^[a-zA-Z0-9\s-]+$/)
|
|
513
517
|
});
|
|
514
518
|
var UpdateOrganizationSettingsInputSchema = import_zod2.z.object({
|
|
515
|
-
organizationId:
|
|
519
|
+
organizationId: cuidOrPrefixedId,
|
|
516
520
|
ldapEnabled: import_zod2.z.boolean().optional(),
|
|
517
521
|
ldapUrl: import_zod2.z.string().url().nullable().optional(),
|
|
518
522
|
ldapBindDN: import_zod2.z.string().nullable().optional(),
|
|
@@ -525,21 +529,21 @@ var UpdateOrganizationSettingsInputSchema = import_zod2.z.object({
|
|
|
525
529
|
tenantName: import_zod2.z.string().max(255).nullable().optional()
|
|
526
530
|
});
|
|
527
531
|
var InviteUserInputSchema = import_zod2.z.object({
|
|
528
|
-
organizationId:
|
|
532
|
+
organizationId: cuidOrPrefixedId,
|
|
529
533
|
email: import_zod2.z.string().email(),
|
|
530
534
|
role: import_zod2.z.nativeEnum(UserRole).default(UserRole.MEMBER),
|
|
531
535
|
tags: import_zod2.z.array(import_zod2.z.string()).default([])
|
|
532
536
|
});
|
|
533
537
|
var AssignUserTagsInputSchema = import_zod2.z.object({
|
|
534
|
-
userId:
|
|
538
|
+
userId: cuidOrPrefixedId,
|
|
535
539
|
tags: import_zod2.z.array(import_zod2.z.string()).min(0)
|
|
536
540
|
});
|
|
537
541
|
var InviteCollaboratorInputSchema = import_zod2.z.object({
|
|
538
|
-
projectId:
|
|
542
|
+
projectId: cuidOrPrefixedId,
|
|
539
543
|
email: import_zod2.z.string().email()
|
|
540
544
|
});
|
|
541
545
|
var PublishProjectInputSchema = import_zod2.z.object({
|
|
542
|
-
projectId:
|
|
546
|
+
projectId: cuidOrPrefixedId,
|
|
543
547
|
transferOwnership: import_zod2.z.boolean().default(false),
|
|
544
548
|
tags: import_zod2.z.array(import_zod2.z.string()).min(1)
|
|
545
549
|
});
|
|
@@ -549,7 +553,7 @@ var GenerateApiKeyInputSchema = import_zod2.z.object({
|
|
|
549
553
|
permissions: import_zod2.z.nativeEnum(ApiKeyPermission).default(ApiKeyPermission.WRITE)
|
|
550
554
|
});
|
|
551
555
|
var RevokeApiKeyInputSchema = import_zod2.z.object({
|
|
552
|
-
keyId:
|
|
556
|
+
keyId: cuidOrPrefixedId
|
|
553
557
|
});
|
|
554
558
|
var LoginInputSchema = import_zod2.z.object({
|
|
555
559
|
email: import_zod2.z.string().email(),
|
|
@@ -1121,7 +1125,10 @@ async function createMCPServer() {
|
|
|
1121
1125
|
server.registerTool(
|
|
1122
1126
|
"list_projects",
|
|
1123
1127
|
{
|
|
1124
|
-
description: "List accessible projects (personal + team via tags)"
|
|
1128
|
+
description: "List accessible projects (personal + team via tags)",
|
|
1129
|
+
inputSchema: {
|
|
1130
|
+
workspaceType: import_zod3.z.enum(["TEAM", "PERSONAL", "ALL"]).optional().describe("Filter by workspace type")
|
|
1131
|
+
}
|
|
1125
1132
|
},
|
|
1126
1133
|
async (args) => {
|
|
1127
1134
|
assertApiKeyPermission(
|
|
@@ -1148,7 +1155,12 @@ async function createMCPServer() {
|
|
|
1148
1155
|
server.registerTool(
|
|
1149
1156
|
"list_tasks",
|
|
1150
1157
|
{
|
|
1151
|
-
description: "Returns available tasks (filterable by project, state)"
|
|
1158
|
+
description: "Returns available tasks (filterable by project, state)",
|
|
1159
|
+
inputSchema: {
|
|
1160
|
+
projectId: import_zod3.z.string().optional().describe("Filter by project ID"),
|
|
1161
|
+
state: import_zod3.z.nativeEnum(TaskState).optional().describe("Filter by task state"),
|
|
1162
|
+
assigneeId: import_zod3.z.string().optional().describe("Filter by assignee ID")
|
|
1163
|
+
}
|
|
1152
1164
|
},
|
|
1153
1165
|
async (args) => {
|
|
1154
1166
|
assertApiKeyPermission(mockApiKey, ApiKeyPermission.READ, "list_tasks");
|
|
@@ -1175,7 +1187,10 @@ async function createMCPServer() {
|
|
|
1175
1187
|
server.registerTool(
|
|
1176
1188
|
"get_task",
|
|
1177
1189
|
{
|
|
1178
|
-
description: "Full task details including acceptance criteria"
|
|
1190
|
+
description: "Full task details including acceptance criteria",
|
|
1191
|
+
inputSchema: {
|
|
1192
|
+
taskId: import_zod3.z.string().describe("The task ID to retrieve")
|
|
1193
|
+
}
|
|
1179
1194
|
},
|
|
1180
1195
|
async (args) => {
|
|
1181
1196
|
assertApiKeyPermission(mockApiKey, ApiKeyPermission.READ, "get_task");
|
|
@@ -1198,7 +1213,12 @@ async function createMCPServer() {
|
|
|
1198
1213
|
server.registerTool(
|
|
1199
1214
|
"assign_task",
|
|
1200
1215
|
{
|
|
1201
|
-
description: "Atomic claim - creates branch. Fails if already taken."
|
|
1216
|
+
description: "Atomic claim - creates branch. Fails if already taken.",
|
|
1217
|
+
inputSchema: {
|
|
1218
|
+
projectId: import_zod3.z.string().describe("The project ID"),
|
|
1219
|
+
taskId: import_zod3.z.string().describe("The task ID to assign"),
|
|
1220
|
+
expectedState: import_zod3.z.nativeEnum(TaskState).optional().describe("Expected task state (default: READY)")
|
|
1221
|
+
}
|
|
1202
1222
|
},
|
|
1203
1223
|
async (args) => {
|
|
1204
1224
|
assertApiKeyPermission(
|
|
@@ -1229,7 +1249,13 @@ async function createMCPServer() {
|
|
|
1229
1249
|
server.registerTool(
|
|
1230
1250
|
"update_progress",
|
|
1231
1251
|
{
|
|
1232
|
-
description: "Reports status, updates checkboxes, writes checkpoint"
|
|
1252
|
+
description: "Reports status, updates checkboxes, writes checkpoint",
|
|
1253
|
+
inputSchema: {
|
|
1254
|
+
taskId: import_zod3.z.string().describe("The task ID to update"),
|
|
1255
|
+
statusMessage: import_zod3.z.string().optional().describe("Status message (max 1000 chars)"),
|
|
1256
|
+
completedCheckpointIds: import_zod3.z.array(import_zod3.z.string()).optional().describe("Array of completed checkpoint IDs"),
|
|
1257
|
+
currentCheckpointIndex: import_zod3.z.number().optional().describe("Current checkpoint index")
|
|
1258
|
+
}
|
|
1233
1259
|
},
|
|
1234
1260
|
async (args) => {
|
|
1235
1261
|
assertApiKeyPermission(
|
|
@@ -1260,7 +1286,13 @@ async function createMCPServer() {
|
|
|
1260
1286
|
server.registerTool(
|
|
1261
1287
|
"complete_task",
|
|
1262
1288
|
{
|
|
1263
|
-
description: "Marks complete, triggers PR, deletes local state file"
|
|
1289
|
+
description: "Marks complete, triggers PR, deletes local state file",
|
|
1290
|
+
inputSchema: {
|
|
1291
|
+
projectId: import_zod3.z.string().describe("The project ID"),
|
|
1292
|
+
taskId: import_zod3.z.string().describe("The task ID to complete"),
|
|
1293
|
+
pullRequestTitle: import_zod3.z.string().optional().describe("PR title (max 300 chars)"),
|
|
1294
|
+
pullRequestBody: import_zod3.z.string().optional().describe("PR body/description (max 10000 chars)")
|
|
1295
|
+
}
|
|
1264
1296
|
},
|
|
1265
1297
|
async (args) => {
|
|
1266
1298
|
assertApiKeyPermission(
|
|
@@ -1314,7 +1346,13 @@ async function createMCPServer() {
|
|
|
1314
1346
|
server.registerTool(
|
|
1315
1347
|
"report_error",
|
|
1316
1348
|
{
|
|
1317
|
-
description: "Report unrecoverable error, displays on task in webapp"
|
|
1349
|
+
description: "Report unrecoverable error, displays on task in webapp",
|
|
1350
|
+
inputSchema: {
|
|
1351
|
+
taskId: import_zod3.z.string().describe("The task ID"),
|
|
1352
|
+
errorType: import_zod3.z.nativeEnum(ErrorType).describe("Error type: BUILD_FAILURE, TEST_FAILURE, CONFLICT, AUTH_ERROR, OTHER"),
|
|
1353
|
+
errorMessage: import_zod3.z.string().describe("Error message (max 1000 chars)"),
|
|
1354
|
+
context: import_zod3.z.string().optional().describe("Additional context (max 2000 chars)")
|
|
1355
|
+
}
|
|
1318
1356
|
},
|
|
1319
1357
|
async (args) => {
|
|
1320
1358
|
assertApiKeyPermission(
|
|
@@ -1346,7 +1384,10 @@ async function createMCPServer() {
|
|
|
1346
1384
|
server.registerTool(
|
|
1347
1385
|
"get_project_context",
|
|
1348
1386
|
{
|
|
1349
|
-
description: "Returns assembled context (README, stack, conventions)"
|
|
1387
|
+
description: "Returns assembled context (README, stack, conventions)",
|
|
1388
|
+
inputSchema: {
|
|
1389
|
+
projectId: import_zod3.z.string().describe("The project ID")
|
|
1390
|
+
}
|
|
1350
1391
|
},
|
|
1351
1392
|
async (args) => {
|
|
1352
1393
|
assertApiKeyPermission(
|
|
@@ -1373,7 +1414,11 @@ async function createMCPServer() {
|
|
|
1373
1414
|
server.registerTool(
|
|
1374
1415
|
"add_note",
|
|
1375
1416
|
{
|
|
1376
|
-
description: "Append implementation notes to task"
|
|
1417
|
+
description: "Append implementation notes to task",
|
|
1418
|
+
inputSchema: {
|
|
1419
|
+
taskId: import_zod3.z.string().describe("The task ID"),
|
|
1420
|
+
content: import_zod3.z.string().describe("Note content (max 500 chars)")
|
|
1421
|
+
}
|
|
1377
1422
|
},
|
|
1378
1423
|
async (args) => {
|
|
1379
1424
|
assertApiKeyPermission(mockApiKey, ApiKeyPermission.WRITE, "add_note");
|
|
@@ -1399,7 +1444,12 @@ async function createMCPServer() {
|
|
|
1399
1444
|
server.registerTool(
|
|
1400
1445
|
"abandon_task",
|
|
1401
1446
|
{
|
|
1402
|
-
description: "Unassign from a task and optionally delete the branch"
|
|
1447
|
+
description: "Unassign from a task and optionally delete the branch",
|
|
1448
|
+
inputSchema: {
|
|
1449
|
+
projectId: import_zod3.z.string().describe("The project ID"),
|
|
1450
|
+
taskId: import_zod3.z.string().describe("The task ID to abandon"),
|
|
1451
|
+
deleteBranch: import_zod3.z.boolean().optional().describe("Whether to delete the associated branch")
|
|
1452
|
+
}
|
|
1403
1453
|
},
|
|
1404
1454
|
async (args) => {
|
|
1405
1455
|
assertApiKeyPermission(
|
|
@@ -1430,7 +1480,12 @@ async function createMCPServer() {
|
|
|
1430
1480
|
server.registerTool(
|
|
1431
1481
|
"create_personal_project",
|
|
1432
1482
|
{
|
|
1433
|
-
description: "Create project in user's personal workspace"
|
|
1483
|
+
description: "Create project in user's personal workspace",
|
|
1484
|
+
inputSchema: {
|
|
1485
|
+
name: import_zod3.z.string().describe("Project name (max 100 chars)"),
|
|
1486
|
+
description: import_zod3.z.string().optional().describe("Project description (max 500 chars)"),
|
|
1487
|
+
repositoryUrl: import_zod3.z.string().describe("GitHub repository URL")
|
|
1488
|
+
}
|
|
1434
1489
|
},
|
|
1435
1490
|
async (args) => {
|
|
1436
1491
|
assertApiKeyPermission(
|
|
@@ -1538,6 +1593,44 @@ async function checkActiveTask() {
|
|
|
1538
1593
|
}
|
|
1539
1594
|
|
|
1540
1595
|
// src/cli.ts
|
|
1596
|
+
function handleCliFlags() {
|
|
1597
|
+
const args = process.argv.slice(2);
|
|
1598
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
1599
|
+
console.log(`mtaap-mcp v${VERSION}`);
|
|
1600
|
+
process.exit(0);
|
|
1601
|
+
}
|
|
1602
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
1603
|
+
console.log(`mtaap-mcp v${VERSION}
|
|
1604
|
+
|
|
1605
|
+
MTAAP MCP Server - Model Context Protocol server for MTAAP
|
|
1606
|
+
|
|
1607
|
+
Usage:
|
|
1608
|
+
mtaap-mcp [options]
|
|
1609
|
+
|
|
1610
|
+
Options:
|
|
1611
|
+
-v, --version Show version number
|
|
1612
|
+
-h, --help Show this help message
|
|
1613
|
+
|
|
1614
|
+
Environment Variables:
|
|
1615
|
+
MTAAP_API_KEY Your MTAAP API key (required)
|
|
1616
|
+
MTAAP_BASE_URL MTAAP webapp URL (required)
|
|
1617
|
+
|
|
1618
|
+
Example mcp.json configuration:
|
|
1619
|
+
{
|
|
1620
|
+
"mcpServers": {
|
|
1621
|
+
"mtaap": {
|
|
1622
|
+
"command": "npx",
|
|
1623
|
+
"args": ["@mtaap/mcp"],
|
|
1624
|
+
"env": {
|
|
1625
|
+
"MTAAP_API_KEY": "usr_your_api_key_here",
|
|
1626
|
+
"MTAAP_BASE_URL": "https://collab.mtaap.de"
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}`);
|
|
1631
|
+
process.exit(0);
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1541
1634
|
function validateEnvironment() {
|
|
1542
1635
|
const errors = [];
|
|
1543
1636
|
if (!process.env.MTAAP_API_KEY) {
|
|
@@ -1612,6 +1705,7 @@ async function checkConnectivity() {
|
|
|
1612
1705
|
}
|
|
1613
1706
|
}
|
|
1614
1707
|
async function main() {
|
|
1708
|
+
handleCliFlags();
|
|
1615
1709
|
console.error("[mtaap-mcp] Starting MTAAP MCP server...");
|
|
1616
1710
|
validateEnvironment();
|
|
1617
1711
|
await checkConnectivity();
|