@vibetasks/mcp-server 0.1.0 → 0.2.1
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 +202 -75
- package/package.json +31 -3
- package/config/claude-code.json +0 -38
- package/scripts/install.js +0 -119
- package/scripts/install.sh +0 -104
- package/scripts/uninstall.js +0 -107
- package/src/hooks/session-end.ts +0 -75
- package/src/hooks/session-start.ts +0 -74
- package/src/index.ts +0 -165
- package/src/resources/index.ts +0 -115
- package/src/tools/index.ts +0 -414
- package/tsconfig.json +0 -21
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# VibeTasks MCP Server
|
|
2
2
|
|
|
3
|
-
Model Context Protocol (MCP) server for
|
|
3
|
+
Model Context Protocol (MCP) server for VibeTasks integration with Claude Code, Cursor, and other AI coding tools.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **11 MCP Tools** for full task management (create, read, update, delete, search, complete, vibing status, context notes, batch create with subtasks, log sessions)
|
|
8
|
+
- **Status Workflow**: `todo` -> `vibing` -> `done` - track what you're actively working on
|
|
9
|
+
- **Context Notes**: "Where I left off" notes to capture your progress and next steps
|
|
10
|
+
- **Project Auto-Detection**: Automatically tags tasks with project name from git repository
|
|
11
|
+
- **WIP Limit Awareness**: Warns when you have too many tasks in "vibing" status
|
|
8
12
|
- **3 MCP Resources** for context-aware AI (active tasks, today's tasks, upcoming tasks)
|
|
9
13
|
- **Claude Code Hooks** for automatic session logging
|
|
10
14
|
- **TodoWrite Integration** for automatic task syncing from Claude's todo lists
|
|
@@ -22,43 +26,74 @@ Model Context Protocol (MCP) server for TaskFlow integration with Claude Code, C
|
|
|
22
26
|
### Quick Install
|
|
23
27
|
|
|
24
28
|
```bash
|
|
25
|
-
#
|
|
26
|
-
npm install
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
# Install globally from npm
|
|
30
|
+
npm install -g @vibetasks/mcp-server
|
|
31
|
+
|
|
32
|
+
# Verify installation
|
|
33
|
+
vibetasks-mcp --version
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
1. Build the MCP server
|
|
33
|
-
2. Create Claude Code configuration
|
|
34
|
-
3. Set up hooks for automatic session logging
|
|
36
|
+
### Configure Claude Code
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
Edit your Claude Code config file:
|
|
39
|
+
- **macOS/Linux**: `~/.config/claude-code/config.json`
|
|
40
|
+
- **Windows**: `%APPDATA%\claude-code\config.json`
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"vibetasks": {
|
|
46
|
+
"command": "vibetasks-mcp",
|
|
47
|
+
"env": {
|
|
48
|
+
"TASKFLOW_SUPABASE_URL": "https://your-project.supabase.co",
|
|
49
|
+
"TASKFLOW_SUPABASE_KEY": "your-supabase-anon-key"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Restart Claude Code** after updating the config.
|
|
57
|
+
|
|
58
|
+
### Manual Installation (Development)
|
|
59
|
+
|
|
60
|
+
If you're developing locally instead of using the npm package:
|
|
37
61
|
|
|
38
|
-
1. **Build the server:**
|
|
39
62
|
```bash
|
|
63
|
+
# From the apps/mcp-server directory
|
|
64
|
+
npm install
|
|
40
65
|
npm run build
|
|
41
66
|
```
|
|
42
67
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
68
|
+
Then configure Claude Code with the full path:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"vibetasks": {
|
|
74
|
+
"command": "node",
|
|
75
|
+
"args": ["/absolute/path/to/taskflow/apps/mcp-server/dist/index.js"],
|
|
76
|
+
"env": {
|
|
77
|
+
"TASKFLOW_SUPABASE_URL": "https://your-project.supabase.co",
|
|
78
|
+
"TASKFLOW_SUPABASE_KEY": "your-supabase-anon-key"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
46
84
|
|
|
47
|
-
|
|
85
|
+
### Optional: Session Hooks
|
|
48
86
|
|
|
49
|
-
|
|
87
|
+
For automatic session logging (creates completed tasks when you end AI sessions):
|
|
50
88
|
|
|
51
89
|
```json
|
|
52
90
|
{
|
|
53
91
|
"mcpServers": {
|
|
54
|
-
"
|
|
55
|
-
"command": "
|
|
56
|
-
"args": [
|
|
57
|
-
"/absolute/path/to/taskflow/apps/mcp-server/dist/index.js"
|
|
58
|
-
],
|
|
92
|
+
"vibetasks": {
|
|
93
|
+
"command": "vibetasks-mcp",
|
|
59
94
|
"env": {
|
|
60
|
-
"TASKFLOW_SUPABASE_URL": "
|
|
61
|
-
"TASKFLOW_SUPABASE_KEY": "
|
|
95
|
+
"TASKFLOW_SUPABASE_URL": "...",
|
|
96
|
+
"TASKFLOW_SUPABASE_KEY": "..."
|
|
62
97
|
}
|
|
63
98
|
}
|
|
64
99
|
},
|
|
@@ -66,22 +101,20 @@ Edit `~/.config/claude-code/config.json`:
|
|
|
66
101
|
"SessionStart": [
|
|
67
102
|
{
|
|
68
103
|
"type": "command",
|
|
69
|
-
"command": "
|
|
70
|
-
"args": ["/absolute/path/to/dist/index.js"],
|
|
104
|
+
"command": "vibetasks-mcp",
|
|
71
105
|
"env": {
|
|
72
106
|
"CLAUDE_HOOK_TYPE": "SessionStart",
|
|
73
|
-
"TASKFLOW_SUPABASE_URL": "
|
|
107
|
+
"TASKFLOW_SUPABASE_URL": "..."
|
|
74
108
|
}
|
|
75
109
|
}
|
|
76
110
|
],
|
|
77
111
|
"Stop": [
|
|
78
112
|
{
|
|
79
113
|
"type": "command",
|
|
80
|
-
"command": "
|
|
81
|
-
"args": ["/absolute/path/to/dist/index.js"],
|
|
114
|
+
"command": "vibetasks-mcp",
|
|
82
115
|
"env": {
|
|
83
116
|
"CLAUDE_HOOK_TYPE": "SessionEnd",
|
|
84
|
-
"TASKFLOW_SUPABASE_URL": "
|
|
117
|
+
"TASKFLOW_SUPABASE_URL": "..."
|
|
85
118
|
}
|
|
86
119
|
}
|
|
87
120
|
]
|
|
@@ -89,8 +122,6 @@ Edit `~/.config/claude-code/config.json`:
|
|
|
89
122
|
}
|
|
90
123
|
```
|
|
91
124
|
|
|
92
|
-
4. **Restart Claude Code**
|
|
93
|
-
|
|
94
125
|
## Usage
|
|
95
126
|
|
|
96
127
|
### MCP Tools
|
|
@@ -100,7 +131,7 @@ Access tools by typing `@` in Claude Code:
|
|
|
100
131
|
#### create_task
|
|
101
132
|
Create a new task:
|
|
102
133
|
```
|
|
103
|
-
@
|
|
134
|
+
@vibetasks create_task
|
|
104
135
|
title: "Add authentication"
|
|
105
136
|
notes: "Implement OAuth with Supabase"
|
|
106
137
|
priority: "high"
|
|
@@ -108,58 +139,93 @@ Create a new task:
|
|
|
108
139
|
tags: ["backend", "security"]
|
|
109
140
|
```
|
|
110
141
|
|
|
111
|
-
####
|
|
112
|
-
|
|
142
|
+
#### create_task_with_subtasks
|
|
143
|
+
Create a parent task with subtasks in one call (perfect for TodoWrite integration):
|
|
113
144
|
```
|
|
114
|
-
@
|
|
145
|
+
@vibetasks create_task_with_subtasks
|
|
146
|
+
title: "Implement user authentication"
|
|
147
|
+
subtasks: ["Create login form", "Add API endpoints", "Implement JWT handling"]
|
|
148
|
+
priority: "high"
|
|
149
|
+
due_date: "2026-01-15"
|
|
150
|
+
tags: ["backend", "auth"]
|
|
115
151
|
```
|
|
116
152
|
|
|
117
|
-
|
|
153
|
+
**Use case:** When using Claude's TodoWrite feature, automatically mirror your todo list to VibeTasks for persistent tracking beyond the session.
|
|
118
154
|
|
|
119
|
-
####
|
|
120
|
-
|
|
155
|
+
#### list_tasks
|
|
156
|
+
Get tasks with optional status filter:
|
|
121
157
|
```
|
|
122
|
-
@
|
|
158
|
+
@vibetasks list_tasks status: "todo"
|
|
159
|
+
@vibetasks list_tasks status: "vibing"
|
|
160
|
+
@vibetasks list_tasks status: "done"
|
|
123
161
|
```
|
|
124
162
|
|
|
163
|
+
Status filters:
|
|
164
|
+
- `todo` - Tasks not yet started
|
|
165
|
+
- `vibing` - Tasks currently in progress
|
|
166
|
+
- `done` - Completed tasks
|
|
167
|
+
- (no filter) - All tasks
|
|
168
|
+
|
|
125
169
|
#### update_task
|
|
126
|
-
Update task properties:
|
|
170
|
+
Update task properties including status:
|
|
127
171
|
```
|
|
128
|
-
@
|
|
172
|
+
@vibetasks update_task
|
|
129
173
|
task_id: "abc-123..."
|
|
130
174
|
title: "Updated title"
|
|
131
175
|
priority: "medium"
|
|
176
|
+
status: "vibing"
|
|
132
177
|
```
|
|
133
178
|
|
|
134
|
-
####
|
|
135
|
-
|
|
179
|
+
#### complete_task
|
|
180
|
+
Mark a task as done:
|
|
136
181
|
```
|
|
137
|
-
@
|
|
182
|
+
@vibetasks complete_task task_id: "abc-123..."
|
|
138
183
|
```
|
|
139
184
|
|
|
140
|
-
####
|
|
141
|
-
|
|
185
|
+
#### start_vibing
|
|
186
|
+
Mark a task as "vibing" (in progress). This sets the status to `vibing` and optionally adds context notes:
|
|
142
187
|
```
|
|
143
|
-
@
|
|
188
|
+
@vibetasks start_vibing
|
|
189
|
+
task_id: "abc-123..."
|
|
190
|
+
context_notes: "Working on the login form, need to add validation next"
|
|
144
191
|
```
|
|
145
192
|
|
|
146
|
-
|
|
147
|
-
|
|
193
|
+
**WIP Limit Awareness**: If you have 3+ tasks already in "vibing" status, the tool will warn you to finish existing work before starting new tasks.
|
|
194
|
+
|
|
195
|
+
#### get_vibing_tasks
|
|
196
|
+
Get all tasks currently in "vibing" (in progress) status:
|
|
148
197
|
```
|
|
149
|
-
@
|
|
150
|
-
title: "Implement user authentication"
|
|
151
|
-
subtasks: ["Create login form", "Add API endpoints", "Implement JWT handling"]
|
|
152
|
-
priority: "high"
|
|
153
|
-
due_date: "2026-01-15"
|
|
154
|
-
tags: ["backend", "auth"]
|
|
198
|
+
@vibetasks get_vibing_tasks
|
|
155
199
|
```
|
|
156
200
|
|
|
157
|
-
|
|
201
|
+
Returns tasks you're actively working on, along with their context notes showing where you left off.
|
|
202
|
+
|
|
203
|
+
#### set_context_notes
|
|
204
|
+
Update the "where I left off" notes for a task:
|
|
205
|
+
```
|
|
206
|
+
@vibetasks set_context_notes
|
|
207
|
+
task_id: "abc-123..."
|
|
208
|
+
context_notes: "Finished the API, need to wire up the frontend next"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Use this to capture your progress before switching tasks or ending a session.
|
|
212
|
+
|
|
213
|
+
#### delete_task
|
|
214
|
+
Delete a task:
|
|
215
|
+
```
|
|
216
|
+
@vibetasks delete_task task_id: "abc-123..."
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
#### search_tasks
|
|
220
|
+
Search by title:
|
|
221
|
+
```
|
|
222
|
+
@vibetasks search_tasks query: "authentication" limit: 10
|
|
223
|
+
```
|
|
158
224
|
|
|
159
225
|
#### log_ai_session
|
|
160
226
|
Manually log a session:
|
|
161
227
|
```
|
|
162
|
-
@
|
|
228
|
+
@vibetasks log_ai_session
|
|
163
229
|
summary: "Implemented user authentication"
|
|
164
230
|
files: ["auth.ts", "login.tsx"]
|
|
165
231
|
duration_minutes: 45
|
|
@@ -169,12 +235,54 @@ Manually log a session:
|
|
|
169
235
|
|
|
170
236
|
Resources provide automatic context to AI:
|
|
171
237
|
|
|
172
|
-
- `
|
|
173
|
-
- `
|
|
174
|
-
- `
|
|
238
|
+
- `vibetasks://tasks/active` - All incomplete tasks
|
|
239
|
+
- `vibetasks://tasks/today` - Tasks due today
|
|
240
|
+
- `vibetasks://tasks/upcoming` - Future tasks
|
|
241
|
+
- `vibetasks://tasks/vibing` - Tasks currently in progress (with context notes)
|
|
175
242
|
|
|
176
243
|
The AI can access these without explicit tool calls.
|
|
177
244
|
|
|
245
|
+
### Status Workflow
|
|
246
|
+
|
|
247
|
+
VibeTasks uses a simple 3-state workflow:
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
todo -> vibing -> done
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
- **todo**: Task is captured but not started
|
|
254
|
+
- **vibing**: You're actively working on this task (WIP)
|
|
255
|
+
- **done**: Task is complete
|
|
256
|
+
|
|
257
|
+
**Why "vibing"?** It's a playful term for "work in progress" that fits the vibe coding culture. When you're vibing on a task, you're in the zone.
|
|
258
|
+
|
|
259
|
+
### Context Notes ("Where I Left Off")
|
|
260
|
+
|
|
261
|
+
Each task can have context notes that capture your progress:
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
@vibetasks set_context_notes
|
|
265
|
+
task_id: "abc-123..."
|
|
266
|
+
context_notes: "Finished auth API, need to add frontend form. Check auth.ts for the endpoint structure."
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Context notes are shown when you:
|
|
270
|
+
- Call `get_vibing_tasks` - see where you left off on all active work
|
|
271
|
+
- Start a new session - AI sees your current context
|
|
272
|
+
- Switch between tasks - never lose your place
|
|
273
|
+
|
|
274
|
+
### Project Auto-Detection
|
|
275
|
+
|
|
276
|
+
When you create tasks, VibeTasks automatically detects your current project from git:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
# In a git repo with remote "github.com/user/my-project"
|
|
280
|
+
@vibetasks create_task title: "Fix bug"
|
|
281
|
+
# Task is auto-tagged with "my-project"
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
This helps filter tasks by project when you have multiple codebases.
|
|
285
|
+
|
|
178
286
|
### Automatic Session Logging
|
|
179
287
|
|
|
180
288
|
When Claude Code hooks are configured:
|
|
@@ -250,28 +358,30 @@ CLAUDE_HOOK_TYPE=SessionEnd node dist/index.js
|
|
|
250
358
|
|
|
251
359
|
### Server Not Appearing in Claude Code
|
|
252
360
|
|
|
253
|
-
1. Check config file:
|
|
254
|
-
|
|
361
|
+
1. Check config file location:
|
|
362
|
+
- macOS/Linux: `~/.config/claude-code/config.json`
|
|
363
|
+
- Windows: `%APPDATA%\claude-code\config.json`
|
|
364
|
+
2. Verify `vibetasks-mcp` is installed: `vibetasks-mcp --version`
|
|
255
365
|
3. Check logs: Restart Claude Code with verbose logging
|
|
256
|
-
4. Verify authentication: `
|
|
366
|
+
4. Verify authentication: `vibetasks config`
|
|
257
367
|
|
|
258
368
|
### Authentication Errors
|
|
259
369
|
|
|
260
370
|
```bash
|
|
261
|
-
# Re-login to
|
|
262
|
-
|
|
371
|
+
# Re-login to VibeTasks
|
|
372
|
+
vibetasks login
|
|
263
373
|
|
|
264
374
|
# Verify tokens are stored
|
|
265
|
-
|
|
375
|
+
vibetasks config
|
|
266
376
|
```
|
|
267
377
|
|
|
268
378
|
### Hooks Not Working
|
|
269
379
|
|
|
270
380
|
1. Check hook configuration in `config.json`
|
|
271
|
-
2. Verify
|
|
381
|
+
2. Verify environment variables are set correctly
|
|
272
382
|
3. Test hooks manually:
|
|
273
383
|
```bash
|
|
274
|
-
CLAUDE_HOOK_TYPE=SessionStart
|
|
384
|
+
CLAUDE_HOOK_TYPE=SessionStart vibetasks-mcp
|
|
275
385
|
```
|
|
276
386
|
|
|
277
387
|
## Architecture
|
|
@@ -284,15 +394,16 @@ CLAUDE_HOOK_TYPE=SessionStart node dist/index.js
|
|
|
284
394
|
│ STDIO
|
|
285
395
|
│
|
|
286
396
|
┌────────▼────────┐
|
|
287
|
-
│
|
|
288
|
-
│ - Tools
|
|
397
|
+
│ VibeTasks MCP │
|
|
398
|
+
│ - 11 Tools │
|
|
289
399
|
│ - Resources │
|
|
290
|
-
│ -
|
|
400
|
+
│ - Status Flow │
|
|
401
|
+
│ - Context Notes│
|
|
291
402
|
└────────┬────────┘
|
|
292
403
|
│
|
|
293
404
|
┌────────▼────────┐
|
|
294
|
-
│ @
|
|
295
|
-
│
|
|
405
|
+
│ @vibetasks/ │
|
|
406
|
+
│ core │
|
|
296
407
|
└────────┬────────┘
|
|
297
408
|
│
|
|
298
409
|
┌────────▼────────┐
|
|
@@ -301,6 +412,22 @@ CLAUDE_HOOK_TYPE=SessionStart node dist/index.js
|
|
|
301
412
|
└─────────────────┘
|
|
302
413
|
```
|
|
303
414
|
|
|
415
|
+
## Tool Reference
|
|
416
|
+
|
|
417
|
+
| Tool | Description |
|
|
418
|
+
|------|-------------|
|
|
419
|
+
| `create_task` | Create a new task (with optional parent for subtasks) |
|
|
420
|
+
| `create_task_with_subtasks` | Create parent + multiple subtasks in one call |
|
|
421
|
+
| `list_tasks` | Get tasks with status filter (todo, vibing, done) |
|
|
422
|
+
| `update_task` | Update task properties including status |
|
|
423
|
+
| `complete_task` | Mark task as done |
|
|
424
|
+
| `start_vibing` | Mark task as in progress with optional context |
|
|
425
|
+
| `get_vibing_tasks` | Get all tasks currently in progress |
|
|
426
|
+
| `set_context_notes` | Update "where I left off" notes |
|
|
427
|
+
| `delete_task` | Delete a task |
|
|
428
|
+
| `search_tasks` | Search tasks by title |
|
|
429
|
+
| `log_ai_session` | Log an AI coding session |
|
|
430
|
+
|
|
304
431
|
## Contributing
|
|
305
432
|
|
|
306
433
|
See [main README](../../README.md) for contribution guidelines.
|
package/package.json
CHANGED
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibetasks/mcp-server",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"description": "VibeTasks MCP Server for Claude Code and
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "VibeTasks MCP Server for Claude Code, Cursor, and AI coding tools. Status-based task management: todo → vibing → done.",
|
|
5
|
+
"author": "Vyas",
|
|
6
|
+
"license": "MIT",
|
|
5
7
|
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
6
9
|
"bin": {
|
|
7
10
|
"vibetasks-mcp": "./dist/index.js"
|
|
8
11
|
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"vibetasks",
|
|
17
|
+
"vibe",
|
|
18
|
+
"vibecoding",
|
|
19
|
+
"mcp",
|
|
20
|
+
"mcp-server",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"claude-code",
|
|
23
|
+
"cursor",
|
|
24
|
+
"ai-tools",
|
|
25
|
+
"task-management",
|
|
26
|
+
"productivity"
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/vyassathya/vibetasks.git",
|
|
31
|
+
"directory": "apps/mcp-server"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://vibetasks.dev",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/vyassathya/vibetasks/issues"
|
|
36
|
+
},
|
|
9
37
|
"scripts": {
|
|
10
38
|
"dev": "tsx src/index.ts",
|
|
11
39
|
"build": "tsup src/index.ts --format esm --clean --outDir dist --shims",
|
|
@@ -17,7 +45,7 @@
|
|
|
17
45
|
},
|
|
18
46
|
"dependencies": {
|
|
19
47
|
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
20
|
-
"@vibetasks/core": "^0.
|
|
48
|
+
"@vibetasks/core": "^0.2.0",
|
|
21
49
|
"zod": "^3.22.0"
|
|
22
50
|
},
|
|
23
51
|
"devDependencies": {
|
package/config/claude-code.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"mcpServers": {
|
|
3
|
-
"taskflow": {
|
|
4
|
-
"command": "node",
|
|
5
|
-
"args": [
|
|
6
|
-
"REPLACE_WITH_PATH_TO_DIST/index.js"
|
|
7
|
-
],
|
|
8
|
-
"env": {
|
|
9
|
-
"TASKFLOW_SUPABASE_URL": "https://cbkkztbcoitrfcleghfd.supabase.co",
|
|
10
|
-
"TASKFLOW_SUPABASE_KEY": "REPLACE_WITH_ANON_KEY"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"hooks": {
|
|
15
|
-
"SessionStart": [
|
|
16
|
-
{
|
|
17
|
-
"type": "command",
|
|
18
|
-
"command": "node",
|
|
19
|
-
"args": ["REPLACE_WITH_PATH_TO_DIST/index.js"],
|
|
20
|
-
"env": {
|
|
21
|
-
"CLAUDE_HOOK_TYPE": "SessionStart",
|
|
22
|
-
"TASKFLOW_SUPABASE_URL": "https://cbkkztbcoitrfcleghfd.supabase.co"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"Stop": [
|
|
27
|
-
{
|
|
28
|
-
"type": "command",
|
|
29
|
-
"command": "node",
|
|
30
|
-
"args": ["REPLACE_WITH_PATH_TO_DIST/index.js"],
|
|
31
|
-
"env": {
|
|
32
|
-
"CLAUDE_HOOK_TYPE": "SessionEnd",
|
|
33
|
-
"TASKFLOW_SUPABASE_URL": "https://cbkkztbcoitrfcleghfd.supabase.co"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
}
|
package/scripts/install.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import fs from 'fs/promises';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import os from 'os';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
|
-
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = path.dirname(__filename);
|
|
10
|
-
|
|
11
|
-
async function install() {
|
|
12
|
-
try {
|
|
13
|
-
// Determine Claude Code config location
|
|
14
|
-
const configHome = process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config');
|
|
15
|
-
const claudeConfigDir = path.join(configHome, 'claude-code');
|
|
16
|
-
const claudeConfigPath = path.join(claudeConfigDir, 'config.json');
|
|
17
|
-
|
|
18
|
-
// Get absolute path to MCP server
|
|
19
|
-
const mcpServerPath = path.resolve(__dirname, '..', 'dist', 'index.js');
|
|
20
|
-
|
|
21
|
-
// Read Supabase credentials from web app .env
|
|
22
|
-
const webEnvPath = path.resolve(__dirname, '..', '..', '..', 'apps', 'web', '.env.local');
|
|
23
|
-
let supabaseUrl = 'https://cbkkztbcoitrfcleghfd.supabase.co';
|
|
24
|
-
let supabaseKey = '';
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
const envContent = await fs.readFile(webEnvPath, 'utf-8');
|
|
28
|
-
const urlMatch = envContent.match(/NEXT_PUBLIC_SUPABASE_URL=(.+)/);
|
|
29
|
-
const keyMatch = envContent.match(/NEXT_PUBLIC_SUPABASE_ANON_KEY=(.+)/);
|
|
30
|
-
|
|
31
|
-
if (urlMatch) supabaseUrl = urlMatch[1].trim();
|
|
32
|
-
if (keyMatch) supabaseKey = keyMatch[1].trim();
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.warn('⚠️ Could not read .env.local, using defaults');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Read existing config or create new
|
|
38
|
-
let config = {};
|
|
39
|
-
try {
|
|
40
|
-
const existingConfig = await fs.readFile(claudeConfigPath, 'utf-8');
|
|
41
|
-
config = JSON.parse(existingConfig);
|
|
42
|
-
} catch (error) {
|
|
43
|
-
// Config doesn't exist, will create new
|
|
44
|
-
await fs.mkdir(claudeConfigDir, { recursive: true });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Add TaskFlow MCP server
|
|
48
|
-
if (!config.mcpServers) config.mcpServers = {};
|
|
49
|
-
|
|
50
|
-
config.mcpServers.taskflow = {
|
|
51
|
-
command: 'node',
|
|
52
|
-
args: [mcpServerPath],
|
|
53
|
-
env: {
|
|
54
|
-
TASKFLOW_SUPABASE_URL: supabaseUrl,
|
|
55
|
-
TASKFLOW_SUPABASE_KEY: supabaseKey
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
// Add hooks
|
|
60
|
-
if (!config.hooks) config.hooks = {};
|
|
61
|
-
|
|
62
|
-
config.hooks.SessionStart = config.hooks.SessionStart || [];
|
|
63
|
-
config.hooks.Stop = config.hooks.Stop || [];
|
|
64
|
-
|
|
65
|
-
// Add SessionStart hook if not already present
|
|
66
|
-
const sessionStartExists = config.hooks.SessionStart.some(
|
|
67
|
-
h => h.command === 'node' && h.args?.[0] === mcpServerPath
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
if (!sessionStartExists) {
|
|
71
|
-
config.hooks.SessionStart.push({
|
|
72
|
-
type: 'command',
|
|
73
|
-
command: 'node',
|
|
74
|
-
args: [mcpServerPath],
|
|
75
|
-
env: {
|
|
76
|
-
CLAUDE_HOOK_TYPE: 'SessionStart',
|
|
77
|
-
TASKFLOW_SUPABASE_URL: supabaseUrl
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Add SessionEnd (Stop) hook if not already present
|
|
83
|
-
const sessionEndExists = config.hooks.Stop.some(
|
|
84
|
-
h => h.command === 'node' && h.args?.[0] === mcpServerPath
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
if (!sessionEndExists) {
|
|
88
|
-
config.hooks.Stop.push({
|
|
89
|
-
type: 'command',
|
|
90
|
-
command: 'node',
|
|
91
|
-
args: [mcpServerPath],
|
|
92
|
-
env: {
|
|
93
|
-
CLAUDE_HOOK_TYPE: 'SessionEnd',
|
|
94
|
-
TASKFLOW_SUPABASE_URL: supabaseUrl
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Write config
|
|
100
|
-
await fs.writeFile(claudeConfigPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
101
|
-
|
|
102
|
-
console.log('✓ TaskFlow MCP server installed successfully!');
|
|
103
|
-
console.log('\nConfiguration written to:', claudeConfigPath);
|
|
104
|
-
console.log('\nMCP Server path:', mcpServerPath);
|
|
105
|
-
console.log('\n📝 Next steps:');
|
|
106
|
-
console.log('1. Restart Claude Code');
|
|
107
|
-
console.log('2. Type "@" in chat to see TaskFlow tools');
|
|
108
|
-
console.log('3. Tools available: create_task, get_tasks, complete_task, etc.');
|
|
109
|
-
console.log('\n💡 Hooks installed:');
|
|
110
|
-
console.log('- SessionStart: Loads your tasks automatically');
|
|
111
|
-
console.log('- SessionEnd: Auto-logs completed work as tasks');
|
|
112
|
-
|
|
113
|
-
} catch (error) {
|
|
114
|
-
console.error('❌ Installation failed:', error.message);
|
|
115
|
-
process.exit(1);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
install();
|