@hauptsache.net/clickup-mcp 1.6.2 → 1.7.2

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/README.md CHANGED
@@ -11,7 +11,7 @@ Model Context Protocol (MCP) server enabling AI assistants to interact with Clic
11
11
  | **Setup** | Local npm/npx install | Remote MCP (no install) |
12
12
  | **Authentication** | API key only | OAuth only |
13
13
  | **Task Context** | Complete with comments, status history, inline images | Requires mutiple tool calls for full contxt |
14
- | **Image Support** | Inline images with smart size budgeting | Not documented |
14
+ | **Image Support** | Read and write: inline images with smart size budgeting, and `![](local/path.png)` uploads automatically | Upload via separate tool calls; base64 capped at ~200KB |
15
15
  | **Search** | Fuzzy search on recent tasks (limited scope) | Full ClickUp search database |
16
16
  | **Documents** | CRUD operations | CRUD + document search |
17
17
  | **Time Tracking** | View and create entries | Timers and entries |
@@ -22,6 +22,7 @@ Model Context Protocol (MCP) server enabling AI assistants to interact with Clic
22
22
 
23
23
  **Choose this MCP when:**
24
24
  - You need rich task context with inline images for AI coding tools
25
+ - You want to write screenshots into tickets by local file path (running locally, it reads the file itself instead of taking base64)
25
26
  - You need API key authentication for automation or CI/CD pipelines
26
27
  - You want the `read-minimal` mode optimized for development workflows
27
28
 
@@ -187,6 +188,7 @@ The ClickUp MCP supports three operational modes to balance functionality, secur
187
188
  |------------------------|:------------:|:----:|:-----:|-----------------------------------------------------------------------------------------|
188
189
  | `getTaskById` | ✅ | ✅ | ✅ | Get complete task details including comments, images, and metadata |
189
190
  | `addComment` | ❌ | ❌ | ✅ | Add comments to tasks for collaboration |
191
+ | `editComment` | ❌ | ❌ | ✅ | Correct your own comment within 24h instead of posting a follow-up |
190
192
  | `updateTask` | ❌ | ❌ | ✅ | Update tasks (status, priority, assignees, etc.) with **SAFE APPEND-ONLY** descriptions |
191
193
  | `createTask` | ❌ | ❌ | ✅ | Create new tasks with full markdown support |
192
194
  | `searchTasks` | ✅ | ✅ | ✅ | Find tasks by content, keywords, assignees, or project context |
@@ -222,13 +224,15 @@ Add the mode to your MCP configuration:
222
224
 
223
225
  ## Configuration
224
226
 
225
- This MCP server can be configured using environment variables:
227
+ This MCP server can be configured using environment variables. In the desktop extension (`.mcpb`) installer, the API key, team ID, primary language, upload size limit and comment edit window are offered as form fields; the remaining variables have to be set on the server environment directly.
226
228
 
227
229
  - `CLICKUP_API_KEY`: (Required) Your ClickUp API key.
228
230
  - `CLICKUP_TEAM_ID`: (Required) Your ClickUp Team ID (formerly Workspace ID).
229
231
  - `CLICKUP_MCP_MODE`: (Optional) Controls which tools are available. Options: `read-minimal`, `read`, `write` (default).
230
232
  - `MAX_IMAGES`: (Optional) The maximum number of images to return for a task in `getTaskById`. Defaults to 4.
231
233
  - `MAX_RESPONSE_SIZE_MB`: (Optional) The maximum response size in megabytes for `getTaskById`. Uses intelligent size budgeting to fit the most important images within the limit. Defaults to 1.
234
+ - `MAX_UPLOAD_SIZE_MB`: (Optional) The maximum size of a single image uploaded when writing comments or descriptions. Defaults to 10.
235
+ - `CLICKUP_COMMENT_EDIT_WINDOW_HOURS`: (Optional) How long after creation `editComment` may still rewrite a comment. Defaults to 24. Set to `0` to disable comment editing entirely.
232
236
  - `CLICKUP_PRIMARY_LANGUAGE`: (Optional) A hint for the primary language used in your ClickUp tasks (e.g., "de" for German, "en" for English). This helps the `searchTask` tool provide more tailored guidance in its description for multilingual searches.
