@mtaap/mcp 0.2.6 → 0.2.8

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 ADDED
@@ -0,0 +1,20 @@
1
+ MTAAP Collab MCP Server - Proprietary License
2
+
3
+ Copyright (c) 2024-2026 MTAAP Contributors. All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are proprietary
6
+ and confidential. Unauthorized copying, modification, distribution, or use of this
7
+ Software, via any medium, is strictly prohibited.
8
+
9
+ The Software is provided for use solely by authorized users in connection with the
10
+ MTAAP Collab platform. Any use of the Software outside of its intended purpose or
11
+ without proper authorization is prohibited.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
15
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
16
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
18
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+
20
+ For licensing inquiries, please contact the MTAAP team.
package/README.md CHANGED
@@ -43,11 +43,34 @@ export COLLAB_API_KEY=collab_xxxxx...
43
43
  export COLLAB_BASE_URL=https://collab.mtaap.de
44
44
  ```
45
45
 
46
+ ## Task State Flow
47
+
48
+ ```
49
+ DRAFT -> TODO -> IN_PROGRESS -> REVIEW -> DONE
50
+ ```
51
+
52
+ - `DRAFT`: Task created, awaiting verification
53
+ - `TODO`: Task verified, ready for assignment
54
+ - `IN_PROGRESS`: Task assigned and being worked on
55
+ - `REVIEW`: Work complete, PR created, awaiting approval
56
+ - `DONE`: Task approved and completed
57
+
58
+ State transitions:
59
+ - `verify_task`: DRAFT -> TODO (or NEEDS_REVISION if rejected)
60
+ - `update_task` on TODO: reverts to DRAFT (requires re-verification)
61
+ - `assign_task`: TODO -> IN_PROGRESS
62
+ - `report_pr`: marks task ready for review (REVIEW state)
63
+ - `request_changes`: REVIEW -> IN_PROGRESS
64
+ - `approve_task`: REVIEW -> DONE
65
+ - `abandon_task`: IN_PROGRESS -> TODO
66
+
46
67
  ## Available Tools
47
68
 
48
- ### list_projects
69
+ ### Project Discovery
70
+
71
+ #### list_projects
49
72
 
50
- List accessible projects (personal + team via tags).
73
+ Discover all accessible projects. Use first to find project IDs. Filter by TEAM, PERSONAL, or ALL workspaces.
51
74
 
52
75
  **Parameters:**
53
76
  | Name | Type | Required | Description |
@@ -58,24 +81,65 @@ List accessible projects (personal + team via tags).
58
81
 
59
82
  ---
60
83
 
61
- ### list_tasks
84
+ #### get_project_context
85
+
86
+ Load project README, tech stack, and coding conventions. Call after selecting project.
87
+
88
+ **Parameters:**
89
+ | Name | Type | Required | Description |
90
+ |------|------|----------|-------------|
91
+ | `projectId` | string | Yes | Project ID (prj_xxx format) |
92
+
93
+ **Returns:** `{ readme, stack, recentCompleted, conventions }` with repository README (truncated to 2000 chars), detected dependencies, recent completed tasks, and project conventions.
94
+
95
+ ---
96
+
97
+ #### create_personal_project
98
+
99
+ Create a new project in your personal workspace linked to GitHub repository.
100
+
101
+ **Parameters:**
102
+ | Name | Type | Required | Description |
103
+ |------|------|----------|-------------|
104
+ | `name` | string | Yes | Project name (max 100 chars) |
105
+ | `description` | string | No | Project description (max 500 chars) |
106
+ | `repositoryUrl` | string | Yes | GitHub repository URL |
107
+
108
+ **Returns:** `{ success, projectId }`
109
+
110
+ ---
111
+
112
+ #### get_version
113
+
114
+ Check MCP server version and connectivity.
115
+
116
+ **Parameters:** None
117
+
118
+ **Returns:** `{ version, timestamp }`
119
+
120
+ ---
121
+
122
+ ### Task Management
123
+
124
+ #### list_tasks
62
125
 
63
- List tasks with optional filtering.
126
+ Query tasks with filters. Use state=TODO for assignable tasks, state=REVIEW for pending reviews.
64
127
 
65
128
  **Parameters:**
66
129
  | Name | Type | Required | Description |
67
130
  |------|------|----------|-------------|
68
131
  | `projectId` | string | No | Filter by project (prj_xxx format) |
69
- | `state` | TaskState | No | Filter by state: `BACKLOG`, `READY`, `IN_PROGRESS`, `REVIEW`, `DONE` |
132
+ | `state` | TaskState | No | Filter by state: `DRAFT`, `TODO`, `IN_PROGRESS`, `REVIEW`, `DONE` |
70
133
  | `assigneeId` | string | No | Filter by assignee (usr_xxx format) |
134
+ | `includeArchived` | boolean | No | Include archived tasks (default: false) |
71
135
 
72
136
  **Returns:** Array of tasks with full details including acceptance criteria, assignee, creator, epic, PR info.
73
137
 
74
138
  ---
75
139
 
76
- ### get_task
140
+ #### get_task
77
141
 
78
- Get full task details including acceptance criteria, progress updates, and notes.
142
+ Get complete task details with acceptance criteria and notes. Call before assign_task to understand requirements.
79
143
 
80
144
  **Parameters:**
81
145
  | Name | Type | Required | Description |
@@ -86,24 +150,145 @@ Get full task details including acceptance criteria, progress updates, and notes
86
150
 
87
151
  ---
88
152
 
89
- ### assign_task
153
+ #### create_task
154
+
155
+ Create task with title, description, acceptance criteria. Starts in DRAFT state. Priority: LOW/MEDIUM/HIGH/CRITICAL.
156
+
157
+ **Parameters:**
158
+ | Name | Type | Required | Description |
159
+ |------|------|----------|-------------|
160
+ | `projectId` | string | Yes | Project ID to create the task in |
161
+ | `epicId` | string | No | Optional epic ID to associate the task with |
162
+ | `title` | string | Yes | Task title (max 200 chars) |
163
+ | `description` | string | Yes | Task description (max 5000 chars) |
164
+ | `priority` | TaskPriority | No | Task priority: `LOW`, `MEDIUM`, `HIGH`, `CRITICAL` (default: MEDIUM) |
165
+ | `acceptanceCriteria` | array | Yes | Array of `{ description: string }` (at least 1 required, max 500 chars each) |
166
+
167
+ **Returns:** `{ success, taskId, state }` - Task created in DRAFT state.
168
+
169
+ ---
170
+
171
+ #### update_task
172
+
173
+ Update task details (title, description, priority, acceptanceCriteria). Only works for DRAFT and TODO states. If task is in TODO state, it reverts to DRAFT and requires re-verification.
174
+
175
+ **Parameters:**
176
+ | Name | Type | Required | Description |
177
+ |------|------|----------|-------------|
178
+ | `projectId` | string | Yes | Project ID |
179
+ | `taskId` | string | Yes | Task ID to update |
180
+ | `title` | string | No | New task title |
181
+ | `description` | string | No | New task description |
182
+ | `priority` | TaskPriority | No | New task priority |
183
+ | `acceptanceCriteria` | array | No | New acceptance criteria (replaces existing). Array of `{ id?: string, description: string }` |
184
+
185
+ **Returns:** `{ success, taskId, state, revertedToDraft }` - If task was TODO, revertedToDraft will be true.
186
+
187
+ ---
188
+
189
+ #### archive_task
190
+
191
+ Soft-delete a task. Hidden but restorable via unarchive_task.
192
+
193
+ **Parameters:**
194
+ | Name | Type | Required | Description |
195
+ |------|------|----------|-------------|
196
+ | `projectId` | string | Yes | Project ID |
197
+ | `taskId` | string | Yes | Task ID to archive |
198
+
199
+ **Returns:** `{ success, taskId }`
200
+
201
+ ---
202
+
203
+ #### unarchive_task
204
+
205
+ Restore previously archived task to original state.
206
+
207
+ **Parameters:**
208
+ | Name | Type | Required | Description |
209
+ |------|------|----------|-------------|
210
+ | `projectId` | string | Yes | Project ID |
211
+ | `taskId` | string | Yes | Task ID to restore |
212
+
213
+ **Returns:** `{ success, taskId, state }`
214
+
215
+ ---
216
+
217
+ ### Task Verification
218
+
219
+ #### verify_task
220
+
221
+ Verify a DRAFT task and move it to TODO state. Requires task to pass programmatic validation:
222
+ - Title: 10+ characters
223
+ - Description: 50+ characters
224
+ - Each acceptance criterion: 20+ characters
225
+
226
+ If `approved=false`, stores feedback with NEEDS_REVISION status.
227
+
228
+ **Parameters:**
229
+ | Name | Type | Required | Description |
230
+ |------|------|----------|-------------|
231
+ | `projectId` | string | Yes | Project ID |
232
+ | `taskId` | string | Yes | Task ID to verify |
233
+ | `approved` | boolean | Yes | Whether to approve the task |
234
+ | `feedback` | string | No | Feedback for the task (required if not approved) |
235
+
236
+ **Returns:** `{ success, taskId, state, verificationStatus }` - state will be TODO if approved, DRAFT with NEEDS_REVISION status if not.
237
+
238
+ ---
239
+
240
+ #### get_task_prompt
241
+
242
+ Get state-appropriate prompt for a task. Returns different prompts based on task state:
243
+ - **DRAFT**: Verification prompt with validation requirements
244
+ - **TODO**: Assignment prompt with task details
245
+ - **IN_PROGRESS**: Continue prompt with progress context
246
+
247
+ **Parameters:**
248
+ | Name | Type | Required | Description |
249
+ |------|------|----------|-------------|
250
+ | `projectId` | string | Yes | Project ID |
251
+ | `taskId` | string | Yes | Task ID |
252
+
253
+ **Returns:** `{ prompt, task, state }` - Formatted prompt text appropriate for the task's current state.
254
+
255
+ ---
256
+
257
+ ### Task Execution
258
+
259
+ #### assign_task
90
260
 
91
- Atomically claim a task and create a feature branch. Fails if task is already assigned or not in expected state.
261
+ Atomically claim a task and prepare for work. Race-safe - fails if already assigned. Task must be in TODO state.
92
262
 
93
263
  **Parameters:**
94
264
  | Name | Type | Required | Description |
95
265
  |------|------|----------|-------------|
96
266
  | `projectId` | string | Yes | Project ID (prj_xxx format) |
97
267
  | `taskId` | string | Yes | Task ID (tsk_xxx format) |
98
- | `expectedState` | TaskState | No | Expected task state. Defaults to `READY`. |
268
+ | `expectedState` | TaskState | No | Expected task state. Defaults to `TODO`. |
269
+
270
+ **Returns:**
271
+ ```json
272
+ {
273
+ "success": true,
274
+ "taskId": "tsk_xxx",
275
+ "suggestedBranchName": "feature/TSK-123-task-title",
276
+ "baseBranch": "main",
277
+ "repositoryUrl": "https://github.com/owner/repo",
278
+ "note": "Branch name suggestion. Create with: git checkout -b <branchName>"
279
+ }
280
+ ```
99
281
 
100
- **Returns:** `{ success, taskId, branchName }` or error if task state doesn't match.
282
+ After receiving this response:
283
+ 1. Create the branch locally: `git checkout -b <suggestedBranchName>`
284
+ 2. Push to remote: `git push -u origin <suggestedBranchName>`
285
+ 3. Call `report_branch` to inform the server
101
286
 
102
287
  ---
103
288
 
104
- ### update_progress
289
+ #### update_progress
105
290
 
106
- Report progress on an assigned task. Updates acceptance criteria checkboxes and records status messages.
291
+ Report progress and checkpoint work. Call frequently during execution. Marks acceptance criteria complete.
107
292
 
108
293
  **Parameters:**
109
294
  | Name | Type | Required | Description |
@@ -117,9 +302,9 @@ Report progress on an assigned task. Updates acceptance criteria checkboxes and
117
302
 
118
303
  ---
119
304
 
120
- ### complete_task
305
+ #### complete_task
121
306
 
122
- Mark task as complete and create a pull request.
307
+ Prepare task for PR creation. Returns PR suggestions. After creating PR locally with gh CLI, call report_pr to transition to REVIEW state. Requires IN_PROGRESS state.
123
308
 
124
309
  **Parameters:**
125
310
  | Name | Type | Required | Description |
@@ -129,23 +314,57 @@ Mark task as complete and create a pull request.
129
314
  | `pullRequestTitle` | string | No | Custom PR title (max 300 chars). Defaults to `[taskId] title`. |
130
315
  | `pullRequestBody` | string | No | Custom PR body (max 10000 chars). Defaults to description + acceptance criteria. |
131
316
 
132
- **Returns:** `{ success, taskId, prUrl, prNumber }`
317
+ **Returns:**
318
+ ```json
319
+ {
320
+ "success": true,
321
+ "taskId": "tsk_xxx",
322
+ "suggestedPRTitle": "[TSK-123] Task title",
323
+ "suggestedPRBody": "## Description\n...\n## Acceptance Criteria\n...",
324
+ "branchName": "feature/TSK-123-task-title",
325
+ "baseBranch": "main",
326
+ "note": "Create PR with: gh pr create --title '...' --body '...'"
327
+ }
328
+ ```
329
+
330
+ After receiving this response:
331
+ 1. Create PR locally: `gh pr create --title "<suggestedPRTitle>" --body "<suggestedPRBody>"`
332
+ 2. Call `report_pr` with the PR URL and number to transition to REVIEW state
133
333
 
134
334
  ---
135
335
 
136
- ### check_active_task
336
+ #### add_note
137
337
 
138
- Check for a resumable task in `.collab/active-task.json` in the current working directory.
338
+ Document implementation decisions. Notes persist for future reference and handoff.
139
339
 
140
- **Parameters:** None
340
+ **Parameters:**
341
+ | Name | Type | Required | Description |
342
+ |------|------|----------|-------------|
343
+ | `taskId` | string | Yes | Task ID (tsk_xxx format) |
344
+ | `content` | string | Yes | Note content (max 500 chars) |
345
+
346
+ **Returns:** `{ success, noteId }`
347
+
348
+ ---
349
+
350
+ #### abandon_task
351
+
352
+ Release task assignment and optionally clean up branch. Task returns to TODO state. Use after errors or when unable to complete.
353
+
354
+ **Parameters:**
355
+ | Name | Type | Required | Description |
356
+ |------|------|----------|-------------|
357
+ | `projectId` | string | Yes | Project ID (prj_xxx format) |
358
+ | `taskId` | string | Yes | Task ID (tsk_xxx format) |
359
+ | `deleteBranch` | boolean | No | Whether to delete the associated branch |
141
360
 
142
- **Returns:** `{ hasActiveTask, task }` where task contains saved context if found.
361
+ **Returns:** `{ success, taskId, state, branchDeleted }` - state will be `TODO`.
143
362
 
144
363
  ---
145
364
 
146
- ### report_error
365
+ #### report_error
147
366
 
148
- Report an unrecoverable error on a task. The error will be displayed in the webapp.
367
+ Report unrecoverable errors (BUILD_FAILURE, TEST_FAILURE, CONFLICT, AUTH_ERROR, OTHER). Consider abandon_task after reporting.
149
368
 
150
369
  **Parameters:**
151
370
  | Name | Type | Required | Description |
@@ -159,70 +378,123 @@ Report an unrecoverable error on a task. The error will be displayed in the weba
159
378
 
160
379
  ---
161
380
 
162
- ### get_project_context
381
+ ### Git Operations
382
+
383
+ #### report_branch
163
384
 
164
- Get assembled context for a project including README, tech stack, and conventions.
385
+ Report a branch created by the agent. Call after using git to create and push a branch. Task must be IN_PROGRESS.
165
386
 
166
387
  **Parameters:**
167
388
  | Name | Type | Required | Description |
168
389
  |------|------|----------|-------------|
169
- | `projectId` | string | Yes | Project ID (prj_xxx format) |
390
+ | `projectId` | string | Yes | Project ID |
391
+ | `taskId` | string | Yes | Task ID |
392
+ | `branchName` | string | Yes | Name of the branch created (e.g., `feature/TSK-123-fix-login`) |
170
393
 
171
- **Returns:** `{ readme, stack, recentCompleted, conventions }` with repository README (truncated to 2000 chars), detected dependencies, recent completed tasks, and project conventions.
394
+ **Returns:** `{ success, taskId, branchName }`
172
395
 
173
396
  ---
174
397
 
175
- ### add_note
398
+ #### report_pr
176
399
 
177
- Append implementation notes to a task you are assigned to.
400
+ Report a PR created by the agent. Call after using gh pr create. Transitions task to REVIEW state.
178
401
 
179
402
  **Parameters:**
180
403
  | Name | Type | Required | Description |
181
404
  |------|------|----------|-------------|
182
- | `taskId` | string | Yes | Task ID (tsk_xxx format) |
183
- | `content` | string | Yes | Note content (max 500 chars) |
405
+ | `projectId` | string | Yes | Project ID |
406
+ | `taskId` | string | Yes | Task ID |
407
+ | `pullRequestUrl` | string | Yes | Full URL of the created PR (e.g., `https://github.com/owner/repo/pull/123`) |
408
+ | `pullRequestNumber` | number | Yes | PR number (e.g., `123`) |
184
409
 
