trello-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.
Files changed (42) hide show
  1. package/README.md +394 -0
  2. package/dist/constants.d.ts +13 -0
  3. package/dist/constants.d.ts.map +1 -0
  4. package/dist/constants.js +28 -0
  5. package/dist/constants.js.map +1 -0
  6. package/dist/index.d.ts +27 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +243 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/services/trello-client.d.ts +49 -0
  11. package/dist/services/trello-client.d.ts.map +1 -0
  12. package/dist/services/trello-client.js +162 -0
  13. package/dist/services/trello-client.js.map +1 -0
  14. package/dist/tools/boards.d.ts +6 -0
  15. package/dist/tools/boards.d.ts.map +1 -0
  16. package/dist/tools/boards.js +299 -0
  17. package/dist/tools/boards.js.map +1 -0
  18. package/dist/tools/cards.d.ts +6 -0
  19. package/dist/tools/cards.d.ts.map +1 -0
  20. package/dist/tools/cards.js +859 -0
  21. package/dist/tools/cards.js.map +1 -0
  22. package/dist/tools/checklists.d.ts +6 -0
  23. package/dist/tools/checklists.d.ts.map +1 -0
  24. package/dist/tools/checklists.js +394 -0
  25. package/dist/tools/checklists.js.map +1 -0
  26. package/dist/tools/labels.d.ts +6 -0
  27. package/dist/tools/labels.d.ts.map +1 -0
  28. package/dist/tools/labels.js +153 -0
  29. package/dist/tools/labels.js.map +1 -0
  30. package/dist/tools/lists.d.ts +6 -0
  31. package/dist/tools/lists.d.ts.map +1 -0
  32. package/dist/tools/lists.js +275 -0
  33. package/dist/tools/lists.js.map +1 -0
  34. package/dist/tools/members.d.ts +6 -0
  35. package/dist/tools/members.d.ts.map +1 -0
  36. package/dist/tools/members.js +254 -0
  37. package/dist/tools/members.js.map +1 -0
  38. package/dist/types.d.ts +111 -0
  39. package/dist/types.d.ts.map +1 -0
  40. package/dist/types.js +5 -0
  41. package/dist/types.js.map +1 -0
  42. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,394 @@
