@denisixnpm/planka-mcp 2.2.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 +157 -0
- package/dist/condense.d.ts +18 -0
- package/dist/condense.js +127 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +567 -0
- package/dist/tools/admin/index.d.ts +10 -0
- package/dist/tools/admin/index.js +11 -0
- package/dist/tools/admin/tools.d.ts +17 -0
- package/dist/tools/admin/tools.js +211 -0
- package/dist/tools/core/index.d.ts +10 -0
- package/dist/tools/core/index.js +18 -0
- package/dist/tools/core/tools.d.ts +46 -0
- package/dist/tools/core/tools.js +535 -0
- package/dist/tools/index.d.ts +45 -0
- package/dist/tools/index.js +61 -0
- package/dist/tools/optional/index.d.ts +10 -0
- package/dist/tools/optional/index.js +20 -0
- package/dist/tools/optional/tools.d.ts +53 -0
- package/dist/tools/optional/tools.js +578 -0
- package/dist/tools/types.d.ts +61 -0
- package/dist/tools/types.js +64 -0
- package/package.json +59 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { buildGroupedSchema } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Config tool - manages application configuration (admin only)
|
|
4
|
+
*/
|
|
5
|
+
export const configTool = {
|
|
6
|
+
name: "config",
|
|
7
|
+
description: "Manage Planka application configuration. Requires admin privileges.",
|
|
8
|
+
operations: {
|
|
9
|
+
get: {
|
|
10
|
+
method: "GET",
|
|
11
|
+
path: "/config",
|
|
12
|
+
description: "Get application configuration including SMTP settings",
|
|
13
|
+
},
|
|
14
|
+
update: {
|
|
15
|
+
method: "PATCH",
|
|
16
|
+
path: "/config",
|
|
17
|
+
description: "Update application configuration",
|
|
18
|
+
},
|
|
19
|
+
testSmtp: {
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/config/test-smtp",
|
|
22
|
+
description: "Send a test email to verify SMTP configuration",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
inputSchema: buildGroupedSchema(["get", "update", "testSmtp"], {
|
|
26
|
+
get: "Get application configuration",
|
|
27
|
+
update: "Update application configuration",
|
|
28
|
+
testSmtp: "Test SMTP configuration by sending a test email",
|
|
29
|
+
}, {
|
|
30
|
+
data: {
|
|
31
|
+
description: "Config data: { smtpHost?: string, smtpPort?: number, smtpUser?: string, smtpPassword?: string, smtpFrom?: string, smtpSecure?: boolean }",
|
|
32
|
+
requiredFor: ["update"],
|
|
33
|
+
properties: {
|
|
34
|
+
smtpHost: { type: "string", description: "SMTP host" },
|
|
35
|
+
smtpPort: { type: "number", description: "SMTP port" },
|
|
36
|
+
smtpUser: { type: "string", description: "SMTP username" },
|
|
37
|
+
smtpPassword: { type: "string", description: "SMTP password" },
|
|
38
|
+
smtpFrom: { type: "string", description: "SMTP from address" },
|
|
39
|
+
smtpSecure: { type: "boolean", description: "Use secure SMTP (TLS)" },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Users tool - manages user accounts (admin only)
|
|
46
|
+
*/
|
|
47
|
+
export const usersTool = {
|
|
48
|
+
name: "users",
|
|
49
|
+
description: "Manage Planka user accounts. Requires admin privileges for most operations.",
|
|
50
|
+
operations: {
|
|
51
|
+
list: {
|
|
52
|
+
method: "GET",
|
|
53
|
+
path: "/users",
|
|
54
|
+
description: "List all users",
|
|
55
|
+
},
|
|
56
|
+
create: {
|
|
57
|
+
method: "POST",
|
|
58
|
+
path: "/users",
|
|
59
|
+
description: "Create a new user account",
|
|
60
|
+
},
|
|
61
|
+
update: {
|
|
62
|
+
method: "PATCH",
|
|
63
|
+
path: "/users/{id}",
|
|
64
|
+
description: "Update user profile",
|
|
65
|
+
},
|
|
66
|
+
delete: {
|
|
67
|
+
method: "DELETE",
|
|
68
|
+
path: "/users/{id}",
|
|
69
|
+
description: "Delete a user account",
|
|
70
|
+
},
|
|
71
|
+
updateEmail: {
|
|
72
|
+
method: "PATCH",
|
|
73
|
+
path: "/users/{id}/email",
|
|
74
|
+
description: "Update user's email address",
|
|
75
|
+
},
|
|
76
|
+
updatePassword: {
|
|
77
|
+
method: "PATCH",
|
|
78
|
+
path: "/users/{id}/password",
|
|
79
|
+
description: "Update user's password",
|
|
80
|
+
},
|
|
81
|
+
updateUsername: {
|
|
82
|
+
method: "PATCH",
|
|
83
|
+
path: "/users/{id}/username",
|
|
84
|
+
description: "Update user's username",
|
|
85
|
+
},
|
|
86
|
+
updateAvatar: {
|
|
87
|
+
method: "POST",
|
|
88
|
+
path: "/users/{id}/avatar",
|
|
89
|
+
description: "Update user's avatar image",
|
|
90
|
+
},
|
|
91
|
+
createApiKey: {
|
|
92
|
+
method: "POST",
|
|
93
|
+
path: "/users/{id}/api-key",
|
|
94
|
+
description: "Generate an API key for a user",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
inputSchema: buildGroupedSchema(["list", "create", "update", "delete", "updateEmail", "updatePassword", "updateUsername", "updateAvatar", "createApiKey"], {
|
|
98
|
+
list: "List all users",
|
|
99
|
+
create: "Create a new user",
|
|
100
|
+
update: "Update user profile",
|
|
101
|
+
delete: "Delete a user",
|
|
102
|
+
updateEmail: "Update user's email",
|
|
103
|
+
updatePassword: "Update user's password",
|
|
104
|
+
updateUsername: "Update user's username",
|
|
105
|
+
updateAvatar: "Update user's avatar",
|
|
106
|
+
createApiKey: "Generate API key for user",
|
|
107
|
+
}, {
|
|
108
|
+
id: {
|
|
109
|
+
description: "User ID",
|
|
110
|
+
requiredFor: ["update", "delete", "updateEmail", "updatePassword", "updateUsername", "updateAvatar", "createApiKey"],
|
|
111
|
+
},
|
|
112
|
+
data: {
|
|
113
|
+
description: "User data: { email, password, name (all required for create), role: 'admin'|'projectOwner'|'boardUser', username?: string, isDeactivated?: boolean }",
|
|
114
|
+
requiredFor: ["create", "update", "updateEmail", "updatePassword", "updateUsername"],
|
|
115
|
+
properties: {
|
|
116
|
+
email: { type: "string", description: "User email (required for create)", required: true },
|
|
117
|
+
password: { type: "string", description: "User password (create/updatePassword)", required: true },
|
|
118
|
+
name: { type: "string", description: "Display name (required for create)", required: true },
|
|
119
|
+
username: { type: "string", description: "Username" },
|
|
120
|
+
role: { type: "string", enum: ["admin", "projectOwner", "boardUser"], description: "User role", required: true },
|
|
121
|
+
isDeactivated: { type: "boolean", description: "Whether the user is deactivated" },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
}),
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Webhooks tool - manages webhooks (admin only)
|
|
128
|
+
*/
|
|
129
|
+
export const webhooksTool = {
|
|
130
|
+
name: "webhooks",
|
|
131
|
+
description: "Manage Planka webhooks for event notifications. Requires admin privileges.",
|
|
132
|
+
operations: {
|
|
133
|
+
list: {
|
|
134
|
+
method: "GET",
|
|
135
|
+
path: "/webhooks",
|
|
136
|
+
description: "List all configured webhooks",
|
|
137
|
+
},
|
|
138
|
+
create: {
|
|
139
|
+
method: "POST",
|
|
140
|
+
path: "/webhooks",
|
|
141
|
+
description: "Create a new webhook",
|
|
142
|
+
},
|
|
143
|
+
update: {
|
|
144
|
+
method: "PATCH",
|
|
145
|
+
path: "/webhooks/{id}",
|
|
146
|
+
description: "Update webhook configuration",
|
|
147
|
+
},
|
|
148
|
+
delete: {
|
|
149
|
+
method: "DELETE",
|
|
150
|
+
path: "/webhooks/{id}",
|
|
151
|
+
description: "Delete a webhook",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
inputSchema: buildGroupedSchema(["list", "create", "update", "delete"], {
|
|
155
|
+
list: "List all webhooks",
|
|
156
|
+
create: "Create a new webhook",
|
|
157
|
+
update: "Update webhook configuration",
|
|
158
|
+
delete: "Delete a webhook",
|
|
159
|
+
}, {
|
|
160
|
+
id: {
|
|
161
|
+
description: "Webhook ID",
|
|
162
|
+
requiredFor: ["update", "delete"],
|
|
163
|
+
},
|
|
164
|
+
data: {
|
|
165
|
+
description: "Webhook data: { name: string (required), url: string (required), accessToken?: string, events?: string[], excludedEvents?: string[] }",
|
|
166
|
+
requiredFor: ["create", "update"],
|
|
167
|
+
properties: {
|
|
168
|
+
name: { type: "string", description: "Webhook name", required: true },
|
|
169
|
+
url: { type: "string", description: "Webhook URL", required: true },
|
|
170
|
+
accessToken: { type: "string", description: "Access token for authenticated webhooks" },
|
|
171
|
+
events: { type: "array", description: "Event types to subscribe to" },
|
|
172
|
+
excludedEvents: { type: "array", description: "Event types to exclude" },
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
}),
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Project Managers tool - manages project manager assignments
|
|
179
|
+
*/
|
|
180
|
+
export const projectManagersTool = {
|
|
181
|
+
name: "projectManagers",
|
|
182
|
+
description: "Manage project manager assignments. Requires admin privileges for shared projects.",
|
|
183
|
+
operations: {
|
|
184
|
+
add: {
|
|
185
|
+
method: "POST",
|
|
186
|
+
path: "/projects/{projectId}/project-managers",
|
|
187
|
+
description: "Add a user as project manager",
|
|
188
|
+
},
|
|
189
|
+
remove: {
|
|
190
|
+
method: "DELETE",
|
|
191
|
+
path: "/project-managers/{id}",
|
|
192
|
+
description: "Remove a project manager",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
inputSchema: buildGroupedSchema(["add", "remove"], {
|
|
196
|
+
add: "Add a project manager",
|
|
197
|
+
remove: "Remove a project manager",
|
|
198
|
+
}, {
|
|
199
|
+
id: {
|
|
200
|
+
description: "Project ID (for add) or Project Manager ID (for remove)",
|
|
201
|
+
requiredFor: ["add", "remove"],
|
|
202
|
+
},
|
|
203
|
+
data: {
|
|
204
|
+
description: "Manager data: { userId: string }. Note: project managers can only be added to 'shared' projects; private projects have only their owner.",
|
|
205
|
+
requiredFor: ["add"],
|
|
206
|
+
properties: {
|
|
207
|
+
userId: { type: "string", description: "User ID to add as project manager", required: true },
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
}),
|
|
211
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core tools - Essential for basic Kanban operations (always enabled)
|
|
3
|
+
*/
|
|
4
|
+
import { GroupedToolDefinition } from "../types.js";
|
|
5
|
+
import { authTool, projectsTool, boardsTool, listsTool, cardsTool, commentsTool, tasksTool, labelsTool, cardMembersTool, bootstrapTool, contextTool } from "./tools.js";
|
|
6
|
+
export { authTool, projectsTool, boardsTool, listsTool, cardsTool, commentsTool, tasksTool, labelsTool, cardMembersTool, bootstrapTool, contextTool, };
|
|
7
|
+
/**
|
|
8
|
+
* All core tools combined
|
|
9
|
+
*/
|
|
10
|
+
export declare const coreTools: GroupedToolDefinition[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { authTool, projectsTool, boardsTool, listsTool, cardsTool, commentsTool, tasksTool, labelsTool, cardMembersTool, bootstrapTool, contextTool, } from "./tools.js";
|
|
2
|
+
export { authTool, projectsTool, boardsTool, listsTool, cardsTool, commentsTool, tasksTool, labelsTool, cardMembersTool, bootstrapTool, contextTool, };
|
|
3
|
+
/**
|
|
4
|
+
* All core tools combined
|
|
5
|
+
*/
|
|
6
|
+
export const coreTools = [
|
|
7
|
+
authTool,
|
|
8
|
+
bootstrapTool,
|
|
9
|
+
contextTool,
|
|
10
|
+
projectsTool,
|
|
11
|
+
boardsTool,
|
|
12
|
+
listsTool,
|
|
13
|
+
cardsTool,
|
|
14
|
+
commentsTool,
|
|
15
|
+
tasksTool,
|
|
16
|
+
labelsTool,
|
|
17
|
+
cardMembersTool,
|
|
18
|
+
];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GroupedToolDefinition } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Auth tool - authentication operations
|
|
4
|
+
*/
|
|
5
|
+
export declare const authTool: GroupedToolDefinition;
|
|
6
|
+
/**
|
|
7
|
+
* Projects tool - manages Planka projects
|
|
8
|
+
*/
|
|
9
|
+
export declare const projectsTool: GroupedToolDefinition;
|
|
10
|
+
/**
|
|
11
|
+
* Boards tool - manages boards within projects
|
|
12
|
+
*/
|
|
13
|
+
export declare const boardsTool: GroupedToolDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* Lists tool - manages lists within boards
|
|
16
|
+
*/
|
|
17
|
+
export declare const listsTool: GroupedToolDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* Cards tool - manages cards within lists
|
|
20
|
+
*/
|
|
21
|
+
export declare const cardsTool: GroupedToolDefinition;
|
|
22
|
+
/**
|
|
23
|
+
* Comments tool - manages comments on cards
|
|
24
|
+
*/
|
|
25
|
+
export declare const commentsTool: GroupedToolDefinition;
|
|
26
|
+
/**
|
|
27
|
+
* Tasks tool - manages task lists and tasks on cards
|
|
28
|
+
*/
|
|
29
|
+
export declare const tasksTool: GroupedToolDefinition;
|
|
30
|
+
/**
|
|
31
|
+
* Labels tool - manages labels on boards and cards
|
|
32
|
+
*/
|
|
33
|
+
export declare const labelsTool: GroupedToolDefinition;
|
|
34
|
+
/**
|
|
35
|
+
* Card Members tool - manages card memberships
|
|
36
|
+
*/
|
|
37
|
+
export declare const cardMembersTool: GroupedToolDefinition;
|
|
38
|
+
/**
|
|
39
|
+
* Bootstrap tool - retrieves application initialization data
|
|
40
|
+
*/
|
|
41
|
+
export declare const bootstrapTool: GroupedToolDefinition;
|
|
42
|
+
/**
|
|
43
|
+
* Context tool - selects the working scope (project/board/list/card) so
|
|
44
|
+
* scoped tools default to it instead of repeating ids on every call.
|
|
45
|
+
*/
|
|
46
|
+
export declare const contextTool: GroupedToolDefinition;
|