@mtaap/mcp 0.2.3 → 0.2.4
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 +100 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.js +100 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
|
37
37
|
var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
38
38
|
|
|
39
39
|
// src/version.ts
|
|
40
|
-
var VERSION = "0.2.
|
|
40
|
+
var VERSION = "0.2.4";
|
|
41
41
|
|
|
42
42
|
// src/index.ts
|
|
43
43
|
var import_zod3 = require("zod");
|
|
@@ -411,7 +411,8 @@ var ListProjectsInputSchema = import_zod2.z.object({
|
|
|
411
411
|
var ListTasksInputSchema = import_zod2.z.object({
|
|
412
412
|
projectId: import_zod2.z.string().optional(),
|
|
413
413
|
state: import_zod2.z.nativeEnum(TaskState).optional(),
|
|
414
|
-
assigneeId: import_zod2.z.string().optional()
|
|
414
|
+
assigneeId: import_zod2.z.string().optional(),
|
|
415
|
+
includeArchived: import_zod2.z.boolean().optional()
|
|
415
416
|
});
|
|
416
417
|
var cuidOrPrefixedId = import_zod2.z.string().regex(/^([a-z0-9]+|[a-z]+_[a-zA-Z0-9]+)$/);
|
|
417
418
|
var GetTaskInputSchema = import_zod2.z.object({
|
|
@@ -463,6 +464,14 @@ var ApproveTaskInputSchema = import_zod2.z.object({
|
|
|
463
464
|
taskId: cuidOrPrefixedId,
|
|
464
465
|
reviewComments: import_zod2.z.string().max(2e3).optional()
|
|
465
466
|
});
|
|
467
|
+
var ArchiveTaskInputSchema = import_zod2.z.object({
|
|
468
|
+
projectId: cuidOrPrefixedId,
|
|
469
|
+
taskId: cuidOrPrefixedId
|
|
470
|
+
});
|
|
471
|
+
var UnarchiveTaskInputSchema = import_zod2.z.object({
|
|
472
|
+
projectId: cuidOrPrefixedId,
|
|
473
|
+
taskId: cuidOrPrefixedId
|
|
474
|
+
});
|
|
466
475
|
var CreatePersonalProjectInputSchema = import_zod2.z.object({
|
|
467
476
|
name: import_zod2.z.string().min(1).max(100),
|
|
468
477
|
description: import_zod2.z.string().max(500).optional(),
|
|
@@ -1030,6 +1039,7 @@ var MCPApiClient = class {
|
|
|
1030
1039
|
if (filters.projectId) params.set("projectId", filters.projectId);
|
|
1031
1040
|
if (filters.state) params.set("state", filters.state);
|
|
1032
1041
|
if (filters.assigneeId) params.set("assigneeId", filters.assigneeId);
|
|
1042
|
+
if (filters.includeArchived) params.set("includeArchived", "true");
|
|
1033
1043
|
const queryString = params.toString();
|
|
1034
1044
|
const path = queryString ? `/api/mcp/tasks?${queryString}` : "/api/mcp/tasks";
|
|
1035
1045
|
return this.request("GET", path);
|
|
@@ -1074,6 +1084,22 @@ var MCPApiClient = class {
|
|
|
1074
1084
|
deleteBranch
|
|
1075
1085
|
});
|
|
1076
1086
|
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Archive a task (soft delete)
|
|
1089
|
+
*/
|
|
1090
|
+
async archiveTask(taskId, projectId) {
|
|
1091
|
+
return this.request("POST", `/api/mcp/tasks/${taskId}/archive`, {
|
|
1092
|
+
projectId
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Unarchive a task (restore)
|
|
1097
|
+
*/
|
|
1098
|
+
async unarchiveTask(taskId, projectId) {
|
|
1099
|
+
return this.request("DELETE", `/api/mcp/tasks/${taskId}/archive`, {
|
|
1100
|
+
projectId
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1077
1103
|
/**
|
|
1078
1104
|
* Report task error
|
|
1079
1105
|
*/
|
|
@@ -1214,7 +1240,8 @@ async function createMCPServer() {
|
|
|
1214
1240
|
inputSchema: {
|
|
1215
1241
|
projectId: import_zod3.z.string().optional().describe("Filter by project ID"),
|
|
1216
1242
|
state: import_zod3.z.nativeEnum(TaskState).optional().describe("Filter by task state"),
|
|
1217
|
-
assigneeId: import_zod3.z.string().optional().describe("Filter by assignee ID")
|
|
1243
|
+
assigneeId: import_zod3.z.string().optional().describe("Filter by assignee ID"),
|
|
1244
|
+
includeArchived: import_zod3.z.boolean().optional().describe("Include archived tasks (default: false)")
|
|
1218
1245
|
}
|
|
1219
1246
|
},
|
|
1220
1247
|
async (args) => {
|
|
@@ -1224,7 +1251,8 @@ async function createMCPServer() {
|
|
|
1224
1251
|
const tasks = await apiClient.listTasks({
|
|
1225
1252
|
projectId: validated.projectId,
|
|
1226
1253
|
state: validated.state,
|
|
1227
|
-
assigneeId: validated.assigneeId
|
|
1254
|
+
assigneeId: validated.assigneeId,
|
|
1255
|
+
includeArchived: validated.includeArchived
|
|
1228
1256
|
});
|
|
1229
1257
|
return {
|
|
1230
1258
|
content: [
|
|
@@ -1532,6 +1560,74 @@ async function createMCPServer() {
|
|
|
1532
1560
|
}
|
|
1533
1561
|
}
|
|
1534
1562
|
);
|
|
1563
|
+
server.registerTool(
|
|
1564
|
+
"archive_task",
|
|
1565
|
+
{
|
|
1566
|
+
description: "Archive a task (soft delete). Task can be restored later.",
|
|
1567
|
+
inputSchema: {
|
|
1568
|
+
projectId: import_zod3.z.string().describe("The project ID"),
|
|
1569
|
+
taskId: import_zod3.z.string().describe("The task ID to archive")
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
async (args) => {
|
|
1573
|
+
assertApiKeyPermission(
|
|
1574
|
+
mockApiKey,
|
|
1575
|
+
ApiKeyPermission.WRITE,
|
|
1576
|
+
"archive_task"
|
|
1577
|
+
);
|
|
1578
|
+
const validated = ArchiveTaskInputSchema.parse(args);
|
|
1579
|
+
try {
|
|
1580
|
+
const result = await apiClient.archiveTask(
|
|
1581
|
+
validated.taskId,
|
|
1582
|
+
validated.projectId
|
|
1583
|
+
);
|
|
1584
|
+
return {
|
|
1585
|
+
content: [
|
|
1586
|
+
{
|
|
1587
|
+
type: "text",
|
|
1588
|
+
text: JSON.stringify(result, null, 2)
|
|
1589
|
+
}
|
|
1590
|
+
]
|
|
1591
|
+
};
|
|
1592
|
+
} catch (error) {
|
|
1593
|
+
return handleApiError(error);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
);
|
|
1597
|
+
server.registerTool(
|
|
1598
|
+
"unarchive_task",
|
|
1599
|
+
{
|
|
1600
|
+
description: "Restore an archived task",
|
|
1601
|
+
inputSchema: {
|
|
1602
|
+
projectId: import_zod3.z.string().describe("The project ID"),
|
|
1603
|
+
taskId: import_zod3.z.string().describe("The task ID to restore")
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
async (args) => {
|
|
1607
|
+
assertApiKeyPermission(
|
|
1608
|
+
mockApiKey,
|
|
1609
|
+
ApiKeyPermission.WRITE,
|
|
1610
|
+
"unarchive_task"
|
|
1611
|
+
);
|
|
1612
|
+
const validated = UnarchiveTaskInputSchema.parse(args);
|
|
1613
|
+
try {
|
|
1614
|
+
const result = await apiClient.unarchiveTask(
|
|
1615
|
+
validated.taskId,
|
|
1616
|
+
validated.projectId
|
|
1617
|
+
);
|
|
1618
|
+
return {
|
|
1619
|
+
content: [
|
|
1620
|
+
{
|
|
1621
|
+
type: "text",
|
|
1622
|
+
text: JSON.stringify(result, null, 2)
|
|
1623
|
+
}
|
|
1624
|
+
]
|
|
1625
|
+
};
|
|
1626
|
+
} catch (error) {
|
|
1627
|
+
return handleApiError(error);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
);
|
|
1535
1631
|
server.registerTool(
|
|
1536
1632
|
"create_personal_project",
|
|
1537
1633
|
{
|