@taazkareem/clickup-mcp-server 0.4.42 → 0.4.44

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.
@@ -23,3 +23,66 @@ export async function handleAnalyzeTaskPriorities(clickup, teamId) {
23
23
  }
24
24
  return output;
25
25
  }
26
+ export async function handleGenerateDescription(clickup, taskId) {
27
+ try {
28
+ const task = await clickup.getTask(taskId);
29
+ // Generate a structured description based on task properties
30
+ let description = "# Task Description\n\n";
31
+ // Basic Information
32
+ description += "## Overview\n";
33
+ description += `${task.name}\n\n`;
34
+ // Status and Priority
35
+ description += "## Status & Priority\n";
36
+ description += `- Status: ${task.status?.status || 'Not set'}\n`;
37
+ description += `- Priority: ${task.priority?.priority || 'Not set'}\n\n`;
38
+ // Time Information
39
+ description += "## Timeline\n";
40
+ description += `- Created: ${new Date(task.date_created).toLocaleDateString()}\n`;
41
+ if (task.due_date) {
42
+ description += `- Due Date: ${new Date(task.due_date).toLocaleDateString()}\n`;
43
+ }
44
+ description += "\n";
45
+ // Dependencies and Relationships
46
+ description += "## Dependencies & Relationships\n";
47
+ const dependencies = task.dependencies || [];
48
+ if (dependencies.length > 0) {
49
+ description += "### Dependencies:\n";
50
+ dependencies.forEach(dep => {
51
+ description += `- ${dep.task_id}\n`;
52
+ });
53
+ }
54
+ else {
55
+ description += "No dependencies identified.\n";
56
+ }
57
+ description += "\n";
58
+ // Success Criteria
59
+ description += "## Success Criteria\n";
60
+ const checkList = task.check_list || [];
61
+ if (checkList.length > 0) {
62
+ checkList.forEach(item => {
63
+ description += `- [ ] ${item.name}\n`;
64
+ });
65
+ }
66
+ else {
67
+ description += "- Task completion requirements to be defined\n";
68
+ }
69
+ description += "\n";
70
+ // Resources
71
+ description += "## Required Resources\n";
72
+ const assignees = task.assignees || [];
73
+ if (assignees.length > 0) {
74
+ description += "### Assigned Team Members:\n";
75
+ assignees.forEach(assignee => {
76
+ description += `- ${assignee.username}\n`;
77
+ });
78
+ }
79
+ else {
80
+ description += "No team members assigned yet.\n";
81
+ }
82
+ return description;
83
+ }
84
+ catch (error) {
85
+ console.error('Error generating description:', error);
86
+ throw error;
87
+ }
88
+ }
package/build/index.js CHANGED
@@ -5,7 +5,7 @@ import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSche
5
5
  import { ClickUpService } from "./services/clickup.js";
6
6
  import config from "./config.js";
7
7
  import { handleWorkspaceHierarchy, handleCreateTask } from "./handlers/tools.js";
8
- import { handleSummarizeTasks, handleAnalyzeTaskPriorities } from "./handlers/prompts.js";
8
+ import { handleSummarizeTasks, handleAnalyzeTaskPriorities, handleGenerateDescription } from "./handlers/prompts.js";
9
9
  import { getAllTasks } from "./utils/resolvers.js";
10
10
  console.log('Server starting up...');
