@filcuk/planka-mcp 1.0.0
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/LICENSE +21 -0
- package/README.md +180 -0
- package/dist/client.d.ts +55 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +193 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +39 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +82 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/operations/boards.d.ts +39 -0
- package/dist/operations/boards.d.ts.map +1 -0
- package/dist/operations/boards.js +76 -0
- package/dist/operations/boards.js.map +1 -0
- package/dist/operations/cards.d.ts +35 -0
- package/dist/operations/cards.d.ts.map +1 -0
- package/dist/operations/cards.js +70 -0
- package/dist/operations/cards.js.map +1 -0
- package/dist/operations/comments.d.ts +20 -0
- package/dist/operations/comments.d.ts.map +1 -0
- package/dist/operations/comments.js +42 -0
- package/dist/operations/comments.js.map +1 -0
- package/dist/operations/labels.d.ts +32 -0
- package/dist/operations/labels.d.ts.map +1 -0
- package/dist/operations/labels.js +91 -0
- package/dist/operations/labels.js.map +1 -0
- package/dist/operations/lists.d.ts +15 -0
- package/dist/operations/lists.d.ts.map +1 -0
- package/dist/operations/lists.js +35 -0
- package/dist/operations/lists.js.map +1 -0
- package/dist/operations/projects.d.ts +23 -0
- package/dist/operations/projects.d.ts.map +1 -0
- package/dist/operations/projects.js +52 -0
- package/dist/operations/projects.js.map +1 -0
- package/dist/operations/tasks.d.ts +30 -0
- package/dist/operations/tasks.d.ts.map +1 -0
- package/dist/operations/tasks.js +102 -0
- package/dist/operations/tasks.js.map +1 -0
- package/dist/schemas/entities.d.ts +307 -0
- package/dist/schemas/entities.d.ts.map +1 -0
- package/dist/schemas/entities.js +168 -0
- package/dist/schemas/entities.js.map +1 -0
- package/dist/schemas/requests.d.ts +225 -0
- package/dist/schemas/requests.d.ts.map +1 -0
- package/dist/schemas/requests.js +87 -0
- package/dist/schemas/requests.js.map +1 -0
- package/dist/schemas/responses.d.ts +2161 -0
- package/dist/schemas/responses.d.ts.map +1 -0
- package/dist/schemas/responses.js +68 -0
- package/dist/schemas/responses.js.map +1 -0
- package/dist/tools/cards.d.ts +401 -0
- package/dist/tools/cards.d.ts.map +1 -0
- package/dist/tools/cards.js +367 -0
- package/dist/tools/cards.js.map +1 -0
- package/dist/tools/comments.d.ts +134 -0
- package/dist/tools/comments.d.ts.map +1 -0
- package/dist/tools/comments.js +109 -0
- package/dist/tools/comments.js.map +1 -0
- package/dist/tools/index.d.ts +790 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +44 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/labels.d.ts +198 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +265 -0
- package/dist/tools/labels.js.map +1 -0
- package/dist/tools/lists.d.ts +117 -0
- package/dist/tools/lists.d.ts.map +1 -0
- package/dist/tools/lists.js +178 -0
- package/dist/tools/lists.js.map +1 -0
- package/dist/tools/navigation.d.ts +106 -0
- package/dist/tools/navigation.d.ts.map +1 -0
- package/dist/tools/navigation.js +151 -0
- package/dist/tools/navigation.js.map +1 -0
- package/dist/tools/tasks.d.ts +223 -0
- package/dist/tools/tasks.d.ts.map +1 -0
- package/dist/tools/tasks.js +169 -0
- package/dist/tools/tasks.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task tools for PLANKA MCP server.
|
|
3
|
+
*/
|
|
4
|
+
import { createTasks, updateTask, deleteTask } from "../operations/tasks.js";
|
|
5
|
+
import { PlankaError } from "../errors.js";
|
|
6
|
+
/**
|
|
7
|
+
* Tool: planka_create_tasks
|
|
8
|
+
* Add one or more tasks (checklist items) to a card.
|
|
9
|
+
*/
|
|
10
|
+
export const createTasksTool = {
|
|
11
|
+
name: "planka_create_tasks",
|
|
12
|
+
description: "Add one or more tasks (checklist items) to a card.",
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: "object",
|
|
15
|
+
properties: {
|
|
16
|
+
cardId: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "The card ID",
|
|
19
|
+
},
|
|
20
|
+
tasks: {
|
|
21
|
+
type: "array",
|
|
22
|
+
items: { type: "string" },
|
|
23
|
+
minItems: 1,
|
|
24
|
+
description: "Task names to create",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ["cardId", "tasks"],
|
|
28
|
+
},
|
|
29
|
+
handler: async (params) => {
|
|
30
|
+
try {
|
|
31
|
+
const tasks = await createTasks({
|
|
32
|
+
cardId: params.cardId,
|
|
33
|
+
tasks: params.tasks.map((name) => ({ name })),
|
|
34
|
+
});
|
|
35
|
+
return {
|
|
36
|
+
content: [
|
|
37
|
+
{
|
|
38
|
+
type: "text",
|
|
39
|
+
text: JSON.stringify({
|
|
40
|
+
success: true,
|
|
41
|
+
tasksCreated: tasks.length,
|
|
42
|
+
tasks: tasks.map((t) => ({
|
|
43
|
+
id: t.id,
|
|
44
|
+
name: t.name,
|
|
45
|
+
isCompleted: t.isCompleted,
|
|
46
|
+
})),
|
|
47
|
+
}, null, 2),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
if (error instanceof PlankaError) {
|
|
54
|
+
return {
|
|
55
|
+
content: [{ type: "text", text: `Error: ${error.message}` }],
|
|
56
|
+
isError: true,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Tool: planka_update_task
|
|
65
|
+
* Update a task's name or completion status.
|
|
66
|
+
*/
|
|
67
|
+
export const updateTaskTool = {
|
|
68
|
+
name: "planka_update_task",
|
|
69
|
+
description: "Update a task's name or completion status.",
|
|
70
|
+
inputSchema: {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
taskId: {
|
|
74
|
+
type: "string",
|
|
75
|
+
description: "The task ID",
|
|
76
|
+
},
|
|
77
|
+
name: {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "New task name",
|
|
80
|
+
},
|
|
81
|
+
isCompleted: {
|
|
82
|
+
type: "boolean",
|
|
83
|
+
description: "Mark as complete/incomplete",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
required: ["taskId"],
|
|
87
|
+
},
|
|
88
|
+
handler: async (params) => {
|
|
89
|
+
try {
|
|
90
|
+
const { taskId, ...updates } = params;
|
|
91
|
+
// Only include defined fields
|
|
92
|
+
const filteredUpdates = {};
|
|
93
|
+
if (updates.name !== undefined)
|
|
94
|
+
filteredUpdates.name = updates.name;
|
|
95
|
+
if (updates.isCompleted !== undefined)
|
|
96
|
+
filteredUpdates.isCompleted = updates.isCompleted;
|
|
97
|
+
const task = await updateTask(taskId, filteredUpdates);
|
|
98
|
+
return {
|
|
99
|
+
content: [
|
|
100
|
+
{
|
|
101
|
+
type: "text",
|
|
102
|
+
text: JSON.stringify({
|
|
103
|
+
success: true,
|
|
104
|
+
task: {
|
|
105
|
+
id: task.id,
|
|
106
|
+
name: task.name,
|
|
107
|
+
isCompleted: task.isCompleted,
|
|
108
|
+
},
|
|
109
|
+
}, null, 2),
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
if (error instanceof PlankaError) {
|
|
116
|
+
return {
|
|
117
|
+
content: [{ type: "text", text: `Error: ${error.message}` }],
|
|
118
|
+
isError: true,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Tool: planka_delete_task
|
|
127
|
+
* Delete a task from a card.
|
|
128
|
+
*/
|
|
129
|
+
export const deleteTaskTool = {
|
|
130
|
+
name: "planka_delete_task",
|
|
131
|
+
description: "Delete a task from a card.",
|
|
132
|
+
inputSchema: {
|
|
133
|
+
type: "object",
|
|
134
|
+
properties: {
|
|
135
|
+
taskId: {
|
|
136
|
+
type: "string",
|
|
137
|
+
description: "The task ID to delete",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
required: ["taskId"],
|
|
141
|
+
},
|
|
142
|
+
handler: async (params) => {
|
|
143
|
+
try {
|
|
144
|
+
await deleteTask(params.taskId);
|
|
145
|
+
return {
|
|
146
|
+
content: [
|
|
147
|
+
{
|
|
148
|
+
type: "text",
|
|
149
|
+
text: JSON.stringify({
|
|
150
|
+
success: true,
|
|
151
|
+
message: `Task ${params.taskId} deleted`,
|
|
152
|
+
}, null, 2),
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (error instanceof PlankaError) {
|
|
159
|
+
return {
|
|
160
|
+
content: [{ type: "text", text: `Error: ${error.message}` }],
|
|
161
|
+
isError: true,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
export const taskTools = [createTasksTool, updateTaskTool, deleteTaskTool];
|
|
169
|
+
//# sourceMappingURL=tasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/tools/tasks.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,qBAAqB;IA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E,MAAe,EAAE,IAAI,EAAE,UAAU,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;oBACrE,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,eAAe,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@filcuk/planka-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"mcpName": "io.github.filcuk/planka",
|
|
5
|
+
"description": "MCP server for PLANKA kanban boards",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"planka-mcp": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "tsc --watch",
|
|
17
|
+
"start": "node dist/index.js",
|
|
18
|
+
"test": "vitest",
|
|
19
|
+
"test:run": "vitest run",
|
|
20
|
+
"lint": "tsc --noEmit",
|
|
21
|
+
"prepublishOnly": "npm run build"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"mcp",
|
|
25
|
+
"mcp-server",
|
|
26
|
+
"model-context-protocol",
|
|
27
|
+
"planka",
|
|
28
|
+
"kanban",
|
|
29
|
+
"claude",
|
|
30
|
+
"ai-agent"
|
|
31
|
+
],
|
|
32
|
+
"author": "filcuk",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/filcuk/planka-mcp.git"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18.0.0"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
46
|
+
"zod": "^3.22.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^20.0.0",
|
|
50
|
+
"typescript": "^5.3.0",
|
|
51
|
+
"vitest": "^4.0.18"
|
|
52
|
+
}
|
|
53
|
+
}
|