@hauptsache.net/clickup-mcp 1.2.0 → 1.3.1
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 +30 -36
- package/dist/cli.js +7 -0
- package/dist/clickup-text.d.ts +1 -1
- package/dist/clickup-text.d.ts.map +1 -1
- package/dist/clickup-text.js +17 -13
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -9
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js +34 -5
- package/dist/shared/utils.d.ts +16 -26
- package/dist/shared/utils.d.ts.map +1 -1
- package/dist/shared/utils.js +247 -61
- package/dist/tools/doc-tools.d.ts +4 -0
- package/dist/tools/doc-tools.d.ts.map +1 -0
- package/dist/tools/doc-tools.js +491 -0
- package/dist/tools/list-tools.d.ts.map +1 -1
- package/dist/tools/list-tools.js +4 -0
- package/dist/tools/search-tools.d.ts.map +1 -1
- package/dist/tools/search-tools.js +9 -29
- package/dist/tools/space-tools.d.ts.map +1 -1
- package/dist/tools/space-tools.js +96 -98
- package/dist/tools/task-tools.d.ts.map +1 -1
- package/dist/tools/task-tools.js +3 -1
- package/dist/tools/task-write-tools.d.ts.map +1 -1
- package/dist/tools/task-write-tools.js +6 -0
- package/dist/tools/time-tools.d.ts.map +1 -1
- package/dist/tools/time-tools.js +4 -0
- package/package.json +4 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Marco Pfeiffer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
# ClickUp MCP for AI Assistants
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Model Context Protocol (MCP) server enabling AI assistants to interact with ClickUp workspaces. Get complete task context with comments and images, search across projects, create and update tasks, collaborate through comments, and track time - all through natural language.
|
|
4
4
|
|
|
5
5
|
> **⚠️ Experimental Software Notice**
|
|
6
6
|
> This MCP is experimental and under active development. While implemented with great care to prevent data loss through append-only description updates and other safety measures, it cannot be guaranteed to be completely safe. Please use with caution, especially in production environments. Always test in a non-critical workspace first. 🧪
|
|
7
7
|
|
|
8
|
-
## Two Powerful Use Cases
|
|
9
|
-
|
|
10
|
-
### 🛠️ **For Developers & Agentic Coding**
|
|
11
|
-
Originally built to supercharge coding sessions by providing complete task context to AI coding assistants:
|
|
12
|
-
|
|
13
|
-
- **Instant Requirements**: *"Get task CU-abc123"* → AI gets full requirements, acceptance criteria, comments, and images
|
|
14
|
-
- **Complete Context**: Pass entire task histories to Claude Code, Windsurf, or Cursor for informed development
|
|
15
|
-
- **Visual Specifications**: Include embedded wireframes, mockups, and screenshots in your coding context
|
|
16
|
-
- **Implementation History**: Access all previous discussions and decisions for better code alignment
|
|
17
|
-
|
|
18
|
-
### 📋 **For Project Management & Productivity**
|
|
19
|
-
Extended capabilities for conversational ClickUp management and daily workflow optimization.
|
|
20
|
-
|
|
21
8
|
## What You Can Do
|
|
22
9
|
|
|
23
10
|
Turn natural language into powerful ClickUp actions:
|
|
@@ -49,6 +36,14 @@ Turn natural language into powerful ClickUp actions:
|
|
|
49
36
|
- *"What's the latest update on the database migration?"*
|
|
50
37
|
- *"Add a comment to the design task about the new wireframes"*
|
|
51
38
|
|
|
39
|
+
**Document Management:**
|
|
40
|
+
- *"Find documents about job posting in hauptsache.net space"*
|
|
41
|
+
- *"Search for API documentation across all spaces"*
|
|
42
|
+
- *"Read the API documentation in the development space"*
|
|
43
|
+
- *"Create a new requirements document for the mobile app project"*
|
|
44
|
+
- *"Update the meeting notes with today's decisions"*
|
|
45
|
+
- *"What documents are in the product strategy space?"*
|
|
46
|
+
|
|
52
47
|
## Key Features
|
|
53
48
|
|
|
54
49
|
### 🔍 **Intelligent Search**
|
|
@@ -60,6 +55,7 @@ Turn natural language into powerful ClickUp actions:
|
|
|
60
55
|
- Full comment histories and team discussions
|
|
61
56
|
- Task descriptions with embedded images
|
|
62
57
|
- List descriptions and project guidelines
|
|
58
|
+
- Document content with page navigation
|
|
63
59
|
- Access to complete task history and decisions
|
|
64
60
|
|
|
65
61
|
### ⏱️ **Time Tracking**
|
|
@@ -67,8 +63,9 @@ Turn natural language into powerful ClickUp actions:
|
|
|
67
63
|
- View historical time logs and entries
|
|
68
64
|
- Query time entries by task or date range
|
|
69
65
|
|
|
70
|
-
### 📋 **Task Management**
|
|
66
|
+
### 📋 **Task & Document Management**
|
|
71
67
|
- Create and update tasks with markdown descriptions
|
|
68
|
+
- Create, read, and update documents and pages
|
|
72
69
|
- Add comments and collaborate with team members
|
|
73
70
|
- Manage priorities, due dates, assignees, and tags
|
|
74
71
|
- Handle time estimates and custom field values
|
|
@@ -92,8 +89,7 @@ Turn natural language into powerful ClickUp actions:
|
|
|
92
89
|
"clickup": {
|
|
93
90
|
"command": "npx",
|
|
94
91
|
"args": [
|
|
95
|
-
"-
|
|
96
|
-
"@hauptsache.net/clickup-mcp@1"
|
|
92
|
+
"@hauptsache.net/clickup-mcp@latest"
|
|
97
93
|
],
|
|
98
94
|
"env": {
|
|
99
95
|
"CLICKUP_API_KEY": "your_api_key",
|
|
@@ -119,19 +115,21 @@ The ClickUp MCP supports three operational modes to balance functionality, secur
|
|
|
119
115
|
- **📖 `read`**: Full read-only access for project exploration and workflow understanding
|
|
120
116
|
- **✏️ `write`** (Default): Complete functionality for task management and productivity workflows
|
|
121
117
|
|
|
122
|
-
| Tool
|
|
123
|
-
|
|
124
|
-
| `getTaskById`
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
118
|
+
| Tool | read-minimal | read | write | Description |
|
|
119
|
+
|-------------------|:------------:|:----:|:-----:|-----------------------------------------------------------------------------------------|
|
|
120
|
+
| `getTaskById` | ✅ | ✅ | ✅ | Get complete task details including comments, images, and metadata |
|
|
121
|
+
| `addComment` | ❌ | ❌ | ✅ | Add comments to tasks for collaboration |
|
|
122
|
+
| `updateTask` | ❌ | ❌ | ✅ | Update tasks (status, priority, assignees, etc.) with **SAFE APPEND-ONLY** descriptions |
|
|
123
|
+
| `createTask` | ❌ | ❌ | ✅ | Create new tasks with full markdown support |
|
|
124
|
+
| `searchTasks` | ✅ | ✅ | ✅ | Find tasks by content, keywords, assignees, or project context |
|
|
125
|
+
| `searchSpaces` | ❌ | ✅ | ✅ | Browse workspace structure, project organization, and documents |
|
|
126
|
+
| `getListInfo` | ❌ | ✅ | ✅ | Get list details and available statuses for task creation |
|
|
127
|
+
| `updateListInfo` | ❌ | ❌ | ✅ | **SAFE APPEND-ONLY** updates to list descriptions (preserves existing content) |
|
|
128
|
+
| `getTimeEntries` | ❌ | ✅ | ✅ | View time entries and analyze time spent across projects |
|
|
129
|
+
| `createTimeEntry` | ❌ | ❌ | ✅ | Log time entries for task tracking |
|
|
130
|
+
| `readDocument` | ❌ | ✅ | ✅ | Get document details, page structure, and content with navigation |
|
|
131
|
+
| `searchDocuments` | ❌ | ✅ | ✅ | Search documents by name and space with fuzzy matching and space filtering |
|
|
132
|
+
| `writeDocument` | ❌ | ❌ | ✅ | Universal document and page operations with smart document creation |
|
|
135
133
|
|
|
136
134
|
### Setting the Mode
|
|
137
135
|
|
|
@@ -142,7 +140,7 @@ Add the mode to your MCP configuration:
|
|
|
142
140
|
"mcpServers": {
|
|
143
141
|
"clickup": {
|
|
144
142
|
"command": "npx",
|
|
145
|
-
"args": ["-y", "@hauptsache.net/clickup-mcp@
|
|
143
|
+
"args": ["-y", "@hauptsache.net/clickup-mcp@latest"],
|
|
146
144
|
"env": {
|
|
147
145
|
"CLICKUP_API_KEY": "your_api_key",
|
|
148
146
|
"CLICKUP_TEAM_ID": "your_team_id",
|
|
@@ -157,10 +155,6 @@ Add the mode to your MCP configuration:
|
|
|
157
155
|
|
|
158
156
|
This MCP server can be configured using environment variables:
|
|
159
157
|
|
|
160
|
-
### ⚠️ Breaking Changes for v1.2.0+
|
|
161
|
-
- **Image Response Size Limiting**: A new `MAX_RESPONSE_SIZE_MB` environment variable (default: 1MB) may cause existing tasks with large images to display fewer images than before. To restore previous behavior, set `MAX_RESPONSE_SIZE_MB=10` (or higher) in your environment.
|
|
162
|
-
- **Enhanced API Rate Limiting**: The search indexing now uses more conservative API call patterns to prevent rate limit exhaustion. Large workspaces may experience slightly slower initial search index building.
|
|
163
|
-
|
|
164
158
|
- `CLICKUP_API_KEY`: (Required) Your ClickUp API key.
|
|
165
159
|
- `CLICKUP_TEAM_ID`: (Required) Your ClickUp Team ID (formerly Workspace ID).
|
|
166
160
|
- `CLICKUP_MCP_MODE`: (Optional) Controls which tools are available. Options: `read-minimal`, `read`, `write` (default).
|
|
@@ -237,4 +231,4 @@ These limitations ensure reliable performance while covering the most common use
|
|
|
237
231
|
|
|
238
232
|
## License
|
|
239
233
|
|
|
240
|
-
|
|
234
|
+
MIT
|
package/dist/cli.js
CHANGED
|
@@ -7,8 +7,15 @@ async function main() {
|
|
|
7
7
|
// Wait for server initialization to complete
|
|
8
8
|
const server = await index_1.serverPromise;
|
|
9
9
|
const args = process.argv.slice(2);
|
|
10
|
+
// Special command to show instructions
|
|
11
|
+
if (args.length === 1 && args[0] === 'instructions') {
|
|
12
|
+
console.log("Server Instructions:");
|
|
13
|
+
console.log(server.server._instructions || "No instructions configured");
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
10
16
|
if (args.length < 1) {
|
|
11
17
|
console.error("Usage: npm run cli <tool-name> [param1=value1 param2=value2 ...]");
|
|
18
|
+
console.error(" npm run cli instructions");
|
|
12
19
|
console.error("\nAvailable tools:");
|
|
13
20
|
// @ts-ignore - Accessing private property for testing purposes
|
|
14
21
|
const tools = server._registeredTools;
|
package/dist/clickup-text.d.ts
CHANGED
|
@@ -44,5 +44,5 @@ export declare function processClickUpText(textItems: ClickUpTextItem[]): Promis
|
|
|
44
44
|
* @param attachments Array of attachments from the Clickup API
|
|
45
45
|
* @returns Array of content blocks (text and images)
|
|
46
46
|
*/
|
|
47
|
-
export declare function processClickUpMarkdown(markdownText: string, attachments: ClickUpAttachment[]): (CallToolResult["content"][number] | ImageMetadataBlock)[];
|
|
47
|
+
export declare function processClickUpMarkdown(markdownText: string, attachments: ClickUpAttachment[] | null | undefined): (CallToolResult["content"][number] | ImageMetadataBlock)[];
|
|
48
48
|
//# sourceMappingURL=clickup-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clickup-text.d.ts","sourceRoot":"","sources":["../src/clickup-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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,EAAE,CAyG5D"}
|
package/dist/clickup-text.js
CHANGED
|
@@ -97,8 +97,10 @@ function processClickUpMarkdown(markdownText, attachments) {
|
|
|
97
97
|
let currentTextBlock = "";
|
|
98
98
|
// Create a map of attachment URLs to their full info for easy lookup
|
|
99
99
|
const attachmentMap = new Map();
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
if (attachments && Array.isArray(attachments)) {
|
|
101
|
+
for (const attachment of attachments) {
|
|
102
|
+
attachmentMap.set(attachment.url, attachment);
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
// Regular expression to match markdown image syntax: 
|
|
104
106
|
const imageRegex = /!\[([^\]]*)\]\(([^\)]+)\)/g;
|
|
@@ -152,17 +154,19 @@ function processClickUpMarkdown(markdownText, attachments) {
|
|
|
152
154
|
referencedUrls.add(match[2]);
|
|
153
155
|
}
|
|
154
156
|
// Add non-image files inline to the current text block
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
157
|
+
if (attachments && Array.isArray(attachments)) {
|
|
158
|
+
for (const attachment of attachments) {
|
|
159
|
+
if (!referencedUrls.has(attachment.url)) {
|
|
160
|
+
// Determine if this is an image based on URL or type
|
|
161
|
+
const isImage = attachment.thumbnail_large ||
|
|
162
|
+
/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(attachment.url);
|
|
163
|
+
if (!isImage) {
|
|
164
|
+
// This is a non-image file - add inline to current text block
|
|
165
|
+
const fileName = extractFileNameFromUrl(attachment.url) || "file";
|
|
166
|
+
const fileType = extractFileTypeFromUrl(attachment.url);
|
|
167
|
+
const fileTypeText = fileType ? ` (${fileType.toUpperCase()})` : "";
|
|
168
|
+
currentTextBlock += `\nFile: ${fileName}${fileTypeText} - ${attachment.url}`;
|
|
169
|
+
}
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
declare const server: McpServer;
|
|
4
3
|
declare const serverPromise: Promise<McpServer>;
|
|
5
|
-
export {
|
|
4
|
+
export { serverPromise };
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiIpE,QAAA,MAAM,aAAa,oBAAqB,CAAC;AAIzC,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.serverPromise =
|
|
4
|
+
exports.serverPromise = void 0;
|
|
5
5
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
6
6
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
7
7
|
const config_1 = require("./shared/config");
|
|
@@ -13,18 +13,79 @@ const search_tools_1 = require("./tools/search-tools");
|
|
|
13
13
|
const space_tools_1 = require("./tools/space-tools");
|
|
14
14
|
const list_tools_1 = require("./tools/list-tools");
|
|
15
15
|
const time_tools_1 = require("./tools/time-tools");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
version: require('../package.json').version,
|
|
20
|
-
});
|
|
21
|
-
exports.server = server;
|
|
16
|
+
const doc_tools_1 = require("./tools/doc-tools");
|
|
17
|
+
// Create server variable that will be initialized later
|
|
18
|
+
let server;
|
|
22
19
|
// Register tools based on mode with user data for enhanced documentation
|
|
23
20
|
async function initializeServer() {
|
|
24
21
|
console.error(`Starting ClickUp MCP in ${config_1.CONFIG.mode} mode`);
|
|
25
|
-
// Fetch current user for enhanced tool documentation and API health check
|
|
26
|
-
const userData = await
|
|
22
|
+
// Fetch current user and spaces for enhanced tool documentation and API health check
|
|
23
|
+
const [userData, spacesIndex] = await Promise.all([
|
|
24
|
+
(0, utils_1.getCurrentUser)(),
|
|
25
|
+
(0, utils_1.getSpaceSearchIndex)()
|
|
26
|
+
]);
|
|
27
|
+
const spaces = spacesIndex._docs || [];
|
|
27
28
|
console.error(`Connected as: ${userData.user.username} (${userData.user.email})`);
|
|
29
|
+
// Filter out archived spaces and format as simple list
|
|
30
|
+
const activeSpaces = spaces.filter((s) => !s.archived);
|
|
31
|
+
const formattedSpaces = activeSpaces
|
|
32
|
+
.map((s) => `- ${s.name} (space_id: ${s.id})`)
|
|
33
|
+
.join('\n');
|
|
34
|
+
const instructions = [
|
|
35
|
+
`ClickUp is a Ticket system. It is used to track tasks, bugs, and other work items.`,
|
|
36
|
+
`Is you are asked for infos about projects or tasks, search for tasks or documents in ClickUp (this MCP) first.`,
|
|
37
|
+
`The following spaces/projects are available:`,
|
|
38
|
+
formattedSpaces
|
|
39
|
+
].join('\n');
|
|
40
|
+
console.error(`Pre-loaded ${activeSpaces.length} active spaces`);
|
|
41
|
+
// Create the MCP server with instructions
|
|
42
|
+
server = new mcp_js_1.McpServer({
|
|
43
|
+
name: "Clickup MCP",
|
|
44
|
+
version: require('../package.json').version,
|
|
45
|
+
}, {
|
|
46
|
+
instructions
|
|
47
|
+
});
|
|
48
|
+
// Register prompts
|
|
49
|
+
const lang = config_1.CONFIG.primaryLanguageHint === 'de' ? 'de' : 'en';
|
|
50
|
+
// Register "my-todos" prompt
|
|
51
|
+
server.registerPrompt("my-todos", {
|
|
52
|
+
title: lang === 'de' ? "Meine TODOs" : "My TODOs",
|
|
53
|
+
description: lang === 'de'
|
|
54
|
+
? "Meine aktuellen TODO-Aufgaben aus ClickUp abrufen und nach Priorität kategorisiert analysieren"
|
|
55
|
+
: "Get and analyze my current TODO tasks from ClickUp, categorized by priority",
|
|
56
|
+
argsSchema: {}
|
|
57
|
+
}, () => {
|
|
58
|
+
const messages = [{
|
|
59
|
+
role: "user",
|
|
60
|
+
content: {
|
|
61
|
+
type: "text",
|
|
62
|
+
text: lang === 'de'
|
|
63
|
+
? `Kannst du in ClickUp nachsehen, was meine aktuellen TODOs sind? Bitte suche nach allen offenen Aufgaben, die mir zugewiesen sind, analysiere deren Inhalt und kategorisiere sie nach erkennbarer Priorität (dringend, hoch, normal, niedrig). Für jede Kategorie gib eine kurze Zusammenfassung dessen, was getan werden muss und hebe Fälligkeitstermine oder wichtige Details aus den Aufgabenbeschreibungen hervor.
|
|
64
|
+
|
|
65
|
+
Bitte strukturiere deine Antwort mit:
|
|
66
|
+
1. **Zusammenfassung**: Gesamtanzahl der Aufgaben und allgemeine Prioritätsverteilung
|
|
67
|
+
2. **Dringende Aufgaben**: Aufgaben, die sofortige Aufmerksamkeit benötigen (heute fällig, überfällig oder als dringend markiert)
|
|
68
|
+
3. **Hohe Priorität**: Wichtige Aufgaben, die bald erledigt werden sollten
|
|
69
|
+
4. **Normale Priorität**: Regelmäßige Aufgaben, die später geplant werden können
|
|
70
|
+
5. **Niedrige Priorität**: Aufgaben, die erledigt werden können, wenn Zeit vorhanden ist
|
|
71
|
+
6. **Empfehlungen**: Vorgeschlagene Maßnahmen oder Prioritäten für den kommenden Zeitraum
|
|
72
|
+
|
|
73
|
+
Verwende die ClickUp-Suchtools, um mir zugewiesene Aufgaben zu finden, und hole detaillierte Informationen über die wichtigsten mit getTaskById.`
|
|
74
|
+
: `Can you look into ClickUp and check what my current TODO's are? Please search for all open tasks assigned to me, analyze their content, and categorize them by apparent priority (urgent, high, normal, low). For each category, provide a brief summary of what needs to be done and highlight any due dates or important details from the task descriptions.
|
|
75
|
+
|
|
76
|
+
Please structure your response with:
|
|
77
|
+
1. **Summary**: Total number of tasks and overall priority distribution
|
|
78
|
+
2. **Urgent Tasks**: Tasks that need immediate attention (due today, overdue, or marked as urgent)
|
|
79
|
+
3. **High Priority**: Important tasks that should be addressed soon
|
|
80
|
+
4. **Normal Priority**: Regular tasks that can be scheduled for later
|
|
81
|
+
5. **Low Priority**: Tasks that can be done when time permits
|
|
82
|
+
6. **Recommendations**: Suggested actions or priorities for the upcoming period
|
|
83
|
+
|
|
84
|
+
Use the ClickUp search tools to find tasks assigned to me, and get detailed information about the most important ones using getTaskById.`
|
|
85
|
+
}
|
|
86
|
+
}];
|
|
87
|
+
return { messages };
|
|
88
|
+
});
|
|
28
89
|
if (config_1.CONFIG.mode === 'read-minimal') {
|
|
29
90
|
// Core task context tools for AI coding assistance
|
|
30
91
|
// Only getTaskById and searchTasks
|
|
@@ -38,6 +99,7 @@ async function initializeServer() {
|
|
|
38
99
|
(0, space_tools_1.registerSpaceTools)(server);
|
|
39
100
|
(0, list_tools_1.registerListToolsRead)(server);
|
|
40
101
|
(0, time_tools_1.registerTimeToolsRead)(server);
|
|
102
|
+
(0, doc_tools_1.registerDocumentToolsRead)(server);
|
|
41
103
|
}
|
|
42
104
|
else if (config_1.CONFIG.mode === 'write') {
|
|
43
105
|
// All tools (full functionality)
|
|
@@ -49,6 +111,8 @@ async function initializeServer() {
|
|
|
49
111
|
(0, list_tools_1.registerListToolsWrite)(server);
|
|
50
112
|
(0, time_tools_1.registerTimeToolsRead)(server);
|
|
51
113
|
(0, time_tools_1.registerTimeToolsWrite)(server);
|
|
114
|
+
(0, doc_tools_1.registerDocumentToolsRead)(server);
|
|
115
|
+
(0, doc_tools_1.registerDocumentToolsWrite)(server);
|
|
52
116
|
}
|
|
53
117
|
return server;
|
|
54
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/shared/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/shared/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAA2D,CAAC;AAkDvF,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAUxD,eAAO,MAAM,MAAM;;;;;;;CAOlB,CAAC"}
|
package/dist/shared/config.js
CHANGED
|
@@ -3,13 +3,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CONFIG = exports.rawPrimaryLang = void 0;
|
|
4
4
|
exports.rawPrimaryLang = process.env.CLICKUP_PRIMARY_LANGUAGE || process.env.LANG;
|
|
5
5
|
let detectedLanguageHint = undefined;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Enhanced language detection that handles various formats and common language names
|
|
8
|
+
*/
|
|
9
|
+
function detectLanguage(rawLang) {
|
|
10
|
+
if (!rawLang)
|
|
11
|
+
return undefined;
|
|
12
|
+
const normalizedLang = rawLang.toLowerCase().trim();
|
|
13
|
+
// German language detection
|
|
14
|
+
if (normalizedLang === 'de' || normalizedLang === 'german' || normalizedLang === 'deutsch' || normalizedLang.startsWith('de_') || normalizedLang.startsWith('de-')) {
|
|
15
|
+
return 'de';
|
|
16
|
+
}
|
|
17
|
+
// English language detection
|
|
18
|
+
if (normalizedLang === 'en' || normalizedLang === 'english' || normalizedLang.startsWith('en_') || normalizedLang.startsWith('en-')) {
|
|
19
|
+
return 'en';
|
|
20
|
+
}
|
|
21
|
+
// French language detection
|
|
22
|
+
if (normalizedLang === 'fr' || normalizedLang === 'french' || normalizedLang === 'français' || normalizedLang.startsWith('fr_') || normalizedLang.startsWith('fr-')) {
|
|
23
|
+
return 'fr';
|
|
24
|
+
}
|
|
25
|
+
// Spanish language detection
|
|
26
|
+
if (normalizedLang === 'es' || normalizedLang === 'spanish' || normalizedLang === 'español' || normalizedLang.startsWith('es_') || normalizedLang.startsWith('es-')) {
|
|
27
|
+
return 'es';
|
|
28
|
+
}
|
|
29
|
+
// Italian language detection
|
|
30
|
+
if (normalizedLang === 'it' || normalizedLang === 'italian' || normalizedLang === 'italiano' || normalizedLang.startsWith('it_') || normalizedLang.startsWith('it-')) {
|
|
31
|
+
return 'it';
|
|
32
|
+
}
|
|
33
|
+
// Fallback: extract the primary language part (e.g., 'en' from 'en_US.UTF-8' or 'en-GB')
|
|
34
|
+
const langPart = normalizedLang.match(/^[a-zA-Z]{2,3}/);
|
|
10
35
|
if (langPart) {
|
|
11
|
-
|
|
36
|
+
return langPart[0].toLowerCase();
|
|
12
37
|
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if (exports.rawPrimaryLang) {
|
|
41
|
+
detectedLanguageHint = detectLanguage(exports.rawPrimaryLang);
|
|
13
42
|
}
|
|
14
43
|
const rawMode = process.env.CLICKUP_MCP_MODE?.toLowerCase();
|
|
15
44
|
let mcpMode = 'write'; // Default to write (full functionality)
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -36,46 +36,36 @@ export declare function generateSpaceUrl(spaceId: string): string;
|
|
|
36
36
|
*/
|
|
37
37
|
export declare function generateFolderUrl(folderId: string): string;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Generate a ClickUp document URL from a document ID and optional page ID
|
|
40
40
|
*/
|
|
41
|
-
export declare function
|
|
42
|
-
/**
|
|
43
|
-
* Format a ClickUp list link as markdown
|
|
44
|
-
*/
|
|
45
|
-
export declare function formatListLink(listId: string, listName?: string): string;
|
|
46
|
-
/**
|
|
47
|
-
* Format a ClickUp space link as markdown
|
|
48
|
-
*/
|
|
49
|
-
export declare function formatSpaceLink(spaceId: string, spaceName?: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Extract task ID from a ClickUp URL
|
|
52
|
-
*/
|
|
53
|
-
export declare function extractTaskIdFromUrl(url: string): string | null;
|
|
54
|
-
/**
|
|
55
|
-
* Validate if a string is a valid ClickUp URL
|
|
56
|
-
*/
|
|
57
|
-
export declare function isClickUpUrl(url: string): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Format a prominent link section for responses
|
|
60
|
-
*/
|
|
61
|
-
export declare function formatLinksSection(links: {
|
|
62
|
-
text: string;
|
|
63
|
-
url: string;
|
|
64
|
-
}[]): string;
|
|
41
|
+
export declare function generateDocumentUrl(docId: string, pageId?: string): string;
|
|
65
42
|
/**
|
|
66
43
|
* Get or refresh the space search index
|
|
67
44
|
* Caches promise to prevent race conditions on concurrent calls
|
|
68
45
|
*/
|
|
69
46
|
export declare function getSpaceSearchIndex(): Promise<Fuse<any> | null>;
|
|
70
47
|
/**
|
|
71
|
-
* Get lists and
|
|
48
|
+
* Get lists, folders, and documents for a specific space with caching
|
|
72
49
|
*/
|
|
73
50
|
export declare function getSpaceContent(spaceId: string): Promise<{
|
|
74
51
|
lists: any[];
|
|
75
52
|
folders: any[];
|
|
53
|
+
documents: any[];
|
|
76
54
|
}>;
|
|
77
55
|
/**
|
|
78
56
|
* Gets all team members from ClickUp API with caching
|
|
79
57
|
*/
|
|
80
58
|
export declare function getAllTeamMembers(): Promise<string[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Get or create a document search index with space name resolution
|
|
61
|
+
* Caches promises to prevent race conditions on concurrent calls
|
|
62
|
+
*/
|
|
63
|
+
export declare function getDocumentSearchIndex(space_ids?: string[]): Promise<Fuse<any> | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Performs multi-term search with aggressive boosting for items matching multiple terms
|
|
66
|
+
* @param searchIndex Fuse search index to search within
|
|
67
|
+
* @param terms Array of search terms
|
|
68
|
+
* @returns Array of items sorted by relevance (multi-term matches ranked higher)
|
|
69
|
+
*/
|
|
70
|
+
export declare function performMultiTermSearch<T>(searchIndex: Fuse<T>, terms: string[]): Promise<T[]>;
|
|
81
71
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,SAAS,CAAC;AAI3B;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG7C;AAKD;;;GAGG;AACH,wBAAsB,cAAc,iBA6BnC;AAGD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA0B7D;AAKD;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,SAAS,CAAC,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CA+B3B;AAkED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAK1E;AAKD;;;GAGG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI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