@krr2020/taskflow-mcp-server 0.1.0-beta.1 → 0.1.0-beta.3
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 +287 -0
- package/dist/index.js +299 -117
- package/package.json +26 -26
- package/resources/prd-requirements.md +21 -0
- package/resources/prd-template.md +21 -0
- package/resources/task-generation.md +171 -0
- package/src/index.ts +482 -236
- package/tsconfig.json +14 -18
package/README.md
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# @krr2020/taskflow-mcp-server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server that exposes Taskflow's task management capabilities to AI assistants like Claude Desktop. Delegates all logic to `@krr2020/taskflow-core` for a clean, maintainable architecture.
|
|
4
|
+
|
|
5
|
+
## 📦 Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @krr2020/taskflow-mcp-server
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 🚀 Quick Start
|
|
12
|
+
|
|
13
|
+
### Option 1: Use with Claude Desktop (Recommended)
|
|
14
|
+
|
|
15
|
+
Add to your `claude_desktop_config.json` (located at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"taskflow": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["-y", "@krr2020/taskflow-mcp-server"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
After updating the configuration:
|
|
29
|
+
1. Restart Claude Desktop
|
|
30
|
+
2. Look for the 🔌 tools menu
|
|
31
|
+
3. You should see 13 Taskflow tools available
|
|
32
|
+
|
|
33
|
+
### Option 2: Run Standalone
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx @krr2020/taskflow-mcp-server
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 🛠️ Available Tools (13 Total)
|
|
40
|
+
|
|
41
|
+
### Initialization
|
|
42
|
+
|
|
43
|
+
#### `init`
|
|
44
|
+
Initialize Taskflow in the current project.
|
|
45
|
+
|
|
46
|
+
**Inputs:**
|
|
47
|
+
- `projectName` (optional): Project name (defaults to directory name)
|
|
48
|
+
|
|
49
|
+
**Actions:**
|
|
50
|
+
- Creates `taskflow.config.json`
|
|
51
|
+
- Creates `.taskflow` directory structure
|
|
52
|
+
- Copies template files (ai-protocol.md, task-generator.md, etc.)
|
|
53
|
+
- Creates `tasks/` directory
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Status & Navigation
|
|
58
|
+
|
|
59
|
+
#### `get_status`
|
|
60
|
+
Get project status, feature status, or story status.
|
|
61
|
+
|
|
62
|
+
**Inputs:**
|
|
63
|
+
- `id` (optional): Feature ID (N) or Story ID (N.M) for specific status
|
|
64
|
+
|
|
65
|
+
**Returns:**
|
|
66
|
+
- Project overview with all features and stories
|
|
67
|
+
- Task progress and completion statistics
|
|
68
|
+
- Active task information
|
|
69
|
+
|
|
70
|
+
#### `find_next_task`
|
|
71
|
+
Find the next available task that can be worked on.
|
|
72
|
+
|
|
73
|
+
**Actions:**
|
|
74
|
+
- Checks task dependencies
|
|
75
|
+
- Returns first available task with `not-started` status
|
|
76
|
+
- Provides task details and context
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### PRD (Product Requirements Document)
|
|
81
|
+
|
|
82
|
+
#### `prd_create`
|
|
83
|
+
Create a new PRD template for defining features.
|
|
84
|
+
|
|
85
|
+
**Inputs:**
|
|
86
|
+
- `featureName` (required): Name of feature (e.g., "user-authentication")
|
|
87
|
+
|
|
88
|
+
**Actions:**
|
|
89
|
+
- Generates structured markdown template in `tasks/prds/`
|
|
90
|
+
- Includes sections: Overview, User Stories, Technical Requirements, etc.
|
|
91
|
+
|
|
92
|
+
#### `prd_generate_arch`
|
|
93
|
+
Generate coding-standards.md and ARCHITECTURE-RULES.md from a PRD.
|
|
94
|
+
|
|
95
|
+
**Inputs:**
|
|
96
|
+
- `prdFile` (required): PRD filename (e.g., "2024-01-15-user-auth.md")
|
|
97
|
+
|
|
98
|
+
**Actions:**
|
|
99
|
+
- Analyzes codebase and PRD
|
|
100
|
+
- Generates project-specific coding standards
|
|
101
|
+
- Creates architecture rules and validation patterns
|
|
102
|
+
- Saves to `.taskflow/ref/` directory
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### Task Generation
|
|
107
|
+
|
|
108
|
+
#### `tasks_generate`
|
|
109
|
+
Generate complete task breakdown from a PRD.
|
|
110
|
+
|
|
111
|
+
**Inputs:**
|
|
112
|
+
- `prdFile` (required): PRD filename to generate tasks from
|
|
113
|
+
|
|
114
|
+
**Actions:**
|
|
115
|
+
- Creates feature, story, and task hierarchy
|
|
116
|
+
- Sets up dependencies between tasks
|
|
117
|
+
- Generates `project-index.json` and task files
|
|
118
|
+
- Saves to `tasks/` directory structure
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### Task Workflow
|
|
123
|
+
|
|
124
|
+
#### `start_task`
|
|
125
|
+
Start working on a task.
|
|
126
|
+
|
|
127
|
+
**Inputs:**
|
|
128
|
+
- `taskId` (required): Task ID in format N.M.K (e.g., "1.1.0")
|
|
129
|
+
|
|
130
|
+
**Actions:**
|
|
131
|
+
- Switches to story branch (creates if needed)
|
|
132
|
+
- Loads task requirements and context
|
|
133
|
+
- Sets status to `SETUP`
|
|
134
|
+
- Provides comprehensive AI guidance
|
|
135
|
+
|
|
136
|
+
**Returns:**
|
|
137
|
+
- Task details and description
|
|
138
|
+
- Subtasks and dependencies
|
|
139
|
+
- Context files to read
|
|
140
|
+
- AI-specific execution guidance
|
|
141
|
+
|
|
142
|
+
#### `check_task`
|
|
143
|
+
Validate current task and advance to next status.
|
|
144
|
+
|
|
145
|
+
**Behavior varies by current status:**
|
|
146
|
+
- `SETUP` → `PLANNING`: Confirms task understanding
|
|
147
|
+
- `PLANNING` → `IMPLEMENTING`: Confirms execution plan is ready
|
|
148
|
+
- `IMPLEMENTING` → `VERIFYING`: Confirms code completion
|
|
149
|
+
- `VERIFYING` → `VALIDATING`: Confirms self-review
|
|
150
|
+
- `VALIDATING` → `COMMITTING`: Runs configured validation commands (format, lint, etc.)
|
|
151
|
+
- Returns validation results and next steps
|
|
152
|
+
|
|
153
|
+
#### `commit_task`
|
|
154
|
+
Commit changes and complete the task.
|
|
155
|
+
|
|
156
|
+
**Inputs:**
|
|
157
|
+
- `message` (required): Bullet points describing changes (e.g., "- Added feature X\n- Fixed bug Y")
|
|
158
|
+
|
|
159
|
+
**Actions:**
|
|
160
|
+
- Generates conventional commit message
|
|
161
|
+
- Runs `git add .`
|
|
162
|
+
- Commits with formatted message
|
|
163
|
+
- Pushes to remote
|
|
164
|
+
- Marks task as `completed`
|
|
165
|
+
- Finds next available task
|
|
166
|
+
|
|
167
|
+
**Commit Format:**
|
|
168
|
+
```
|
|
169
|
+
feat(F1): T1.1.0 - Task title
|
|
170
|
+
|
|
171
|
+
- Bullet point 1
|
|
172
|
+
- Bullet point 2
|
|
173
|
+
|
|
174
|
+
Story: S1.1
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### `resume_task`
|
|
178
|
+
Resume a blocked or on-hold task.
|
|
179
|
+
|
|
180
|
+
**Inputs:**
|
|
181
|
+
- `status` (optional): Status to resume to (setup, implementing, verifying, validating)
|
|
182
|
+
|
|
183
|
+
**Actions:**
|
|
184
|
+
- Restores task to active status
|
|
185
|
+
- Provides guidance on continuing work
|
|
186
|
+
- Loads task context
|
|
187
|
+
|
|
188
|
+
#### `block_task`
|
|
189
|
+
Mark current task as blocked.
|
|
190
|
+
|
|
191
|
+
**Inputs:**
|
|
192
|
+
- `reason` (required): Reason for blocking the task
|
|
193
|
+
|
|
194
|
+
**Actions:**
|
|
195
|
+
- Saves current status before blocking
|
|
196
|
+
- Marks task as `blocked`
|
|
197
|
+
- Clears active session
|
|
198
|
+
- Finds next available task
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
### Retrospective System
|
|
203
|
+
|
|
204
|
+
#### `add_retrospective`
|
|
205
|
+
Add a new error pattern to the retrospective.
|
|
206
|
+
|
|
207
|
+
**Inputs:**
|
|
208
|
+
- `category` (required): Error category (type_error, lint, runtime, build, test, etc.)
|
|
209
|
+
- `pattern` (required): Error pattern to match in validation output
|
|
210
|
+
- `solution` (required): Solution to the error
|
|
211
|
+
- `criticality` (optional): Criticality level (low, medium, high) - defaults to medium
|
|
212
|
+
|
|
213
|
+
**Actions:**
|
|
214
|
+
- Adds entry to `retrospective.md`
|
|
215
|
+
- Pattern will be matched against future validation failures
|
|
216
|
+
- Solution will be displayed when pattern matches
|
|
217
|
+
|
|
218
|
+
#### `list_retrospectives`
|
|
219
|
+
List all retrospective entries.
|
|
220
|
+
|
|
221
|
+
**Inputs:**
|
|
222
|
+
- `category` (optional): Filter by category
|
|
223
|
+
|
|
224
|
+
**Returns:**
|
|
225
|
+
- All retrospective entries with patterns and solutions
|
|
226
|
+
- Error occurrence counts
|
|
227
|
+
- Filterable by category
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 🏗️ Architecture
|
|
232
|
+
|
|
233
|
+
This MCP server is a thin wrapper around `@krr2020/taskflow-core`:
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
MCP Server (index.ts)
|
|
237
|
+
├── Tool Definitions (13 tools)
|
|
238
|
+
├── Input Validation (Zod schemas)
|
|
239
|
+
└── Command Delegation
|
|
240
|
+
└── @krr2020/taskflow-core
|
|
241
|
+
├── 13 Command Classes
|
|
242
|
+
└── 8 Library Modules
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Key Benefits:**
|
|
246
|
+
- Zero business logic duplication
|
|
247
|
+
- All logic in tested core package
|
|
248
|
+
- MCP server focuses on protocol translation
|
|
249
|
+
- Easy to maintain and extend
|
|
250
|
+
|
|
251
|
+
## 📊 Command Output Format
|
|
252
|
+
|
|
253
|
+
Every command returns structured output:
|
|
254
|
+
|
|
255
|
+
```typescript
|
|
256
|
+
{
|
|
257
|
+
success: boolean;
|
|
258
|
+
output: string; // Human-readable output
|
|
259
|
+
nextSteps?: string; // Next action guidance
|
|
260
|
+
aiGuidance?: string; // AI-specific instructions
|
|
261
|
+
contextFiles?: string[]; // Files to read for context
|
|
262
|
+
warnings?: string[]; // Non-fatal warnings
|
|
263
|
+
errors?: string[]; // Error details if success=false
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## 🔧 Development
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Install dependencies
|
|
271
|
+
pnpm install
|
|
272
|
+
|
|
273
|
+
# Build
|
|
274
|
+
pnpm build
|
|
275
|
+
|
|
276
|
+
# Start server
|
|
277
|
+
pnpm start
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## 📚 Related Packages
|
|
281
|
+
|
|
282
|
+
- **[@krr2020/taskflow-core](https://www.npmjs.com/package/@krr2020/taskflow-core)** - Core logic and CLI
|
|
283
|
+
- **[Main Documentation](../../README.md)** - Complete workflow documentation
|
|
284
|
+
|
|
285
|
+
## 📄 License
|
|
286
|
+
|
|
287
|
+
MIT
|