185
- **Returns:** `{ success, noteId }`
410
+ **Returns:** `{ success, taskId, state, pullRequestUrl }` - state will be `REVIEW`.
186
411
 
187
412
  ---
188
413
 
189
- ### abandon_task
414
+ ### Code Review
415
+
416
+ #### request_changes
190
417
 
191
- Unassign yourself from a task and optionally delete the feature branch. Task returns to `READY` state if it was `IN_PROGRESS`.
418
+ Return task from REVIEW to IN_PROGRESS with feedback. Original assignee addresses changes.
192
419
 
193
420
  **Parameters:**
194
421
  | Name | Type | Required | Description |
195
422
  |------|------|----------|-------------|
196
- | `projectId` | string | Yes | Project ID (prj_xxx format) |
197
- | `taskId` | string | Yes | Task ID (tsk_xxx format) |
198
- | `deleteBranch` | boolean | No | Whether to delete the feature branch on GitHub |
423
+ | `projectId` | string | Yes | Project ID |
424
+ | `taskId` | string | Yes | Task ID to review |
425
+ | `reviewComments` | string | Yes | Review comments explaining requested changes (max 5000 chars) |
426
+ | `requestedChanges` | string[] | No | List of specific changes requested |
199
427
 
200
- **Returns:** `{ success, taskId, state, branchDeleted }`
428
+ **Returns:** `{ success, taskId, state }` - state will be `IN_PROGRESS`.
201
429
 