11
11
  console.log('Config loaded:', {
@@ -27,310 +27,75 @@ console.log('Creating MCP server...');
27
27
  const server = new Server({
28
28
  name: "clickup",
29
29
  version: "0.1.0",
30
+ description: "ClickUp MCP Server"
30
31
  }, {
31
32
  capabilities: {
32
33
  resources: {
33
- list: true,
34
- read: true,
34
+ schemes: ["clickup"],
35
+ canList: true,
36
+ canRead: true
35
37
  },
36
38
  tools: {
37
- workspace_hierarchy: {
38
- description: "List complete hierarchy of the ClickUp workspace",
39
- inputSchema: {
40
- type: "object",
41
- properties: {},
42
- required: []
43
- }
44
- },
45
- create_task: {
46
- description: "Create a new task in ClickUp",
47
- inputSchema: {
48
- type: "object",
49
- properties: {
50
- listId: {
51
- type: "string",
52
- description: "ID of the list to create the task in (optional if listName is provided)"
53
- },
54
- listName: {
55
- type: "string",
56
- description: "Name of the list to create the task in (optional if listId is provided)"
57
- },
58
- name: {
59
- type: "string",
60
- description: "Name of the task"
61
- },
62
- description: {
63
- type: "string",
64
- description: "Description of the task"
65
- },
66
- status: {
67
- type: "string",
68
- description: "Status of the task"
69
- },
70
- priority: {
71
- type: "number",
72
- description: "Priority of the task (1-4)"
73
- },
74
- dueDate: {
75
- type: "string",
76
- description: "Due date of the task (ISO string)"
77
- }
78
- },
79
- required: ["name"]
80
- }
81
- },
82
- create_bulk_tasks: {
83
- description: "Create multiple tasks in a ClickUp list",
84
- inputSchema: {
85
- type: "object",
86
- properties: {
87
- listId: {
88
- type: "string",
89
- description: "ID of the list to create the tasks in (optional if listName is provided)"
90
- },
91
- listName: {
92
- type: "string",
93
- description: "Name of the list to create the tasks in (optional if listId is provided)"
94
- },
95
- tasks: {
96
- type: "array",
97
- description: "Array of tasks to create",
98
- items: {
99
- type: "object",
100
- properties: {
101
- name: {
102
- type: "string",
103
- description: "Name of the task"
104
- },
105
- description: {
106
- type: "string",
107
- description: "Description of the task"
108
- },
109
- status: {
110
- type: "string",
111
- description: "Status of the task"
112
- },
113
- priority: {
114
- type: "number",
115
- description: "Priority level (1-4)"
116
- },
117
- dueDate: {
118
- type: "string",
119
- description: "Due date (ISO string)"
120
- },
121
- assignees: {
122
- type: "array",
123
- items: {
124
- type: "number"
125
- },
126
- description: "Array of user IDs to assign to the task"
127
- }
128
- },
129
- required: ["name"]
130
- }
131
- }
132
- },
133
- required: ["tasks"]
134
- }
135
- },
136
- create_list: {
137
- description: "Create a new list in a ClickUp space",
138
- inputSchema: {
139
- type: "object",
140
- properties: {
141
- spaceId: {
142
- type: "string",
143
- description: "ID of the space to create the list in (optional if spaceName is provided)"
144
- },
145
- spaceName: {
146
- type: "string",
147
- description: "Name of the space to create the list in (optional if spaceId is provided)"
148
- },
149
- name: {
150
- type: "string",
151
- description: "Name of the list"
152
- },
153
- content: {
154
- type: "string",
155
- description: "Description or content of the list"
156
- },
157
- dueDate: {
158
- type: "string",
159
- description: "Due date for the list (ISO string)"
160
- },
161
- priority: {
162
- type: "number",
163
- description: "Priority of the list (1-4)"
164
- },
165
- assignee: {
166
- type: "number",
167
- description: "User ID to assign the list to"
168
- },
169
- status: {
170
- type: "string",
171
- description: "Status of the list"
172
- }
173
- },
174
- required: ["name"]
175
- }
176
- },
177
- create_folder: {
178
- description: "Create a new folder in a ClickUp space",
179
- inputSchema: {
180
- type: "object",
181
- properties: {
182
- spaceId: {
183
- type: "string",
184
- description: "ID of the space to create the folder in (optional if spaceName is provided)"
185
- },
186
- spaceName: {
187
- type: "string",
188
- description: "Name of the space to create the folder in (optional if spaceId is provided)"
189
- },
190
- name: {
191
- type: "string",
192
- description: "Name of the folder"
193
- },
194
- override_statuses: {
195
- type: "boolean",
196
- description: "Whether to override space statuses"
197
- }
198
- },
199
- required: ["name"]
200
- }
201
- },
202
- create_list_in_folder: {
203
- description: "Create a new list in a ClickUp folder",
204
- inputSchema: {
205
- type: "object",
206
- properties: {
207
- folderId: {
208
- type: "string",
209
- description: "ID of the folder to create the list in (optional if folderName and spaceId/spaceName are provided)"
210
- },
211
- folderName: {
212
- type: "string",
213
- description: "Name of the folder to create the list in"
214
- },
215
- spaceId: {
216
- type: "string",
217
- description: "ID of the space containing the folder (required if using folderName)"
218
- },
219
- spaceName: {
220
- type: "string",
221
- description: "Name of the space containing the folder (alternative to spaceId)"
222
- },
223
- name: {
224
- type: "string",
225
- description: "Name of the list"
226
- },
227
- content: {
228
- type: "string",
229
- description: "Description or content of the list"
230
- },
231
- status: {
232
- type: "string",
233
- description: "Status of the list"
234
- }
235
- },
236
- required: ["name"]
237
- }
238
- },
239
- move_task: {
240
- description: "Move a task to a different list",
241
- inputSchema: {
242
- type: "object",
243
- properties: {
244
- taskId: {
245
- type: "string",
246
- description: "ID of the task to move"
247
- },
248
- listId: {
249
- type: "string",
250
- description: "ID of the destination list (optional if listName is provided)"
251
- },
252
- listName: {
253
- type: "string",
254
- description: "Name of the destination list (optional if listId is provided)"
255
- }
256
- },
257
- required: ["taskId"]
258
- }
259
- },
260
- duplicate_task: {
261
- description: "Duplicate a task to a list",
262
- inputSchema: {
263
- type: "object",
264
- properties: {
265
- taskId: {
266
- type: "string",
267
- description: "ID of the task to duplicate"
268
- },
269
- listId: {
270
- type: "string",
271
- description: "ID of the destination list (optional if listName is provided)"
272
- },
273
- listName: {
274
- type: "string",
275
- description: "Name of the destination list (optional if listId is provided)"
276
- }
277
- },
278
- required: ["taskId"]
279
- }
280
- },
281
- update_task: {
282
- description: "Update an existing task in ClickUp",
283
- inputSchema: {
284
- type: "object",
285
- properties: {
286
- taskId: {
287
- type: "string",
288
- description: "ID of the task to update"
289
- },
290
- name: {
291
- type: "string",
292
- description: "New name of the task"
293
- },
294
- description: {
295
- type: "string",
296
- description: "New description of the task"
297
- },
298
- status: {
299
- type: "string",
300
- description: "New status of the task"
301
- },
302
- priority: {
303
- type: "number",
304
- description: "New priority of the task (1-4)"
305
- },
306
- dueDate: {
307
- type: "string",
308
- description: "New due date of the task (ISO string)"
309
- }
310
- },
311
- required: ["taskId"]
312
- }
313
- }
39
+ canList: true,
40
+ canExecute: true,
41
+ tools: [
42
+ {
43
+ name: "workspace_hierarchy",
44
+ description: "List complete hierarchy of the ClickUp workspace"
45
+ },
46
+ {
47
+ name: "create_task",
48
+ description: "Create a new task in ClickUp"
49
+ },
50
+ {
51
+ name: "create_bulk_tasks",
52
+ description: "Create multiple tasks in a ClickUp list"
53
+ },
54
+ {
55
+ name: "create_list",
56
+ description: "Create a new list in a ClickUp space"
57
+ },
58
+ {
59
+ name: "create_folder",
60
+ description: "Create a new folder in a ClickUp space"
61
+ },
62
+ {
63
+ name: "create_list_in_folder",
64
+ description: "Create a new list in a ClickUp folder"
65
+ },
66
+ {
67
+ name: "move_task",
68
+ description: "Move a task to a different list"
69
+ },
70
+ {
71
+ name: "duplicate_task",
72
+ description: "Duplicate a task to a list"
73
+ },
74
+ {
75
+ name: "update_task",
76
+ description: "Update an existing task in ClickUp"
77
+ }
78
+ ]
314
79
  },
315
80
  prompts: {
316
- summarize_tasks: {
317
- description: "Summarize tasks in the workspace",
318
- inputSchema: {
319
- type: "object",
320
- properties: {},
321
- required: []
322
- }
323
- },
324
- analyze_priorities: {
325
- description: "Analyze task priorities",
326
- inputSchema: {
327
- type: "object",
328
- properties: {},
329
- required: []
330
- }
331
- }
332
- },
333
- },
81
+ canList: true,
82
+ canExecute: true,
83
+ prompts: [
84
+ {
85
+ name: "summarize_tasks",
86
+ description: "Summarize all ClickUp tasks"
87
+ },
88
+ {
89
+ name: "analyze_task_priorities",
90
+ description: "Analyze task priorities"
91
+ },
92
+ {
93
+ name: "generate_description",
94
+ description: "Generate a detailed task description with objectives, success criteria, resources, and dependencies"
95
+ }
96
+ ]
97
+ }
98
+ }
334
99
  });