233
237
  - `LANG`: (Optional) If `CLICKUP_PRIMARY_LANGUAGE` is not set, the MCP will check this standard environment variable (e.g., "en_US.UTF-8", "de_DE") as a fallback to infer the primary language.
234
238
 
@@ -284,6 +288,38 @@ When updating task descriptions, content is safely appended:
284
288
 
285
289
  This ensures no existing content is ever lost while maintaining a clear audit trail.
286
290
 
291
+ ## Writing Images Into Tickets
292
+
293
+ `addComment`, `editComment`, `createTask` and `updateTask` accept images as ordinary markdown. Because
294
+ this server runs locally, it reads the file itself - so a **local path is enough**:
295
+
296
+ ```markdown
297
+ Ist umgesetzt. So sieht es aus:
298
+
299
+ **1. Login öffnen** – der Kunde gibt nur seine E-Mail-Adresse ein.
300
+
301
+ ![Die Login-Maske fragt nur nach der E-Mail](/Users/me/shots/login.png)
302
+ ```
303
+
304
+ Accepted sources: local file paths, `data:` URIs, http(s) URLs (downloaded, then
305
+ re-uploaded), and existing ClickUp attachment URLs (embedded without re-uploading).
306
+
307
+ Notes:
308
+
309
+ - **Prefer paths over base64.** A path costs a few tokens; the same screenshot as a
310
+ `data:` URI costs roughly 4/3 of its file size in the request.
311
+ - **The caption becomes the attachment filename**, and that filename is what ClickUp
312
+ displays beneath the image - so write a caption that reads well.
313
+ - **An image inside a numbered list breaks ClickUp's numbering.** Write walkthrough
314
+ steps as bold lines with the image between them, as above.
315
+ - Only real PNG/JPEG/GIF/WebP files are uploaded - the content is checked, not the
316
+ extension. A file that fails **aborts the write**: `addComment`, `editComment` and
317
+ `updateTask` report every broken reference and change nothing, so the markdown can be
318
+ fixed and the call retried without creating duplicates. `createTask` validates its
319
+ images before creating the task; only an upload failing afterwards is reported as a
320
+ warning, since the task already exists at that point.
321
+ - Attachments always belong to a task, so document pages cannot embed uploads this way.
322
+
287
323
  ## Performance & Limitations
288
324
 
289
325
  **Optimized for AI Workflows:**