202
430
  ---
203
431
 
204
- ### create_personal_project
432
+ #### approve_task
205
433
 
206
- Create a new project in your personal workspace.
434
+ Approve completed work and mark DONE. Only for REVIEW state tasks.
207
435
 
208
436
  **Parameters:**
209
437
  | Name | Type | Required | Description |
210
438
  |------|------|----------|-------------|
211
- | `name` | string | Yes | Project name (max 100 chars) |
212
- | `description` | string | No | Project description (max 500 chars) |
213
- | `repositoryUrl` | string | Yes | GitHub repository URL |
439
+ | `projectId` | string | Yes | Project ID |
440
+ | `taskId` | string | Yes | Task ID to approve |
441
+ | `reviewComments` | string | No | Optional approval comments (max 2000 chars) |
214
442
 
215
- **Returns:** `{ success, projectId }`
443
+ **Returns:** `{ success, taskId, state }` - state will be `DONE`.
216
444
 
217
445
  ---
218
446
 
219
- ### get_version
447
+ ### Session Management
220
448
 
221
- Get the current Collab MCP server version.
449
+ #### check_active_task
450
+
451
+ Check for resumable work from previous session. Always call before starting new work.
222
452
 
223
453
  **Parameters:** None
224
454
 
225
- **Returns:** `{ version, timestamp }`
455
+ **Returns:** `{ hasActiveTask, task }` where task contains saved context from `.collab/active-task.json` if found.
456
+
457
+ ---
458
+
459
+ ## Workflows
460
+
461
+ ### Task Creation and Verification
462
+
463
+ ```
464
+ create_task -> get_task_prompt (DRAFT) -> verify_task(approved=true) -> task moves to TODO
465
+ ```
466
+
467
+ ### Standard Task Execution
468
+
469
+ ```
470
+ list_projects -> get_project_context -> list_tasks(state=TODO) -> get_task -> get_task_prompt (TODO)
471
+ -> assign_task (returns suggested branch name)
472
+ -> git checkout -b <branchName> (local git command)
473
+ -> git push -u origin <branchName> (local git command)
474
+ -> report_branch (tell server about the branch)
475
+ -> [update_progress...]
476
+ -> complete_task (returns PR suggestions)
477
+ -> gh pr create (local gh command)
478
+ -> report_pr (tell server about the PR, transitions to REVIEW)
479
+ ```
480
+
481
+ ### Resume Previous Work
482
+
483
+ ```
484
+ check_active_task -> (if active) get_task -> get_task_prompt (IN_PROGRESS) -> update_progress -> complete_task
485
+ ```
486
+
487
+ ### Code Review
488
+
489
+ ```
490
+ list_tasks(state=REVIEW) -> get_task -> approve_task OR request_changes
491
+ ```
492
+
493
+ ### Error Recovery
494
+
495
+ ```
496
+ report_error -> abandon_task -> list_tasks -> assign_task (retry or pick different task)
497
+ ```
226
498
 
