@doist/todoist-ai 4.6.1 → 4.7.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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Todoist AI SDK
|
|
1
|
+
# Todoist AI and MCP SDK
|
|
2
2
|
|
|
3
3
|
Library for connecting AI agents to Todoist. Includes tools that can be integrated into LLMs,
|
|
4
4
|
enabling them to access and modify a Todoist account on the user's behalf.
|
|
@@ -34,12 +34,72 @@ const result = streamText({
|
|
|
34
34
|
|
|
35
35
|
## Using as an MCP server
|
|
36
36
|
|
|
37
|
+
### Quick Start
|
|
38
|
+
|
|
37
39
|
You can run the MCP server directly with npx:
|
|
38
40
|
|
|
39
41
|
```bash
|
|
40
42
|
npx @doist/todoist-ai
|
|
41
43
|
```
|
|
42
44
|
|
|
45
|
+
### Setup Guide
|
|
46
|
+
|
|
47
|
+
The Todoist AI MCP server is available as a streamable HTTP service for easy integration with various AI clients:
|
|
48
|
+
|
|
49
|
+
**Primary URL (Streamable HTTP):** `https://ai.todoist.net/mcp`
|
|
50
|
+
|
|
51
|
+
#### Claude Desktop
|
|
52
|
+
|
|
53
|
+
1. Open Settings → Connectors → Add custom connector
|
|
54
|
+
2. Enter `https://ai.todoist.net/mcp` and complete OAuth authentication
|
|
55
|
+
|
|
56
|
+
#### Cursor
|
|
57
|
+
|
|
58
|
+
Create a configuration file:
|
|
59
|
+
- **Global:** `~/.cursor/mcp.json`
|
|
60
|
+
- **Project-specific:** `.cursor/mcp.json`
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"todoist": {
|
|
66
|
+
"command": "npx",
|
|
67
|
+
"args": ["-y", "mcp-remote", "https://ai.todoist.net/mcp"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Then enable the server in Cursor settings if prompted.
|
|
74
|
+
|
|
75
|
+
#### Claude Code (CLI)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
claude mcp add --transport http todoist https://ai.todoist.net/mcp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Visual Studio Code
|
|
82
|
+
|
|
83
|
+
1. Open Command Palette → MCP: Add Server
|
|
84
|
+
2. Select HTTP transport and use:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"servers": {
|
|
89
|
+
"todoist": {
|
|
90
|
+
"type": "http",
|
|
91
|
+
"url": "https://ai.todoist.net/mcp"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### Other MCP Clients
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx -y mcp-remote https://ai.todoist.net/mcp
|
|
101
|
+
```
|
|
102
|
+
|
|
43
103
|
For more details on setting up and using the MCP server, including creating custom servers, see [docs/mcp-server.md](docs/mcp-server.md).
|
|
44
104
|
|
|
45
105
|
## Features
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
declare const PRIORITY_VALUES: readonly ["p1", "p2", "p3", "p4"];
|
|
3
|
-
type Priority = (typeof PRIORITY_VALUES)[number];
|
|
3
|
+
export type Priority = (typeof PRIORITY_VALUES)[number];
|
|
4
4
|
export declare const PrioritySchema: z.ZodEnum<["p1", "p2", "p3", "p4"]>;
|
|
5
5
|
export declare function convertPriorityToNumber(priority: Priority): number;
|
|
6
6
|
export declare function convertNumberToPriority(priority: number): Priority | undefined;
|
|
7
|
+
export declare function formatPriorityForDisplay(priority: number): string;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=priorities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priorities.d.ts","sourceRoot":"","sources":["../../src/utils/priorities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,QAAA,MAAM,eAAe,mCAAoC,CAAA;AACzD,
|
|
1
|
+
{"version":3,"file":"priorities.d.ts","sourceRoot":"","sources":["../../src/utils/priorities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,QAAA,MAAM,eAAe,mCAAoC,CAAA;AACzD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvD,eAAO,MAAM,cAAc,qCAEzB,CAAA;AAEF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAIlE;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAI9E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIjE"}
|
package/dist/utils/priorities.js
CHANGED
|
@@ -13,3 +13,8 @@ export function convertNumberToPriority(priority) {
|
|
|
13
13
|
const numberMap = { 4: 'p1', 3: 'p2', 2: 'p3', 1: 'p4' };
|
|
14
14
|
return numberMap[priority];
|
|
15
15
|
}
|
|
16
|
+
export function formatPriorityForDisplay(priority) {
|
|
17
|
+
// Convert Todoist API numbers to display format (P1, P2, P3, P4)
|
|
18
|
+
const displayMap = { 4: 'P1', 3: 'P2', 2: 'P3', 1: 'P4' };
|
|
19
|
+
return displayMap[priority] || '';
|
|
20
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-builders.d.ts","sourceRoot":"","sources":["../../src/utils/response-builders.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response-builders.d.ts","sourceRoot":"","sources":["../../src/utils/response-builders.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,IAAiB,GAAG,MAAM,CAG7D;AAID,KAAK,QAAQ,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;IAC/C,aAAa,CAAC,EAAE,OAAO,CAAA;CAC1B,GACF,MAAM,EAAE,CA6EV"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DisplayLimits } from './constants.js';
|
|
2
|
+
import { formatPriorityForDisplay } from './priorities.js';
|
|
2
3
|
import { ToolNames } from './tool-names.js';
|
|
3
4
|
/**
|
|
4
5
|
* Helper function to get date string in YYYY-MM-DD format
|
|
@@ -68,7 +69,7 @@ export function summarizeBatch(params) {
|
|
|
68
69
|
function formatTaskPreview(task) {
|
|
69
70
|
const content = task.content || task.title || 'Untitled';
|
|
70
71
|
const due = task.dueDate ? ` • due ${task.dueDate}` : '';
|
|
71
|
-
const priority = task.priority
|
|
72
|
+
const priority = task.priority ? ` • ${formatPriorityForDisplay(task.priority)}` : '';
|
|
72
73
|
const project = task.projectName ? ` • ${task.projectName}` : '';
|
|
73
74
|
const id = task.id ? ` • id=${task.id}` : '';
|
|
74
75
|
return ` ${content}${due}${priority}${project}${id}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-ai",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "rimraf dist && npx tsc --project tsconfig.json",
|
|
32
32
|
"postbuild": "chmod +x dist/main.js",
|
|
33
33
|
"start": "npm run build && npx @modelcontextprotocol/inspector node dist/main.js",
|
|
34
|
-
"dev": "concurrently \"npx tsc --watch\" \"nodemon --watch dist --ext js --exec
|
|
34
|
+
"dev": "concurrently \"npx tsc --watch\" \"npx @modelcontextprotocol/inspector npx nodemon --quiet --watch dist --ext js --exec node dist/main.js\"",
|
|
35
35
|
"setup": "cp .env.example .env && npm install && npm run build",
|
|
36
36
|
"test:executable": "npm run build && node scripts/test-executable.cjs",
|
|
37
37
|
"type-check": "npx tsc --noEmit",
|