335
100
  console.log('MCP server created');
336
101
  /**
@@ -883,12 +648,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
883
648
  if (!args.taskId) {
884
649
  throw new Error("taskId is required");
885
650
  }
651
+ const dueDate = args.due_date ? new Date(args.due_date).getTime() : undefined;
886
652
  const task = await clickup.updateTask(args.taskId, {
887
653
  name: args.name,
888
654
  description: args.description,
889
655
  status: args.status,
890
656
  priority: args.priority,
891
- due_date: args.due_date
657
+ due_date: dueDate
892
658
  });
893
659
  return {
894
660
  content: [{
@@ -919,6 +685,10 @@ server.setRequestHandler(ListPromptsRequestSchema, async () => {
919
685
  {
920
686
  name: "analyze_task_priorities",
921
687
  description: "Analyze task priorities"
688
+ },
689
+ {
690
+ name: "generate_description",
691
+ description: "Generate a detailed task description with objectives, success criteria, resources, and dependencies"
922
692
  }
923
693
  ]
924
694
  };
@@ -947,6 +717,18 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
947
717
  }]
948
718
  };
949
719
  }
720
+ case "generate_description": {
721
+ if (!request.params.arguments?.taskId) {
722
+ throw new Error("taskId is required for generate_description prompt");
723
+ }
724
+ const output = await handleGenerateDescription(clickup, request.params.arguments.taskId);
725
+ return {
726
+ content: [{
727
+ type: "text",
728
+ text: output
729
+ }]
730
+ };
731
+ }
950
732
  default:
951
733
  throw new Error("Prompt not found");
952
734
  }
@@ -956,37 +738,24 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
956
738
  throw error;
957
739
  }
958
740
  });
959
- if (process.argv.includes('--stdio')) {
960
- console.log('Starting server in stdio mode...');
961
- // Set up stdio transport
962
- const transport = new StdioServerTransport();
963
- // Connect server with better error handling
964
- server.connect(transport)
965
- .then(() => {
966
- console.log('Server connected successfully to stdio transport');
967
- // Keep the process alive
968
- process.stdin.resume();
969
- // Handle process termination
970
- process.on('SIGINT', () => {
971
- console.log('Received SIGINT. Shutting down...');
972
- transport.close();
973
- process.exit(0);
974
- });
975
- process.on('SIGTERM', () => {
976
- console.log('Received SIGTERM. Shutting down...');
977
- transport.close();
978
- process.exit(0);
979
- });
980
- })
981
- .catch(error => {
982
- console.error('Failed to connect server to transport:', error);
983
- process.exit(1);
984
- });
985
- }
986
- else {
987
- console.log('Starting server in standard mode...');
988
- // Add your non-stdio server initialization here if needed
989
- }
741
+ // Start the server
742
+ console.log('Setting up transport...');
743
+ const transport = new StdioServerTransport();
744
+ // Connect the server to the transport
745
+ console.log('Connecting server to transport...');
746
+ server.connect(transport).catch(error => {
747
+ console.error('Error connecting server to transport:', error);
748
+ process.exit(1);
749
+ });
750
+ // Handle process signals
751
+ process.on('SIGINT', () => {
752
+ console.log('Received SIGINT. Shutting down...');
753
+ transport.close();
754
+ });
755
+ process.on('SIGTERM', () => {
756
+ console.log('Received SIGTERM. Shutting down...');
757
+ transport.close();
758
+ });
990
759
  // Prevent unhandled promise rejections from crashing the server
991
760
  process.on('unhandledRejection', (error) => {
992
761
  console.error('Unhandled promise rejection:', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taazkareem/clickup-mcp-server",
3
- "version": "0.4.42",
3
+ "version": "0.4.44",
4
4
  "description": "ClickUp MCP Server - Integrate ClickUp tasks with AI through Model Context Protocol",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",