package/dist/cli.js CHANGED
@@ -116,7 +116,9 @@ async function main() {
116
116
  // Parse parameters
117
117
  for (let i = 1; i < args.length; i++) {
118
118
  const arg = args[i];
119
- const match = arg.match(/^([^=]+)=(.*)$/);
119
+ // The `s` flag matters: without it `.` stops at a newline and multi-line values
120
+ // (markdown descriptions, comments with images) are silently skipped entirely.
121
+ const match = arg.match(/^([^=]+)=(.*)$/s);
120
122
  if (match) {
121
123
  const [, key, value] = match;
122
124
  // Try to parse as JSON if it looks like a JSON value
@@ -6,6 +6,9 @@ import { ImageMetadataBlock } from "./shared/types";
6
6
  export interface ClickUpTextItem {
7
7
  text?: string;
8
8
  type?: string;
9
+ task_mention?: {
10
+ task_id?: string;
11
+ };
9
12
  image?: {
10
13
  id?: string;
11
14
  name?: string;
@@ -54,6 +57,7 @@ export interface ClickUpCommentBlock {
54
57
  attributes?: {
55
58
  bold?: boolean;
56
59
  italic?: boolean;
60
+ strike?: boolean;
57
61
  code?: boolean;
58
62
  link?: string;
59
63
  'code-block'?: {
@@ -67,17 +71,94 @@ export interface ClickUpCommentBlock {
67
71
  };
68
72
  indent?: number;
69
73
  'block-id'?: string;
74
+ alt?: string;
70
75
  };
71
76
  list?: {
72
77
  list: 'bullet' | 'ordered' | 'unchecked' | 'checked';
73
78
  };
79
+ /**
80
+ * Present on task mention fragments. ClickUp renders these as live task references
81
+ * showing the current task name, status and assignee.
82
+ */
83
+ task_mention?: {
84
+ task_id: string;
85
+ };
86
+ /**
87
+ * Present on image fragments. ClickUp only renders a preview when this holds the
88
+ * complete attachment object from the upload response - a bare URL string produces
89
+ * an empty placeholder tile.
90
+ */
91
+ image?: {
92
+ id?: string;
93
+ name?: string;
94
+ title?: string;
95
+ extension?: string;
96
+ url: string;
97
+ thumbnail_small?: string;
98
+ thumbnail_medium?: string;
99
+ thumbnail_large?: string;
100
+ width?: number;
101
+ height?: number;
102
+ };
103
+ }
104
+ /**
105
+ * Minimal shape needed to embed an already-uploaded attachment as an image fragment
106
+ */
107
+ export interface EmbeddableAttachment {
108
+ id?: string;
109
+ name?: string;
110
+ title?: string;
111
+ extension?: string;
112
+ url: string;
113
+ thumbnail_small?: string;
114
+ thumbnail_medium?: string;
115
+ thumbnail_large?: string;
116
+ width?: number;
117
+ height?: number;
118
+ [key: string]: any;
74
119
  }
120
+ /**
121
+ * Build the image fragment ClickUp needs to render an inline image in a comment.
122
+ * `title`/`text` carry the caption; the rest is copied straight from the upload response.
123
+ */
124
+ export declare function buildImageFragment(attachment: EmbeddableAttachment, caption: string): ClickUpCommentBlock;
125
+ /**
126
+ * Extract the task ID from a ClickUp task URL, or null if it is not one.
127
+ */
128
+ export declare function parseClickUpTaskUrl(url: string): string | null;
129
+ /**
130
+ * Wrap image destinations that contain spaces in angle brackets.
131
+ *
132
+ * CommonMark rejects a bare destination with spaces, so `![x](/tmp/Screen Shot.png)`
133
+ * is not an image at all - it would silently stay literal text and never be uploaded.
134
+ * Screenshot filenames have spaces constantly ("Screenshot 2026-07-27 at 14.30.png"),
135
+ * so normalising to the `<...>` form is what makes the obvious thing work.
136
+ */
137
+ export declare function normalizeImageDestinations(markdown: string): string;
138
+ /**
139
+ * Collect every image reference in a markdown document, in document order.
140
+ * Callers use this to know what needs uploading before converting.
141
+ */
142
+ export declare function collectMarkdownImageSources(markdown: string): {
143
+ src: string;
144
+ alt: string;
145
+ }[];
146
+ /**
147
+ * Replace image sources in markdown with their uploaded ClickUp URLs.
148
+ *
149
+ * Used for task descriptions: `markdown_description` renders `![alt](url)` directly,
150
+ * so descriptions need no fragment handling - only the URL has to be swapped.
151
+ * Images without an upload keep their original source untouched.
152
+ */
153
+ export declare function rewriteMarkdownImageUrls(markdown: string, attachmentsBySrc: Map<string, EmbeddableAttachment>): string;
75
154
  /**
76
155
  * Convert markdown text to ClickUp comment blocks format using remark
77
- * Supports: headers, bold, italic, code, links, lists, blockquotes, code blocks
156
+ * Supports: headers, bold, italic, code, links, lists, blockquotes, code blocks, images
78
157
  *
79
158
  * @param markdown The markdown text to convert
159
+ * @param attachmentsBySrc Uploaded attachments keyed by the markdown `src` they came from.
160
+ * Images without an entry degrade to a link so their information is not lost.
80
161
  * @returns Array of ClickUp comment blocks
81
162
  */
82
- export declare function convertMarkdownToClickUpBlocks(markdown: string): ClickUpCommentBlock[];
163
+ export declare function convertMarkdownToClickUpBlocks(markdown: string, attachmentsBySrc?: Map<string, EmbeddableAttachment>): ClickUpCommentBlock[];
83
164
  //# 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,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,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