227
499
  ## Usage
228
500
 
@@ -246,19 +518,6 @@ Get the current Collab MCP server version.
246
518
 
247
519
  3. Use the tools from your AI agent
248
520
 
249
- ## Development
250
-
251
- ```bash
252
- # Build
253
- pnpm build
254
-
255
- # Watch mode
256
- pnpm dev
257
-
258
- # Run locally
259
- COLLAB_API_KEY=your-key COLLAB_BASE_URL=https://collab.mtaap.de pnpm start
260
- ```
261
-
262
521
  ## Troubleshooting
263
522
 
264
523
  ### "COLLAB_API_KEY is required"
@@ -273,10 +532,6 @@ You need to set the `COLLAB_BASE_URL` environment variable to your Collab webapp
273
532
 
274
533
  Your API key may be expired or revoked. Generate a new one at https://collab.mtaap.de/settings/api-keys
275
534
 
276
- ### "GitHub token not configured"
277
-
278
- Git operations (branch creation, PR creation) require a GitHub token to be configured in your Collab account settings. Go to https://collab.mtaap.de/settings and add your GitHub personal access token.
279
-
280
535
  ### Connection issues
281
536
 
282
537
  Ensure your firewall allows outbound connections to your Collab instance. The server performs a connectivity check on startup and will report any connection issues.
@@ -285,16 +540,6 @@ Ensure your firewall allows outbound connections to your Collab instance. The se
285
540
 
286
541
  The MCP API is rate limited to 100 requests per minute. If you exceed this limit, you'll receive a 429 error with a `Retry-After` header indicating when you can retry.
287
542
 
288
- ## Publishing
289
-
290
- This package is published as `@mtaap/mcp` to npm.
291
-
292
- ```bash
293
- # Build and publish
294
- pnpm build
295
- npm publish
296
- ```
297
-
298
543
  ## License
299
544
 
300
- MIT
545
+ Proprietary - See LICENSE file for details.
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node