@opentask/taskin-task-server-mcp 0.1.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 ADDED
@@ -0,0 +1,119 @@
1
+ # @opentask/taskin-mcp
2
+
3
+ Model Context Protocol (MCP) server for task management integration with LLMs like Claude, GPT-4, and GitHub Copilot.
4
+
5
+ ## Features
6
+
7
+ - ✅ Full MCP protocol implementation
8
+ - ✅ Exposes task operations as MCP tools
9
+ - ✅ Task context via MCP resources
10
+ - ✅ Task templates via MCP prompts
11
+ - ✅ Real-time task updates
12
+ - ✅ TypeScript support
13
+ - ✅ Auto-discovery in VS Code and Claude Desktop
14
+
15
+ ## Quick Start
16
+
17
+ ### VS Code (GitHub Copilot)
18
+
19
+ The server will appear automatically in VS Code's MCP server list after installation:
20
+
21
+ ```bash
22
+ npm install -g @opentask/taskin-mcp
23
+ ```
24
+
25
+ Then in VS Code:
26
+
27
+ 1. Open Command Palette (`Cmd+Shift+P`)
28
+ 2. Search for "Configure Tools"
29
+ 3. Find "taskin" in the MCP servers list
30
+ 4. Enable it
31
+
32
+ Or add manually to your `settings.json`:
33
+
34
+ ```json
35
+ {
36
+ "github.copilot.chat.mcpServers": {
37
+ "taskin": {
38
+ "command": "taskin-mcp-server"
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ ### Claude Desktop
45
+
46
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
47
+
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "taskin": {
52
+ "args": ["-y", "@opentask/taskin-task-server-mcp"],
53
+ "command": "npx"
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ ## Installation
60
+
61
+ ### Global (Recommended)
62
+
63
+ ```bash
64
+ npm install -g @opentask/taskin-mcp
65
+ ```
66
+
67
+ ### Project-specific
68
+
69
+ ```bash
70
+ pnpm add @opentask/taskin-mcp
71
+ ```
72
+
73
+ ## Programmatic Usage
74
+
75
+ ```typescript
76
+ import { createTaskManager } from '@opentask/taskin-task-manager';
77
+ import { createTaskMCPServer } from '@opentask/taskin-task-server-mcp';
78
+
79
+ // Create task manager with your provider
80
+ const taskManager = createTaskManager({
81
+ provider: 'fs',
82
+ config: { tasksDirectory: './TASKS' },
83
+ });
84
+
85
+ // Start MCP server
86
+ const server = createTaskMCPServer(taskManager, {
87
+ name: 'taskin-server',
88
+ version: '1.0.0',
89
+ });
90
+
91
+ await server.connect({
92
+ transport: 'stdio', // or 'sse'
93
+ });
94
+
95
+ console.log('MCP server running');
96
+ ```
97
+
98
+ ## MCP Tools
99
+
100
+ - `list_tasks` - List all tasks with filters
101
+ - `get_task` - Get task details
102
+ - `start_task` - Start working on a task
103
+ - `finish_task` - Mark task as complete
104
+ - `pause_task` - Pause task work
105
+ - `lint_tasks` - Validate tasks
106
+
107
+ ## MCP Resources
108
+
109
+ - `task://{taskId}` - Get full task context
110
+ - `tasks://status/{status}` - Get tasks by status
111
+
112
+ ## MCP Prompts
113
+
114
+ - `start-task` - Template for starting a task
115
+ - `review-task` - Template for reviewing a task
116
+
117
+ ## License
118
+
119
+ MIT © [OpenTask](https://opentask.com.br)
@@ -0,0 +1,3 @@
1
+ export * from './task-server-mcp.js';
2
+ export * from './task-server-mcp.types.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './task-server-mcp.js';
2
+ export * from './task-server-mcp.types.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,83 @@
1
+ import type { ITaskManager } from '@opentask/taskin-task-manager';
2
+ import type { ITaskMCPServer, MCPConnectionOptions, MCPPrompt, MCPPromptGetParams, MCPPromptGetResult, MCPResourceListResult, MCPResourceReadParams, MCPServerConfig, MCPTool, MCPToolCallParams, MCPToolCallResult } from './task-server-mcp.types.js';
3
+ /**
4
+ * MCP Server for task management integration with LLMs
5
+ */
6
+ export declare class TaskMCPServer implements ITaskMCPServer {
7
+ private server;
8
+ private taskManager;
9
+ private config;
10
+ constructor(config: MCPServerConfig);
11
+ /**
12
+ * Setup MCP request handlers
13
+ */
14
+ private setupHandlers;
15
+ /**
16
+ * Connect to MCP transport
17
+ */
18
+ connect(options: MCPConnectionOptions): Promise<void>;
19
+ /**
20
+ * Get server information
21
+ */
22
+ getServerInfo(): {
23
+ name: string;
24
+ version: string;
25
+ protocolVersion: string;
26
+ capabilities: {
27
+ tools: {};
28
+ prompts: {};
29
+ resources: {};
30
+ };
31
+ };
32
+ /**
33
+ * List available tools
34
+ */
35
+ listTools(): {
36
+ tools: MCPTool[];
37
+ };
38
+ /**
39
+ * Call a tool
40
+ */
41
+ callTool(params: MCPToolCallParams): Promise<MCPToolCallResult>;
42
+ /**
43
+ * Handle start_task tool
44
+ */
45
+ private handleStartTask;
46
+ /**
47
+ * Handle finish_task tool
48
+ */
49
+ private handleFinishTask;
50
+ /**
51
+ * List available prompts
52
+ */
53
+ listPrompts(): {
54
+ prompts: MCPPrompt[];
55
+ };
56
+ /**
57
+ * Get a prompt
58
+ */
59
+ getPrompt(params: MCPPromptGetParams): Promise<MCPPromptGetResult>;
60
+ /**
61
+ * List available resources
62
+ */
63
+ listResources(): Promise<MCPResourceListResult>;
64
+ /**
65
+ * Read a resource
66
+ */
67
+ readResource(params: MCPResourceReadParams): Promise<{
68
+ contents: {
69
+ uri: string;
70
+ mimeType: string;
71
+ text: string;
72
+ }[];
73
+ }>;
74
+ /**
75
+ * Debug logging
76
+ */
77
+ private log;
78
+ }
79
+ /**
80
+ * Create and connect a MCP server for task management
81
+ */
82
+ export declare function createTaskMCPServer(taskManager: ITaskManager, options?: Partial<MCPServerConfig>): Promise<TaskMCPServer>;
83
+ //# sourceMappingURL=task-server-mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.d.ts","sourceRoot":"","sources":["../src/task-server-mcp.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,MAAM,CAA4B;gBAE9B,MAAM,EAAE,eAAe;IA4BnC;;OAEG;IACH,OAAO,CAAC,aAAa;IAsErB;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D;;OAEG;IACH,aAAa;;;;;;;;;;IAab;;OAEG;IACH,SAAS,IAAI;QAAE,KAAK,EAAE,OAAO,EAAE,CAAA;KAAE;IAoCjC;;OAEG;IACG,QAAQ,CAAC,MAAM,EAAE,iBAAiB;IAsCxC;;OAEG;YACW,eAAe;IA0B7B;;OAEG;YACW,gBAAgB;IA0B9B;;OAEG;IACH,WAAW,IAAI;QAAE,OAAO,EAAE,SAAS,EAAE,CAAA;KAAE;IA2CvC;;OAEG;IACG,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAsFxE;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAerD;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,qBAAqB;;;;;;;IAyBhD;;OAEG;IACH,OAAO,CAAC,GAAG;CAKZ;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,YAAY,EACzB,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GACjC,OAAO,CAAC,aAAa,CAAC,CAUxB"}
@@ -0,0 +1,427 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import { CallToolRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
4
+ /**
5
+ * MCP Server for task management integration with LLMs
6
+ */
7
+ export class TaskMCPServer {
8
+ server;
9
+ taskManager;
10
+ config;
11
+ constructor(config) {
12
+ this.taskManager = config.taskManager;
13
+ this.config = {
14
+ name: 'taskin-mcp-server',
15
+ version: '1.0.0',
16
+ debug: false,
17
+ ...config,
18
+ taskManager: config.taskManager,
19
+ };
20
+ // Initialize MCP Server
21
+ this.server = new Server({
22
+ name: this.config.name,
23
+ version: this.config.version,
24
+ }, {
25
+ capabilities: {
26
+ tools: {},
27
+ prompts: {},
28
+ resources: {},
29
+ },
30
+ });
31
+ this.setupHandlers();
32
+ }
33
+ /**
34
+ * Setup MCP request handlers
35
+ */
36
+ setupHandlers() {
37
+ // List available tools
38
+ this.server.setRequestHandler(ListToolsRequestSchema, async () => {
39
+ const { tools } = this.listTools();
40
+ return { tools };
41
+ });
42
+ // Call a tool
43
+ this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
44
+ const result = await this.callTool({
45
+ name: request.params.name,
46
+ arguments: request.params.arguments,
47
+ });
48
+ // MCP SDK expects a content array
49
+ return {
50
+ content: [
51
+ {
52
+ type: 'text',
53
+ text: result.content,
54
+ },
55
+ ],
56
+ isError: result.isError,
57
+ };
58
+ });
59
+ // List available prompts
60
+ this.server.setRequestHandler(ListPromptsRequestSchema, async () => {
61
+ const { prompts } = this.listPrompts();
62
+ return { prompts };
63
+ });
64
+ // Get a prompt
65
+ this.server.setRequestHandler(GetPromptRequestSchema, async (request) => {
66
+ const result = await this.getPrompt({
67
+ name: request.params.name,
68
+ arguments: request.params.arguments,
69
+ });
70
+ // MCP SDK expects a messages array
71
+ return {
72
+ messages: result.messages.map((msg) => ({
73
+ role: msg.role,
74
+ content: {
75
+ type: 'text',
76
+ text: msg.content,
77
+ },
78
+ })),
79
+ };
80
+ });
81
+ // List available resources
82
+ this.server.setRequestHandler(ListResourcesRequestSchema, async () => {
83
+ const result = await this.listResources();
84
+ return { resources: result.resources };
85
+ });
86
+ // Read a resource
87
+ this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
88
+ const result = await this.readResource({
89
+ uri: request.params.uri,
90
+ });
91
+ return result;
92
+ });
93
+ }
94
+ /**
95
+ * Connect to MCP transport
96
+ */
97
+ async connect(options) {
98
+ if (options.transport === 'stdio') {
99
+ const transport = new StdioServerTransport();
100
+ await this.server.connect(transport);
101
+ this.log('MCP Server connected via stdio');
102
+ }
103
+ else {
104
+ throw new Error(`Transport ${options.transport} not yet implemented`);
105
+ }
106
+ }
107
+ /**
108
+ * Get server information
109
+ */
110
+ getServerInfo() {
111
+ return {
112
+ name: this.config.name,
113
+ version: this.config.version,
114
+ protocolVersion: '2024-11-05',
115
+ capabilities: {
116
+ tools: {},
117
+ prompts: {},
118
+ resources: {},
119
+ },
120
+ };
121
+ }
122
+ /**
123
+ * List available tools
124
+ */
125
+ listTools() {
126
+ const tools = [
127
+ {
128
+ name: 'start_task',
129
+ description: 'Start working on a task by changing its status to in-progress',
130
+ inputSchema: {
131
+ type: 'object',
132
+ properties: {
133
+ taskId: {
134
+ type: 'string',
135
+ description: 'The unique identifier of the task (UUID)',
136
+ },
137
+ },
138
+ required: ['taskId'],
139
+ },
140
+ },
141
+ {
142
+ name: 'finish_task',
143
+ description: 'Mark a task as completed by changing its status to done',
144
+ inputSchema: {
145
+ type: 'object',
146
+ properties: {
147
+ taskId: {
148
+ type: 'string',
149
+ description: 'The unique identifier of the task (UUID)',
150
+ },
151
+ },
152
+ required: ['taskId'],
153
+ },
154
+ },
155
+ ];
156
+ return { tools };
157
+ }
158
+ /**
159
+ * Call a tool
160
+ */
161
+ async callTool(params) {
162
+ try {
163
+ this.log(`Calling tool: ${params.name}`, params.arguments);
164
+ switch (params.name) {
165
+ case 'start_task':
166
+ return await this.handleStartTask(params.arguments?.taskId);
167
+ case 'finish_task':
168
+ return await this.handleFinishTask(params.arguments?.taskId);
169
+ default:
170
+ return {
171
+ content: [
172
+ {
173
+ type: 'text',
174
+ text: `Unknown tool: ${params.name}`,
175
+ },
176
+ ],
177
+ isError: true,
178
+ };
179
+ }
180
+ }
181
+ catch (error) {
182
+ this.log('Tool call error:', error);
183
+ return {
184
+ content: [
185
+ {
186
+ type: 'text',
187
+ text: error instanceof Error ? error.message : String(error),
188
+ },
189
+ ],
190
+ isError: true,
191
+ };
192
+ }
193
+ }
194
+ /**
195
+ * Handle start_task tool
196
+ */
197
+ async handleStartTask(taskId) {
198
+ const task = await this.taskManager.startTask(taskId);
199
+ return {
200
+ content: [
201
+ {
202
+ type: 'text',
203
+ text: JSON.stringify({
204
+ success: true,
205
+ message: `Task ${taskId} started successfully`,
206
+ task: {
207
+ id: task.id,
208
+ title: task.title,
209
+ status: task.status,
210
+ type: task.type,
211
+ },
212
+ }, null, 2),
213
+ },
214
+ ],
215
+ };
216
+ }
217
+ /**
218
+ * Handle finish_task tool
219
+ */
220
+ async handleFinishTask(taskId) {
221
+ const task = await this.taskManager.finishTask(taskId);
222
+ return {
223
+ content: [
224
+ {
225
+ type: 'text',
226
+ text: JSON.stringify({
227
+ success: true,
228
+ message: `Task ${taskId} finished successfully`,
229
+ task: {
230
+ id: task.id,
231
+ title: task.title,
232
+ status: task.status,
233
+ type: task.type,
234
+ },
235
+ }, null, 2),
236
+ },
237
+ ],
238
+ };
239
+ }
240
+ /**
241
+ * List available prompts
242
+ */
243
+ listPrompts() {
244
+ const prompts = [
245
+ {
246
+ name: 'start-task-workflow',
247
+ description: 'Guide the user through starting work on a task with git branch creation',
248
+ arguments: [
249
+ {
250
+ name: 'taskId',
251
+ description: 'The task ID to start',
252
+ required: true,
253
+ },
254
+ ],
255
+ },
256
+ {
257
+ name: 'finish-task-workflow',
258
+ description: 'Guide the user through completing a task with commit and PR creation',
259
+ arguments: [
260
+ {
261
+ name: 'taskId',
262
+ description: 'The task ID to finish',
263
+ required: true,
264
+ },
265
+ ],
266
+ },
267
+ {
268
+ name: 'task-summary',
269
+ description: 'Generate a summary of a task for documentation or reports',
270
+ arguments: [
271
+ {
272
+ name: 'taskId',
273
+ description: 'The task ID to summarize',
274
+ required: true,
275
+ },
276
+ ],
277
+ },
278
+ ];
279
+ return { prompts };
280
+ }
281
+ /**
282
+ * Get a prompt
283
+ */
284
+ async getPrompt(params) {
285
+ this.log(`Getting prompt: ${params.name}`, params.arguments);
286
+ switch (params.name) {
287
+ case 'start-task-workflow':
288
+ return {
289
+ description: 'Workflow for starting a task',
290
+ messages: [
291
+ {
292
+ role: 'user',
293
+ content: {
294
+ type: 'text',
295
+ text: `I want to start working on task ${params.arguments?.taskId}. Can you help me set everything up?`,
296
+ },
297
+ },
298
+ {
299
+ role: 'assistant',
300
+ content: {
301
+ type: 'text',
302
+ text: `I'll help you start working on task ${params.arguments?.taskId}. Here's what I'll do:
303
+
304
+ 1. Mark the task as "in-progress"
305
+ 2. Create a git branch based on the task type and ID
306
+ 3. Ensure your working directory is clean
307
+ 4. Switch to the new branch
308
+
309
+ Let me start by marking the task as in-progress using the start_task tool.`,
310
+ },
311
+ },
312
+ ],
313
+ };
314
+ case 'finish-task-workflow':
315
+ return {
316
+ description: 'Workflow for finishing a task',
317
+ messages: [
318
+ {
319
+ role: 'user',
320
+ content: {
321
+ type: 'text',
322
+ text: `I've completed task ${params.arguments?.taskId}. What should I do next?`,
323
+ },
324
+ },
325
+ {
326
+ role: 'assistant',
327
+ content: {
328
+ type: 'text',
329
+ text: `Great! Let me help you finish task ${params.arguments?.taskId}. Here's the workflow:
330
+
331
+ 1. Mark the task as "done"
332
+ 2. Ensure all changes are committed
333
+ 3. Push your branch to remote
334
+ 4. Create a pull request
335
+
336
+ Let me start by marking the task as done using the finish_task tool.`,
337
+ },
338
+ },
339
+ ],
340
+ };
341
+ case 'task-summary':
342
+ return {
343
+ description: 'Generate task summary',
344
+ messages: [
345
+ {
346
+ role: 'user',
347
+ content: {
348
+ type: 'text',
349
+ text: `Can you provide a summary of task ${params.arguments?.taskId}?`,
350
+ },
351
+ },
352
+ {
353
+ role: 'assistant',
354
+ content: {
355
+ type: 'text',
356
+ text: `I'll generate a comprehensive summary of task ${params.arguments?.taskId} including its current status, description, and any relevant metadata.`,
357
+ },
358
+ },
359
+ ],
360
+ };
361
+ default:
362
+ throw new Error(`Unknown prompt: ${params.name}`);
363
+ }
364
+ }
365
+ /**
366
+ * List available resources
367
+ */
368
+ async listResources() {
369
+ // In a real implementation, we would list all tasks as resources
370
+ // For now, returning an example structure
371
+ return {
372
+ resources: [
373
+ {
374
+ uri: 'taskin://tasks',
375
+ name: 'All Tasks',
376
+ description: 'Access to all tasks in the system',
377
+ mimeType: 'application/json',
378
+ },
379
+ ],
380
+ };
381
+ }
382
+ /**
383
+ * Read a resource
384
+ */
385
+ async readResource(params) {
386
+ this.log(`Reading resource: ${params.uri}`);
387
+ // Parse URI (e.g., "taskin://tasks" or "taskin://task/123")
388
+ const uri = params.uri;
389
+ if (uri === 'taskin://tasks') {
390
+ // In a real implementation, we would fetch all tasks
391
+ return {
392
+ contents: [
393
+ {
394
+ uri,
395
+ mimeType: 'application/json',
396
+ text: JSON.stringify({
397
+ message: 'Task list would be here',
398
+ note: 'Requires ITaskProvider integration',
399
+ }),
400
+ },
401
+ ],
402
+ };
403
+ }
404
+ throw new Error(`Unknown resource: ${uri}`);
405
+ }
406
+ /**
407
+ * Debug logging
408
+ */
409
+ log(...args) {
410
+ if (this.config.debug) {
411
+ console.error('[TaskMCPServer]', ...args);
412
+ }
413
+ }
414
+ }
415
+ /**
416
+ * Create and connect a MCP server for task management
417
+ */
418
+ export async function createTaskMCPServer(taskManager, options) {
419
+ const server = new TaskMCPServer({
420
+ taskManager,
421
+ ...options,
422
+ });
423
+ // Default to stdio transport
424
+ await server.connect({ transport: 'stdio' });
425
+ return server;
426
+ }
427
+ //# sourceMappingURL=task-server-mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.js","sourceRoot":"","sources":["../src/task-server-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAgB5C;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,MAAM,CAAS;IACf,WAAW,CAAe;IAC1B,MAAM,CAA4B;IAE1C,YAAY,MAAuB;QACjC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG;YACZ,IAAI,EAAE,mBAAmB;YACzB,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,KAAK;YACZ,GAAG,MAAM;YACT,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC,CAAC;QAEF,wBAAwB;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CACtB;YACE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;YACtB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;SAC7B,EACD;YACE,YAAY,EAAE;gBACZ,KAAK,EAAE,EAAE;gBACT,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,EAAE;aACd;SACF,CACF,CAAC;QAEF,IAAI,CAAC,aAAa,E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,aAAa,CAAC;QAC/B,WAAW;QACX,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,6BAA6B;IAC7B,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IAE7C,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { CreateTaskOptions, CreateTaskResult, ITaskManager, LintResult, TaskFile } from '@opentask/taskin-task-manager';
2
+ import type { MCPServerConfig } from './task-server-mcp.types.js';
3
+ /**
4
+ * Mock TaskManager for MCP testing
5
+ */
6
+ export declare class MockMCPTaskManager implements ITaskManager {
7
+ private tasks;
8
+ constructor();
9
+ startTask(taskId: string): Promise<TaskFile>;
10
+ finishTask(taskId: string): Promise<TaskFile>;
11
+ createTask(options: CreateTaskOptions): Promise<CreateTaskResult>;
12
+ lint(): Promise<LintResult>;
13
+ /**
14
+ * Get all tasks (for testing)
15
+ */
16
+ getAllTasks(): TaskFile[];
17
+ /**
18
+ * Get task by ID (for testing)
19
+ */
20
+ getTask(taskId: string): TaskFile | undefined;
21
+ }
22
+ /**
23
+ * Create mock MCP server configuration
24
+ */
25
+ export declare function createMockMCPServerConfig(overrides?: Partial<MCPServerConfig>): MCPServerConfig;
26
+ /**
27
+ * Mock tool call scenarios
28
+ */
29
+ export declare const mockToolCalls: {
30
+ startTask: (taskId: string) => {
31
+ name: string;
32
+ arguments: {
33
+ taskId: string;
34
+ };
35
+ };
36
+ finishTask: (taskId: string) => {
37
+ name: string;
38
+ arguments: {
39
+ taskId: string;
40
+ };
41
+ };
42
+ };
43
+ /**
44
+ * Mock prompt scenarios
45
+ */
46
+ export declare const mockPromptRequests: {
47
+ startWorkflow: (taskId: string) => {
48
+ name: string;
49
+ arguments: {
50
+ taskId: string;
51
+ };
52
+ };
53
+ finishWorkflow: (taskId: string) => {
54
+ name: string;
55
+ arguments: {
56
+ taskId: string;
57
+ };
58
+ };
59
+ taskSummary: (taskId: string) => {
60
+ name: string;
61
+ arguments: {
62
+ taskId: string;
63
+ };
64
+ };
65
+ };
66
+ //# sourceMappingURL=task-server-mcp.mock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.mock.d.ts","sourceRoot":"","sources":["../src/task-server-mcp.mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,QAAQ,EACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE;;GAEG;AACH,qBAAa,kBAAmB,YAAW,YAAY;IACrD,OAAO,CAAC,KAAK,CAAoC;;IA2B3C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAmB5C,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAW7C,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmBjE,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC;IAUjC;;OAEG;IACH,WAAW,IAAI,QAAQ,EAAE;IAIzB;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;CAG9C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GACnC,eAAe,CAQjB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;wBACJ,MAAM;;;;;;yBAKL,MAAM;;;;;;CAI5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;4BACL,MAAM;;;;;;6BAKL,MAAM;;;;;;0BAKT,MAAM;;;;;;CAI7B,CAAC"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Mock TaskManager for MCP testing
3
+ */
4
+ export class MockMCPTaskManager {
5
+ tasks = new Map();
6
+ constructor() {
7
+ // Add some mock tasks
8
+ this.tasks.set('550e8400-e29b-41d4-a716-446655440001', {
9
+ id: '550e8400-e29b-41d4-a716-446655440001',
10
+ title: 'Implement user authentication',
11
+ description: 'Add JWT-based authentication',
12
+ status: 'pending',
13
+ type: 'feat',
14
+ filePath: './TASKS/task-001.md',
15
+ content: '# Task 001',
16
+ createdAt: new Date().toISOString(),
17
+ });
18
+ this.tasks.set('550e8400-e29b-41d4-a716-446655440002', {
19
+ id: '550e8400-e29b-41d4-a716-446655440002',
20
+ title: 'Fix login bug',
21
+ description: 'Users cannot login with special characters',
22
+ status: 'in-progress',
23
+ type: 'fix',
24
+ filePath: './TASKS/task-002.md',
25
+ content: '# Task 002',
26
+ createdAt: new Date().toISOString(),
27
+ });
28
+ }
29
+ async startTask(taskId) {
30
+ const task = this.tasks.get(taskId);
31
+ if (!task) {
32
+ throw new Error(`Task ${taskId} not found`);
33
+ }
34
+ if (task.status === 'in-progress') {
35
+ throw new Error(`Task ${taskId} is already in progress`);
36
+ }
37
+ if (task.status === 'done') {
38
+ throw new Error(`Task ${taskId} is already done`);
39
+ }
40
+ task.status = 'in-progress';
41
+ this.tasks.set(taskId, task);
42
+ return task;
43
+ }
44
+ async finishTask(taskId) {
45
+ const task = this.tasks.get(taskId);
46
+ if (!task) {
47
+ throw new Error(`Task ${taskId} not found`);
48
+ }
49
+ task.status = 'done';
50
+ this.tasks.set(taskId, task);
51
+ return task;
52
+ }
53
+ async createTask(options) {
54
+ const taskId = String(this.tasks.size + 1).padStart(3, '0');
55
+ const task = {
56
+ id: taskId,
57
+ title: options.title,
58
+ status: 'pending',
59
+ type: options.type,
60
+ filePath: `./TASKS/task-${taskId}.md`,
61
+ content: `# Task ${taskId}`,
62
+ createdAt: new Date().toISOString(),
63
+ };
64
+ this.tasks.set(taskId, task);
65
+ return {
66
+ task,
67
+ taskId,
68
+ filePath: task.filePath,
69
+ };
70
+ }
71
+ async lint() {
72
+ return {
73
+ valid: true,
74
+ issues: [],
75
+ errorCount: 0,
76
+ warningCount: 0,
77
+ infoCount: 0,
78
+ };
79
+ }
80
+ /**
81
+ * Get all tasks (for testing)
82
+ */
83
+ getAllTasks() {
84
+ return Array.from(this.tasks.values());
85
+ }
86
+ /**
87
+ * Get task by ID (for testing)
88
+ */
89
+ getTask(taskId) {
90
+ return this.tasks.get(taskId);
91
+ }
92
+ }
93
+ /**
94
+ * Create mock MCP server configuration
95
+ */
96
+ export function createMockMCPServerConfig(overrides) {
97
+ return {
98
+ taskManager: new MockMCPTaskManager(),
99
+ name: 'test-mcp-server',
100
+ version: '0.0.1',
101
+ debug: true,
102
+ ...overrides,
103
+ };
104
+ }
105
+ /**
106
+ * Mock tool call scenarios
107
+ */
108
+ export const mockToolCalls = {
109
+ startTask: (taskId) => ({
110
+ name: 'start_task',
111
+ arguments: { taskId },
112
+ }),
113
+ finishTask: (taskId) => ({
114
+ name: 'finish_task',
115
+ arguments: { taskId },
116
+ }),
117
+ };
118
+ /**
119
+ * Mock prompt scenarios
120
+ */
121
+ export const mockPromptRequests = {
122
+ startWorkflow: (taskId) => ({
123
+ name: 'start-task-workflow',
124
+ arguments: { taskId },
125
+ }),
126
+ finishWorkflow: (taskId) => ({
127
+ name: 'finish-task-workflow',
128
+ arguments: { taskId },
129
+ }),
130
+ taskSummary: (taskId) => ({
131
+ name: 'task-summary',
132
+ arguments: { taskId },
133
+ }),
134
+ };
135
+ //# sourceMappingURL=task-server-mcp.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.mock.js","sourceRoot":"","sources":["../src/task-server-mcp.mock.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,OAAO,kBAAkB;IACrB,KAAK,GAA0B,IAAI,GAAG,EAAE,CAAC;IAEjD;QACE,sBAAsB;QACtB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,sCAAsC,EAAE;YACrD,EAAE,EAAE,sCAA6C;YACjD,KAAK,EAAE,+BAA+B;YACtC,WAAW,EAAE,8BAA8B;YAC3C,MAAM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K,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,SAAoC;IAEpC,OAAO;QACL,WAAW,EAAE,IAAI,kBAAkB,EAAE;QACrC,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,IAAI;QACX,GAAG,SAAS;KACb,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,EAAE,MAAM,EAAE;KACtB,CAAC;IAEF,UAAU,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;QAC/B,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,EAAE,MAAM,EAAE;KACtB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;QAClC,IAAI,EAAE,qBAAqB;QAC3B,SAAS,EAAE,EAAE,MAAM,EAAE;KACtB,CAAC;IAEF,cAAc,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;QACnC,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE,EAAE,MAAM,EAAE;KACtB,CAAC;IAEF,WAAW,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;QAChC,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,EAAE,MAAM,EAAE;KACtB,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=task-server-mcp.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.test.d.ts","sourceRoot":"","sources":["../src/task-server-mcp.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { TaskMCPServer } from './task-server-mcp.js';
3
+ describe('TaskMCPServer', () => {
4
+ it('should export TaskMCPServer class', () => {
5
+ expect(TaskMCPServer).toBeDefined();
6
+ expect(typeof TaskMCPServer).toBe('function');
7
+ });
8
+ });
9
+ //# sourceMappingURL=task-server-mcp.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.test.js","sourceRoot":"","sources":["../src/task-server-mcp.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,259 @@
1
+ import type { ITaskManager } from '@opentask/taskin-task-manager';
2
+ /**
3
+ * MCP Server configuration
4
+ */
5
+ export interface MCPServerConfig {
6
+ /**
7
+ * TaskManager instance to expose via MCP
8
+ */
9
+ taskManager: ITaskManager;
10
+ /**
11
+ * Server name
12
+ * @default 'taskin-mcp-server'
13
+ */
14
+ name?: string;
15
+ /**
16
+ * Server version
17
+ * @default '1.0.0'
18
+ */
19
+ version?: string;
20
+ /**
21
+ * Enable debug logging
22
+ * @default false
23
+ */
24
+ debug?: boolean;
25
+ }
26
+ /**
27
+ * MCP Tool definition
28
+ */
29
+ export interface MCPTool {
30
+ /**
31
+ * Unique tool identifier
32
+ */
33
+ name: string;
34
+ /**
35
+ * Human-readable description
36
+ */
37
+ description: string;
38
+ /**
39
+ * Input schema (JSON Schema)
40
+ */
41
+ inputSchema: {
42
+ type: 'object';
43
+ properties: Record<string, unknown>;
44
+ required?: string[];
45
+ };
46
+ }
47
+ /**
48
+ * MCP Prompt definition
49
+ */
50
+ export interface MCPPrompt {
51
+ /**
52
+ * Unique prompt identifier
53
+ */
54
+ name: string;
55
+ /**
56
+ * Human-readable description
57
+ */
58
+ description: string;
59
+ /**
60
+ * Optional arguments
61
+ */
62
+ arguments?: Array<{
63
+ name: string;
64
+ description: string;
65
+ required?: boolean;
66
+ }>;
67
+ }
68
+ /**
69
+ * MCP Resource definition
70
+ */
71
+ export interface MCPResource {
72
+ /**
73
+ * Resource URI (e.g., "task://123")
74
+ */
75
+ uri: string;
76
+ /**
77
+ * Human-readable name
78
+ */
79
+ name: string;
80
+ /**
81
+ * Resource description
82
+ */
83
+ description?: string;
84
+ /**
85
+ * MIME type
86
+ */
87
+ mimeType?: string;
88
+ }
89
+ /**
90
+ * MCP Tool call parameters
91
+ */
92
+ export interface MCPToolCallParams {
93
+ /**
94
+ * Tool name
95
+ */
96
+ name: string;
97
+ /**
98
+ * Tool arguments
99
+ */
100
+ arguments?: Record<string, unknown>;
101
+ }
102
+ /**
103
+ * MCP Tool call result
104
+ */
105
+ export interface MCPToolCallResult {
106
+ /**
107
+ * Result content
108
+ */
109
+ content: Array<{
110
+ type: 'text' | 'image' | 'resource';
111
+ text?: string;
112
+ data?: string;
113
+ mimeType?: string;
114
+ }>;
115
+ /**
116
+ * Whether the call was successful
117
+ */
118
+ isError?: boolean;
119
+ }
120
+ /**
121
+ * MCP Prompt get parameters
122
+ */
123
+ export interface MCPPromptGetParams {
124
+ /**
125
+ * Prompt name
126
+ */
127
+ name: string;
128
+ /**
129
+ * Prompt arguments
130
+ */
131
+ arguments?: Record<string, string>;
132
+ }
133
+ /**
134
+ * MCP Prompt messages
135
+ */
136
+ export interface MCPPromptMessage {
137
+ /**
138
+ * Message role
139
+ */
140
+ role: 'user' | 'assistant';
141
+ /**
142
+ * Message content
143
+ */
144
+ content: {
145
+ type: 'text' | 'image' | 'resource';
146
+ text?: string;
147
+ data?: string;
148
+ mimeType?: string;
149
+ };
150
+ }
151
+ /**
152
+ * MCP Prompt get result
153
+ */
154
+ export interface MCPPromptGetResult {
155
+ /**
156
+ * Prompt description
157
+ */
158
+ description?: string;
159
+ /**
160
+ * Prompt messages
161
+ */
162
+ messages: MCPPromptMessage[];
163
+ }
164
+ /**
165
+ * MCP Resource read parameters
166
+ */
167
+ export interface MCPResourceReadParams {
168
+ /**
169
+ * Resource URI
170
+ */
171
+ uri: string;
172
+ }
173
+ /**
174
+ * MCP Resource read result
175
+ */
176
+ export interface MCPResourceReadResult {
177
+ /**
178
+ * Resource contents
179
+ */
180
+ contents: Array<{
181
+ uri: string;
182
+ mimeType?: string;
183
+ text?: string;
184
+ blob?: string;
185
+ }>;
186
+ }
187
+ /**
188
+ * MCP Resource list result
189
+ */
190
+ export interface MCPResourceListResult {
191
+ /**
192
+ * Available resources
193
+ */
194
+ resources: MCPResource[];
195
+ }
196
+ /**
197
+ * Task server MCP interface
198
+ */
199
+ export interface ITaskMCPServer {
200
+ /**
201
+ * Get server information
202
+ */
203
+ getServerInfo(): {
204
+ name: string;
205
+ version: string;
206
+ protocolVersion: string;
207
+ capabilities: {
208
+ tools?: Record<string, unknown>;
209
+ prompts?: Record<string, unknown>;
210
+ resources?: Record<string, unknown>;
211
+ };
212
+ };
213
+ /**
214
+ * List available tools
215
+ */
216
+ listTools(): {
217
+ tools: MCPTool[];
218
+ };
219
+ /**
220
+ * Call a tool
221
+ */
222
+ callTool(params: MCPToolCallParams): Promise<MCPToolCallResult>;
223
+ /**
224
+ * List available prompts
225
+ */
226
+ listPrompts(): {
227
+ prompts: MCPPrompt[];
228
+ };
229
+ /**
230
+ * Get a prompt
231
+ */
232
+ getPrompt(params: MCPPromptGetParams): Promise<MCPPromptGetResult>;
233
+ /**
234
+ * List available resources
235
+ */
236
+ listResources(): Promise<MCPResourceListResult>;
237
+ /**
238
+ * Read a resource
239
+ */
240
+ readResource(params: MCPResourceReadParams): Promise<MCPResourceReadResult>;
241
+ }
242
+ /**
243
+ * MCP Transport type
244
+ */
245
+ export type MCPTransportType = 'stdio' | 'sse';
246
+ /**
247
+ * MCP Connection options
248
+ */
249
+ export interface MCPConnectionOptions {
250
+ /**
251
+ * Transport type
252
+ */
253
+ transport: MCPTransportType;
254
+ /**
255
+ * Additional transport options
256
+ */
257
+ options?: Record<string, unknown>;
258
+ }
259
+ //# sourceMappingURL=task-server-mcp.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.types.d.ts","sourceRoot":"","sources":["../src/task-server-mcp.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,EAAE,YAAY,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,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,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAEnE;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAEhD;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC7E;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,KAAK,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,SAAS,EAAE,gBAAgB,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=task-server-mcp.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-server-mcp.types.js","sourceRoot":"","sources":["../src/task-server-mcp.types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@opentask/taskin-task-server-mcp",
3
+ "version": "0.1.1",
4
+ "description": "Model Context Protocol (MCP) server for task management integration with LLMs",
5
+ "motivation": "Enable LLMs to interact with task management systems",
6
+ "solve": "Provides MCP server implementation for task operations",
7
+ "scope": "mcp-server",
8
+ "status": "active",
9
+ "type": "module",
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ }
18
+ },
19
+ "dependencies": {
20
+ "@modelcontextprotocol/sdk": "^1.25.1",
21
+ "@opentask/taskin-task-manager": "1.0.5",
22
+ "@opentask/taskin-types": "1.0.5",
23
+ "@opentask/taskin-file-system-provider": "2.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^24.10.1",
27
+ "@vitest/ui": "^2.1.8",
28
+ "typescript": "^5.7.2",
29
+ "vitest": "^2.1.8"
30
+ },
31
+ "keywords": [
32
+ "taskin",
33
+ "mcp",
34
+ "model-context-protocol",
35
+ "llm",
36
+ "ai",
37
+ "task-management"
38
+ ],
39
+ "author": {
40
+ "name": "OpenTask",
41
+ "url": "https://opentask.com.br"
42
+ },
43
+ "contributors": [
44
+ {
45
+ "name": "Sidarta Veloso",
46
+ "url": "https://github.com/sidartaveloso"
47
+ }
48
+ ],
49
+ "license": "MIT",
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "https://github.com/sidartaveloso/taskin.git",
53
+ "directory": "packages/task-server-mcp"
54
+ },
55
+ "files": [
56
+ "dist",
57
+ "mcp-server.json",
58
+ "README.md"
59
+ ],
60
+ "scripts": {
61
+ "build": "tsc",
62
+ "test": "vitest run",
63
+ "test:ui": "vitest --ui",
64
+ "type-check": "tsc --noEmit",
65
+ "typecheck": "tsc --noEmit",
66
+ "lint": "eslint . --fix"
67
+ }
68
+ }