kanban-zone-mcp-server 0.1.0 → 0.1.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
@@ -2,13 +2,14 @@
2
2
 
3
3
  [Model Context Protocol](https://modelcontextprotocol.io/) server that lets AI assistants (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, and any stdio-capable MCP client) drive your [Kanban Zone](https://kanbanzone.com) workspace via the public API.
4
4
 
5
- 23 tools across boards, cards, comments, checklists, and tasks. No delete operations.
5
+ 27 tools across boards, cards, comments, checklists, tasks, and labels. No delete operations.
6
6
 
7
7
  ## What you can do
8
8
 
9
9
  - Read your boards, columns, labels, members, and custom fields.
10
- - Create, list, get, update, and move cards.
10
+ - Create, list, get, update, move, and search cards.
11
11
  - Inspect a card's history and time-in-column metrics.
12
+ - Create, get, and update labels.
12
13
  - Add comments.
13
14
  - Create, update, and list checklists — including bulk task creation in a single call.
14
15
  - Create, update, and move tasks.
@@ -59,16 +60,17 @@ The server validates the key on startup. A missing or malformed value (no `:` se
59
60
 
60
61
  ## Tools
61
62
 
62
- 23 tools, all prefixed with `kanbanzone_`:
63
+ 27 tools, all prefixed with `kanbanzone_`:
63
64
 
64
65
  | Group | Tools |
65
66
  | --- | --- |
66
67
  | **Organization & Auth** | `get_me`, `get_organization` |
67
68
  | **Boards** | `list_boards`, `get_board`, `list_board_columns`, `list_board_labels`, `list_board_members`, `list_board_custom_fields` |
68
- | **Cards** | `create_card`, `list_cards`, `get_card`, `update_card`, `move_card`, `get_card_history`, `get_card_metrics` |
69
+ | **Cards** | `create_card`, `list_cards`, `get_card`, `update_card`, `move_card`, `get_card_history`, `get_card_metrics`, `search_cards` |
69
70
  | **Comments** | `create_comment`, `list_card_comments` |
70
71
  | **Checklists** | `create_checklist`, `update_checklist`, `list_card_checklists` |
71
72
  | **Tasks** | `create_task`, `update_task`, `move_task` |
73
+ | **Labels** | `create_label`, `get_label`, `update_label` |
72
74
 
73
75
  User-facing docs with example prompts: <https://docs.kanbanzone.io/mcp>.
74
76
  Full input/output schemas: <https://docs.kanbanzone.io/api>.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kanban-zone-mcp-server",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Model Context Protocol server for the Kanban Zone public API",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.kanbanzone.io/mcp",
@@ -20,7 +20,8 @@
20
20
  ],
21
21
  "main": "src/index.js",
22
22
  "bin": {
23
- "kanban-zone-mcp": "src/index.js"
23
+ "kanban-zone-mcp": "src/index.js",
24
+ "kanban-zone-mcp-server": "src/index.js"
24
25
  },
25
26
  "files": [
26
27
  "src",
@@ -28,7 +29,8 @@
28
29
  "LICENSE"
29
30
  ],
30
31
  "scripts": {
31
- "start": "node src/index.js"
32
+ "start": "node src/index.js",
33
+ "test": "node --test"
32
34
  },
33
35
  "engines": {
34
36
  "node": ">=18"
package/src/constants.js CHANGED
@@ -8,7 +8,7 @@ const DEFAULT_PAGE_SIZE = 20;
8
8
  const MAX_PAGE_SIZE = 100;
9
9
 
10
10
  const SERVER_NAME = 'kanban-zone-mcp-server';
11
- const SERVER_VERSION = '0.1.0';
11
+ const SERVER_VERSION = '0.1.2';
12
12
 
13
13
  const REQUEST_TIMEOUT_MS = 30000;
14
14
 
@@ -7,10 +7,29 @@ const READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true,
7
7
  const WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true };
8
8
  const IDEMPOTENT_WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true };
9
9
 
10
+ // list_cards nests card fields under CardItem; search_cards returns them flat. Handle both.
10
11
  const renderCardLine = card => {
11
- const number = card.number !== undefined ? `#${card.number} ` : '';
12
- const owner = card.owner && card.owner.email ? ` — owner ${card.owner.email}` : '';
13
- return `- ${number}**${card.title}** (\`${card._id}\`)${owner}`;
12
+ const c = (card && card.CardItem) || card || {};
13
+ const id = (card && card._id) || c._id;
14
+ const number = c.number !== undefined ? `#${c.number} ` : '';
15
+ const ownerEmail = c.owner && typeof c.owner === 'object' ? c.owner.email : c.owner;
16
+ const owner = ownerEmail ? ` — owner ${ownerEmail}` : '';
17
+ return `- ${number}**${c.title}** (\`${id}\`)${owner}`;
18
+ };
19
+
20
+ // The /cards list envelope is { count, totalAvailable, cards, hasMore }; tolerate a bare
21
+ // array or search-style { total, has_more } names too, so pagination metadata stays accurate.
22
+ const summarizeListResponse = (data, page, count) => {
23
+ const items = Array.isArray(data) ? data : (data && (data.cards || data.results || data.items)) || [];
24
+ const envelope = data && !Array.isArray(data) ? data : {};
25
+ const total = [envelope.totalAvailable, envelope.total].find(v => typeof v === 'number') ?? items.length;
26
+ const hasMore =
27
+ typeof envelope.hasMore === 'boolean'
28
+ ? envelope.hasMore
29
+ : typeof envelope.has_more === 'boolean'
30
+ ? envelope.has_more
31
+ : total > page * count;
32
+ return { items, total, hasMore };
14
33
  };
15
34
 
16
35
  const registerCardsTools = server => {
@@ -136,10 +155,7 @@ const registerCardsTools = server => {
136
155
  },
137
156
  });
138
157
 
139
- // Upstream returns either a bare array or a paginated wrapper depending on filters.
140
- const items = Array.isArray(data) ? data : data.cards || data.results || [];
141
- const total = typeof data.total === 'number' ? data.total : items.length;
142
- const hasMore = total > page * count;
158
+ const { items, total, hasMore } = summarizeListResponse(data, page, count);
143
159
 
144
160
  if (response_format === ResponseFormat.JSON) {
145
161
  return {
@@ -444,4 +460,4 @@ const registerCardsTools = server => {
444
460
  );
445
461
  };
446
462
 
447
- module.exports = { registerCardsTools };
463
+ module.exports = { registerCardsTools, renderCardLine, summarizeListResponse };