1
+ # Trello MCP Server
2
+
3
+ A comprehensive [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for Trello. Manage boards, lists, cards, checklists, labels, and members through any MCP-compatible AI assistant.
4
+
5
+ **Works with:** Claude Code, Claude Desktop, Cursor, Windsurf, Cody, OpenCode, and any other MCP client.
6
+
7
+ ## Features
8
+
9
+ - **Board Management**: Create, list, update, and archive boards
10
+ - **List Management**: Create, move, and archive lists
11
+ - **Card Operations**: Full CRUD operations, search, comments, attachments
12
+ - **Checklist Support**: Create checklists, add/update/complete items
13
+ - **Label Management**: Create, update, and assign labels
14
+ - **Member Management**: View members, assign to cards
15
+ - **Search**: Full-text search with Trello search operators
16
+
17
+ ---
18
+
19
+ ## Quick Start
20
+
21
+ ### Step 1: Get Your Trello API Credentials (2 minutes)
22
+
23
+ You need two things from Trello: an **API Key** and a **Token**.
24
+
25
+ #### Step 1a: Create a Trello Power-Up
26
+
27
+ 1. Go to **https://trello.com/power-ups/admin**
28
+ 2. Log in to Trello if prompted
29
+ 3. Click the **"New"** button (top right)
30
+ 4. Fill in the **"New App"** form:
31
+ - **App name**: Anything you want (e.g., `trellomcp`)
32
+ - **Workspace**: Select any workspace you belong to
33
+ - **Email**: Your email *(only Trello sees this, not us)*
34
+ - **Support contact**: Your email *(only Trello sees this, not us)*
35
+ - **Author**: Your name
36
+ - **Iframe connector URL**: **Leave this blank**
37
+ 5. Click **"Create"**
38
+
39
+ #### Step 1b: Generate Your API Key
40
+
41
+ 1. After creating the app, you'll land on the app settings page
42
+ 2. Click **"API key"** in the left sidebar (if not already selected)
43
+ 3. Click the **"Generate a new API key"** button
44
+ 4. You'll now see three fields:
45
+ - **API key** - ✅ **Copy this!** This is your `TRELLO_API_KEY`
46
+ - **Allowed origins** - ❌ Leave empty (not needed)
47
+ - **Secret** - ❌ Ignore this (only for OAuth, we don't use it)
48
+
49
+ #### Step 1c: Generate Your Token
50
+
51
+ 1. On the same page, find the text that says *"manually generate a Token"*
52
+ 2. Click the **"Token"** link in that text
53
+ 3. You'll see an authorization page asking *"Would you like to give the following application access to your account?"*
54
+ - It shows your app name and Trello account
55
+ - Scroll down and click **"Allow"**
56
+ 4. You'll see a page that says: *"You have granted access to your Trello account via the token below:"*
57
+ 5. **Copy the token displayed** - this is your `TRELLO_TOKEN`
58
+
59
+ > **Alternative:** If you can't find the Token link, visit this URL directly (replace `YOUR_API_KEY`):
60
+ > ```
61
+ > https://trello.com/1/authorize?expiration=never&scope=read,write&response_type=token&key=YOUR_API_KEY
62
+ > ```
63
+
64
+ **You now have both credentials:**
65
+ - `TRELLO_API_KEY` - from Step 1b
66
+ - `TRELLO_TOKEN` - from Step 1c
67
+
68
+ ---
69
+
70
+ ### Step 2: Install the MCP Server
71
+
72
+ ```bash
73
+ npm install -g trello-mcp-server
74
+ ```
75
+
76
+ Or from source:
77
+ ```bash
78
+ git clone https://github.com/anthropics/trello-mcp-server.git
79
+ cd trello-mcp-server
80
+ npm install
81
+ npm run build
82
+ ```
83
+
84
+ ---
85
+
86
+ ### Step 3: Configure Your MCP Client
87
+
88
+ Choose your client below:
89
+
90
+ <details>
91
+ <summary><b>Claude Code</b></summary>
92
+
93
+ ```bash
94
+ claude mcp add trello -e TRELLO_API_KEY=your-key -e TRELLO_TOKEN=your-token -- trello-mcp-server
95
+ ```
96
+
97
+ </details>
98
+
99
+ <details>
100
+ <summary><b>Claude Desktop</b></summary>
101
+
102
+ Add to config file (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
103
+
104
+ ```json
105
+ {
106
+ "mcpServers": {
107
+ "trello": {
108
+ "command": "trello-mcp-server",
109
+ "env": {
110
+ "TRELLO_API_KEY": "your-api-key",
111
+ "TRELLO_TOKEN": "your-token"
112
+ }
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ Restart Claude Desktop after saving.
119
+
120
+ </details>
121
+
122
+ <details>
123
+ <summary><b>Cursor</b></summary>
124
+
125
+ Add to `~/.cursor/mcp.json`:
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "trello": {
131
+ "command": "trello-mcp-server",
132
+ "env": {
133
+ "TRELLO_API_KEY": "your-api-key",
134
+ "TRELLO_TOKEN": "your-token"
135
+ }
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ </details>
142
+
143
+ <details>
144
+ <summary><b>Windsurf</b></summary>
145
+
146
+ Add to `~/.windsurf/mcp.json`:
147
+
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "trello": {
152
+ "command": "trello-mcp-server",
153
+ "env": {
154
+ "TRELLO_API_KEY": "your-api-key",
155
+ "TRELLO_TOKEN": "your-token"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ ```
161
+
162
+ </details>
163
+
164
+ <details>
165
+ <summary><b>OpenCode</b></summary>
166
+
167
+ Add to `~/.config/opencode/opencode.json`:
168
+
169
+ ```json
170
+ {
171
+ "mcp": {
172
+ "trello": {
173
+ "type": "local",
174
+ "command": ["trello-mcp-server"],
175
+ "environment": {
176
+ "TRELLO_API_KEY": "your-api-key",
177
+ "TRELLO_TOKEN": "your-token"
178
+ }
179
+ }
180
+ }
181
+ }
182
+ ```
183
+
184
+ </details>
185
+
186
+ <details>
187
+ <summary><b>Other / Manual</b></summary>
188
+
189
+ ```bash
190
+ TRELLO_API_KEY=your-key TRELLO_TOKEN=your-token trello-mcp-server
191
+ ```
192
+
193
+ </details>
194
+
195
+ ---
196
+
197
+ ### Step 4: Verify It Works
198
+
199
+ Ask your AI assistant:
200
+ > "List my Trello boards"
201
+
202
+ It should respond with your Trello boards!
203
+
204
+ ---
205
+
206
+ ## Troubleshooting
207
+
208
+ ### "Command not found"
209
+
210
+ Find the full path:
211
+ ```bash
212
+ which trello-mcp-server # macOS/Linux
213
+ where trello-mcp-server # Windows
214
+ ```
215
+
216
+ Then use the full path in your config (e.g., `/usr/local/bin/trello-mcp-server`).
217
+
218
+ ### "Invalid API key" or "Invalid token"
219
+
220
+ - Check you copied the full key (32 chars) and token (64 chars)
221
+ - No extra spaces
222
+ - Token not revoked at https://trello.com/your/account
223
+
224
+ ### Tools not showing up
225
+
226
+ - Restart your MCP client after config changes
227
+ - Check JSON syntax is valid (use a JSON validator)
228
+ - Check the server runs manually: `TRELLO_API_KEY=x TRELLO_TOKEN=y trello-mcp-server --help`
229
+
230
+ ---
231
+
232
+ ## What You Can Do
233
+
234
+ Example prompts:
235
+
236
+ ### Boards
237
+ - "List all my Trello boards"
238
+ - "Create a new board called 'Project Alpha'"
239
+ - "Show me the lists on my 'Work' board"
240
+
241
+ ### Cards
242
+ - "Create a card called 'Review PR #123' in the 'To Do' list"
243
+ - "Move the 'Homepage redesign' card to 'Done'"
244
+ - "Search for cards containing 'bug' due this week"
245
+
246
+ ### Checklists
247
+ - "Add a checklist to the 'Release v2.0' card with items: Tests, Docs, Deploy"
248
+ - "Mark 'Tests' as complete"
249
+
250
+ ### Labels & Members
251
+ - "Add the 'Urgent' label to the 'Fix bug' card"
252
+ - "Assign @john to the 'Design review' card"
253
+
254
+ ### Comments
255
+ - "Add a comment to the card saying 'Waiting for client feedback'"
256
+
257
+ ---
258
+
259
+ ## All Available Tools (39 total)
260
+
261
+ ### Boards (6)
262
+ - `trello_list_boards` - List all boards
263
+ - `trello_get_board` - Get board with lists
264
+ - `trello_create_board` - Create board
265
+ - `trello_update_board` - Update board
266
+ - `trello_get_board_labels` - Get board labels
267
+ - `trello_get_board_members` - Get board members
268
+
269
+ ### Lists (6)
270
+ - `trello_create_list` - Create list
271
+ - `trello_update_list` - Update list
272
+ - `trello_get_list_cards` - Get cards in list
273
+ - `trello_archive_all_cards` - Archive all cards
274
+ - `trello_move_all_cards` - Move all cards
275
+ - `trello_move_list` - Move list to board
276
+
277
+ ### Cards (17)
278
+ - `trello_get_card` - Get card details
279
+ - `trello_create_card` - Create card
280
+ - `trello_update_card` - Update card
281
+ - `trello_delete_card` - Delete card
282
+ - `trello_search_cards` - Search cards
283
+ - `trello_copy_card` - Copy card
284
+ - `trello_add_comment` - Add comment
285
+ - `trello_get_card_comments` - Get comments
286
+ - `trello_update_comment` - Update comment
287
+ - `trello_delete_comment` - Delete comment
288
+ - `trello_add_card_label` - Add label
289
+ - `trello_remove_card_label` - Remove label
290
+ - `trello_assign_member` - Assign member
291
+ - `trello_remove_member` - Remove member
292
+ - `trello_add_attachment` - Add attachment
293
+ - `trello_get_attachments` - Get attachments
294
+ - `trello_delete_attachment` - Delete attachment
295
+
296
+ ### Labels (3)
297
+ - `trello_create_label` - Create label
298
+ - `trello_update_label` - Update label
299
+ - `trello_delete_label` - Delete label
300
+
301
+ ### Checklists (8)
302
+ - `trello_create_checklist` - Create checklist
303
+ - `trello_update_checklist` - Update checklist
304
+ - `trello_delete_checklist` - Delete checklist
305
+ - `trello_get_checklist` - Get checklist
306
+ - `trello_add_checklist_item` - Add item
307
+ - `trello_update_checklist_item` - Update item
308
+ - `trello_delete_checklist_item` - Delete item
309
+ - `trello_copy_checklist` - Copy checklist
310
+
311
+ ### Members (5)
312
+ - `trello_get_me` - Get current user
313
+ - `trello_get_member` - Get member info
314
+ - `trello_get_member_boards` - Get member's boards
315
+ - `trello_get_member_cards` - Get member's cards
316
+ - `trello_search_members` - Search members
317
+
318
+ ---
319
+
320
+ ## Search Operators
321
+
322
+ Use Trello's search syntax with `trello_search_cards`:
323
+
324
+ | Operator | Example | Description |
325
+ |----------|---------|-------------|
326
+ | `@me` | `@me` | My cards |
327
+ | `#label` | `#bug` | Cards with label |
328
+ | `board:` | `board:Dev` | On specific board |
329
+ | `list:` | `list:"To Do"` | In specific list |
330
+ | `is:open` | `is:open` | Open cards |
331
+ | `due:day` | `due:week` | Due soon |
332
+ | `due:overdue` | `due:overdue` | Past due |
333
+ | `has:attachments` | `has:checklist` | Has feature |
334
+
335
+ Example: `@me due:week is:open #urgent`
336
+
337
+ ---
338
+
339
+ ## HTTP Server Mode
340
+
341
+ For web integrations or remote access:
342
+
343
+ ```bash
344
+ TRELLO_API_KEY=x TRELLO_TOKEN=y TRANSPORT=http PORT=3000 trello-mcp-server
345
+ ```
346
+
347
+ Server available at `http://localhost:3000/mcp`
348
+
349
+ ---
350
+
351
+ ## Development
352
+
353
+ ```bash
354
+ npm install
355
+ TRELLO_API_KEY=x TRELLO_TOKEN=y npm run dev # Dev mode with auto-reload
356
+ npm run build # Build for production
357
+ npm run inspect # Test with MCP Inspector
358
+ ```
359
+
360
+ ---
361
+
362
+ ## Security & Credentials
363
+
364
+ ### How are my credentials stored?
365
+
366
+ Your Trello API key and token are stored **locally on your machine** in your MCP client's config file:
367
+
368
+ | Client | Config Location |
369
+ |--------|-----------------|
370
+ | Claude Code | `~/.claude/settings.json` |
371
+ | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
372
+ | Cursor | `~/.cursor/mcp.json` |
373
+
374
+ The MCP server **never stores your credentials** - it only reads them from environment variables that your MCP client provides when starting the server.
375
+
376
+ ### Do credentials expire?
377
+
378
+ - **API Key**: Never expires
379
+ - **Token**: Never expires (we use `expiration=never`)
380
+
381
+ You can revoke your token anytime at https://trello.com/your/account
382
+
383
+ ### Security best practices
384
+
385
+ - **Never share your token** - it provides full access to your Trello account
386
+ - **Don't commit config files** with credentials to git
387
+ - **Revoke and regenerate** if you accidentally expose your token
388
+ - The token has `read,write` scope - it can read and modify your boards
389
+
390
+ ---
391
+
392
+ ## License
393
+
394
+ MIT
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Constants for Trello MCP Server
3
+ */
4
+ export declare const TRELLO_API_BASE = "https://api.trello.com/1";
5
+ export declare const CHARACTER_LIMIT = 25000;
6
+ export declare const DEFAULT_LIMIT = 50;
7
+ export declare const MAX_LIMIT = 1000;
8
+ export declare const LABEL_COLORS: readonly ["green", "yellow", "orange", "red", "purple", "blue", "sky", "lime", "pink", "black"];
9
+ export declare const POSITION: {
10
+ readonly TOP: "top";
11
+ readonly BOTTOM: "bottom";
12
+ };
13
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAG1D,eAAO,MAAM,eAAe,QAAQ,CAAC;AAGrC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,SAAS,OAAO,CAAC;AAG9B,eAAO,MAAM,YAAY,iGAWf,CAAC;AAGX,eAAO,MAAM,QAAQ;;;CAGX,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Constants for Trello MCP Server
3
+ */
4
+ export const TRELLO_API_BASE = "https://api.trello.com/1";
5
+ // Maximum characters in a response before truncation
6
+ export const CHARACTER_LIMIT = 25000;
7
+ // Default pagination limits
8
+ export const DEFAULT_LIMIT = 50;
9
+ export const MAX_LIMIT = 1000;
10
+ // Valid label colors for Trello
11
+ export const LABEL_COLORS = [
12
+ "green",
13
+ "yellow",
14
+ "orange",
15
+ "red",
16
+ "purple",
17
+ "blue",
18
+ "sky",
19
+ "lime",
20
+ "pink",
21
+ "black",
22
+ ];
23
+ // Card position helpers
24
+ export const POSITION = {
25
+ TOP: "top",
26
+ BOTTOM: "bottom",
27
+ };
28
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAE1D,qDAAqD;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AAErC,4BAA4B;AAC5B,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAChC,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAE9B,gCAAgC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;CACC,CAAC;AAEX,wBAAwB;AACxB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;CACR,CAAC"}
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Trello MCP Server
4
+ *
5
+ * A comprehensive MCP server for managing Trello boards, lists, cards,
6
+ * checklists, labels, and members.
7
+ *
8
+ * Features:
9
+ * - Full board, list, and card management
10
+ * - Checklist creation and management
11
+ * - Label management
12
+ * - Member assignment
13
+ * - Card search with Trello search operators
14
+ * - Attachment handling
15
+ * - Comment management
16
+ *
17
+ * Authentication:
18
+ * - Set TRELLO_API_KEY and TRELLO_TOKEN environment variables
19
+ * - Get your API key from: https://trello.com/power-ups/admin
20
+ * - Generate a token from: https://trello.com/1/authorize?expiration=never&scope=read,write&response_type=token&key=YOUR_API_KEY
21
+ *
22
+ * Usage:
23
+ * - stdio transport (default): node dist/index.js
24
+ * - HTTP transport: TRANSPORT=http PORT=3000 node dist/index.js
25
+ */
26
+ export {};
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG"}