Skip to main content
Glama

todoist-v1-mcp-server

一个简洁、可靠的 Todoist MCP(模型上下文协议)服务器 —— 基于 Todoist 统一 API v1 构建。

为什么存在这个项目

官方的 Todoist Web MCP (todoist-ai) 在 Anthropic 端存在一个已知的持续断开连接错误,需要每天重新连接。社区的其他替代方案要么是基于已弃用的 REST API v2 构建的,要么存在模式验证错误,导致当 Todoist 随着 API 演进而返回额外字段时出现故障。

此服务器:

  • 针对 当前的 Todoist API v1(非已弃用的 v2)

  • 使用 stdio 传输 —— 无云依赖,无需每日重新连接

  • 使用 现代 MCP SDK registerTool() API(非已弃用的 setRequestHandler 模式)

  • 从不强制执行严格的输出模式 —— Todoist 可以自由添加新字段而不会破坏任何内容

  • 无 SDK 包装器依赖 —— 通过 axios 直接进行 HTTP 调用,因此没有偏离 API 的中间库

Related MCP server: MCP Todoist

工具(共 31 个)

任务

工具

描述

todoist_get_tasks

列出/筛选任务 —— 支持 Todoist 筛选字符串,如 "today"、"overdue"、"p1"、"#ProjectName"、"7 days"

todoist_get_task

通过 ID 获取单个任务

todoist_create_task

创建带有自然语言截止日期的任务(如 "tomorrow"、"every monday" 等)

todoist_update_task

更新任何字段;传入 clear_due_date: true 以移除截止日期

todoist_complete_task

将任务标记为已完成

todoist_reopen_task

重新打开已完成的任务

todoist_delete_task

永久删除任务

项目

工具

描述

todoist_get_projects

列出所有项目

todoist_get_project

通过 ID 获取单个项目

todoist_create_project

创建项目(包含颜色、视图样式、父级)

todoist_update_project

更新项目

todoist_delete_project

永久删除项目及其所有任务

分区

工具

描述

todoist_get_sections

列出项目内的分区

todoist_create_section

创建分区

todoist_update_section

重命名分区

todoist_delete_section

删除分区

标签

工具

描述

todoist_get_labels

列出所有个人标签

todoist_create_label

创建标签

todoist_update_label

更新标签

todoist_delete_label

删除标签

评论

工具

描述

todoist_get_comments

列出任务或项目上的评论(分页)

todoist_get_comment

通过 ID 获取单个评论

todoist_create_comment

向任务或项目添加评论(支持 Markdown)

todoist_update_comment

编辑现有评论的内容

todoist_delete_comment

永久删除评论

已完成任务(Pro 版)

工具

描述

todoist_get_completed_tasks

按完成日期(≤3个月)或截止日期(≤6周)查询已完成的任务。仅限 Pro 用户。

提醒(Pro 版)

工具

描述

todoist_get_reminders

列出提醒,可选择按 task_id 筛选。仅限 Pro 用户。

todoist_get_reminder

通过 ID 获取单个提醒。仅限 Pro 用户。

todoist_create_reminder

创建相对(截止日期前 minute_offset)或绝对提醒。仅限 Pro 用户。

todoist_update_reminder

更新提醒时间或通知服务。仅限 Pro 用户。

todoist_delete_reminder

永久删除提醒。仅限 Pro 用户。

Pro 层级处理: 提醒和已完成任务查询需要 Todoist Pro 订阅。如果 API 返回 Pro 限制错误(HTTP 402,或带有 premium/pro/upgrade/paid/subscription 关键字的 403),服务器将返回一条清晰的消息,说明该功能需要 Pro,而不是泄露原始 API 错误。

设置

1. 获取您的 Todoist API 令牌

前往 Todoist → 设置 → 集成 → 开发者 并复制您的 API 令牌。

2. 安装和构建

git clone https://github.com/christulino/todoist-v1-mcp-server
cd todoist-v1-mcp-server
npm install
npm run build

3. 配置 Claude Desktop

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "todoist": {
      "command": "node",
      "args": ["/absolute/path/to/todoist-v1-mcp-server/dist/index.js"],
      "env": {
        "TODOIST_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

重启 Claude Desktop。您应该会在已连接的 MCP 服务器中看到 "todoist"。

4. 配置 Claude Code(可选)

claude mcp add todoist -- node /absolute/path/to/todoist-v1-mcp-server/dist/index.js

然后设置环境变量:

export TODOIST_API_TOKEN=your_api_token_here

或者将其添加到您的 shell 配置文件中。

使用示例

连接后,Claude 可以处理如下自然语言:

  • "What's on my plate today?"(我今天有什么任务?) → 使用 todoist_get_tasks 并设置 filter: "today"

  • "Add a task to call the dentist next Tuesday"(添加一个下周二给牙医打电话的任务) → 使用 todoist_create_task

  • "Mark the dentist task as done"(将牙医任务标记为已完成) → 使用 todoist_complete_task

  • "Show me everything overdue"(显示所有逾期任务) → 使用 todoist_get_tasks 并设置 filter: "overdue"

  • "Create a project called Home Renovation"(创建一个名为“房屋装修”的项目) → 使用 todoist_create_project

  • "What projects do I have?"(我有哪些项目?) → 使用 todoist_get_projects

Todoist 筛选语法

todoist_get_tasks 中的 filter 参数支持 Todoist 完整的自然语言筛选语法:

筛选器

含义

today

今天截止

overdue

已逾期

7 days

未来 7 天内截止

p1

优先级紧急

#ProjectName

特定项目中的任务

@labelname

带有特定标签的任务

no due date

没有截止日期的任务

today | overdue

今天或逾期(使用 | 组合)

today & @waiting

今天且标记为 'waiting'

完整筛选器文档:https://todoist.com/help/articles/introduction-to-filters

要求

  • Node.js 18+

  • Todoist 账户(免费版即可)

开发

npm run dev   # tsx watch mode with auto-reload
npm run build # compile TypeScript
npm start     # run compiled server

测试

测试套件会访问实时 Todoist API,并对任务、项目、分区、标签、评论和提醒执行完整的 CRUD 循环,外加针对已完成任务查询的只读冒烟测试。提醒和已完成任务测试会检测 Pro 层级限制(HTTP 402/403),并在账户处于免费层级时进行清晰报告。所有测试数据均以 [mcp-test] 为前缀,并会自动清理。

TODOIST_API_TOKEN=your_token npm test

您的 API 令牌位于 Todoist → 设置 → 集成 → 开发者 —— 与您放入 claude_desktop_config.json 中的令牌相同。

贡献

欢迎提交 PR。目标是实现一个最小化、正确的实现,并与 Todoist API v1 保持同步。优先级:

  1. 正确性高于技巧性

  2. 宽容的输出处理(从不拒绝未知的 API 字段)

  3. 有用的错误消息,告知您出了什么问题以及如何修复它

许可证

MIT

Available Tools

20 tools
todoist_complete_taskComplete Todoist TaskA
Idempotent

Mark a Todoist task as completed (close it).

This is the standard way to check off a task. For recurring tasks, this advances to the next occurrence rather than permanently removing it.

Use todoist_delete_task to permanently remove a task instead.

Inputs: task_id (required).

todoist_create_labelCreate Todoist LabelA

Create a new personal label in Todoist.

Returns the created label's ID and name. Use the label name (not ID) when assigning labels to tasks with todoist_create_task or todoist_update_task.

Inputs: name (required), color, order, is_favorite.

todoist_create_projectCreate Todoist ProjectA

Create a new project in Todoist.

Color options: berry_red, red, orange, yellow, olive_green, lime_green, green, mint_green, teal, sky_blue, light_blue, blue, grape, violet, lavender, magenta, salmon, charcoal, grey, taupe.

Returns the full created project object including its assigned ID.

Inputs: name (required), parent_id, color, is_favorite, +1 more.

todoist_create_sectionCreate Todoist SectionA

Create a new section within a Todoist project.

Returns the created section's ID and details. Use the section ID when creating tasks (todoist_create_task) to add them directly to this section.

Inputs: name (required), project_id (required), order.

todoist_create_taskCreate Todoist TaskA

Create a new task in Todoist.

The due_string field supports natural language: "tomorrow", "every monday", "Feb 20", "next week", "in 3 hours", etc.

Priority levels: 1=normal (default), 2=medium, 3=high, 4=urgent.

Returns the full created task object including its assigned ID.

Inputs: content (required), description, project_id, section_id, +6 more.

todoist_delete_labelDelete Todoist LabelA
Destructive

Permanently delete a personal Todoist label.

The label will be removed from all tasks that currently use it. This cannot be undone.

Inputs: label_id (required).

todoist_delete_projectDelete Todoist ProjectA
Destructive

Permanently delete a Todoist project and all its tasks. This cannot be undone.

WARNING: All tasks within the project will also be deleted.

Inputs: project_id (required).

todoist_delete_sectionDelete Todoist SectionA
Destructive

Permanently delete a Todoist section.

Tasks within the section are NOT deleted — they are moved to the parent project (unsectioned). The section itself is permanently removed and cannot be undone.

Inputs: section_id (required).

todoist_delete_taskDelete Todoist TaskA
Destructive

Permanently delete a Todoist task. This action cannot be undone.

For recurring tasks or tasks you just want to mark as done, use todoist_complete_task instead.

Inputs: task_id (required).

todoist_get_labelsGet Todoist LabelsA
Read-onlyIdempotent

List all personal labels in the user's Todoist account.

Returns label IDs, names, colors, and sort order. Use label names (not IDs) when creating or updating tasks.

Inputs: response_format.

todoist_get_projectGet Todoist ProjectA
Read-onlyIdempotent

Retrieve a single Todoist project by its ID.

Returns full project details including name, color, parent project, comment count, sharing status, and view style.

Inputs: project_id (required), response_format.

todoist_get_projectsGet Todoist ProjectsA
Read-onlyIdempotent

List all projects in the user's Todoist account.

Returns project IDs, names, colors, hierarchy (parent_id for sub-projects), and metadata like whether each project is a favorite or shared.

Use project IDs with todoist_get_tasks to fetch tasks for a specific project.

Inputs: response_format.

todoist_get_sectionsGet Todoist SectionsA
Read-onlyIdempotent

List all sections within a Todoist project.

Sections are used to organize tasks within a project into groups. Returns section IDs, names, and sort order.

Use section IDs with todoist_get_tasks (section_id param) or todoist_create_task (section_id param) to work with tasks in specific sections.

Inputs: project_id (required), response_format.

todoist_get_taskGet Todoist TaskA
Read-onlyIdempotent

Retrieve a single Todoist task by its ID.

Returns full task details: content, description, due date, priority, labels, project/section IDs, comment count, and creation timestamp.

Inputs: task_id (required), response_format.

todoist_get_tasksGet Todoist TasksA
Read-onlyIdempotent

List and filter tasks from Todoist.

Use the filter parameter for powerful natural-language Todoist filters:

  • "today" → tasks due today

  • "overdue" → past-due tasks

  • "7 days" → due in the next 7 days

  • "p1" → priority 1 (urgent)

  • "#Work" → tasks in project named Work

  • "@waiting" → tasks with label 'waiting'

  • "no due date" → tasks with no due date

  • Combine with & (AND), | (OR): "today | overdue"

Alternatively, filter by project_id, section_id, or label directly.

Returns task IDs, content, due dates, priorities, labels, and project/section IDs.

Inputs: filter, project_id, section_id, label, +3 more.

todoist_reopen_taskReopen Todoist TaskA
Idempotent

Reopen (uncomplete) a previously completed Todoist task.

Useful for tasks that were marked done by mistake or need to be revisited.

Inputs: task_id (required).

todoist_update_labelUpdate Todoist LabelA
Idempotent

Update an existing Todoist label. Only include fields to change.

Inputs: label_id (required), name, color, order, +1 more.

todoist_update_projectUpdate Todoist ProjectA
Idempotent

Update an existing Todoist project. Only include fields to change.

Inputs: project_id (required), name, color, is_favorite, +1 more.

todoist_update_sectionUpdate Todoist SectionB
Idempotent

Rename an existing Todoist section.

Inputs: section_id (required), name (required).

todoist_update_taskUpdate Todoist TaskA
Idempotent

Update an existing Todoist task.

Only include the fields you want to change — all fields are optional. To clear a due date, pass clear_due_date: true (sends due_string: "no date" — empty string is silently ignored and due: null returns 400). To remove all labels, pass labels as an empty array [].

Priority: 1=normal, 2=medium, 3=high, 4=urgent.

Inputs: task_id (required), content, description, clear_due_date, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 20 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific resources (tasks, projects, labels, sections) and actions (create, get, update, delete, complete, reopen). Descriptions explicitly differentiate similar tools (e.g., todoist_complete_task vs. todoist_delete_task), eliminating ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with the prefix 'todoist_' (e.g., todoist_create_task, todoist_get_labels). The naming is uniform across all 20 tools, using snake_case and clear action verbs aligned with CRUD operations.

    Tool Count5/5

    With 20 tools, the server provides comprehensive coverage for Todoist's domain, including tasks, projects, labels, and sections. Each tool serves a distinct, necessary function, and the count is well-scoped for managing a task management system without being excessive.

    Completeness5/5

    The tool set offers complete CRUD/lifecycle coverage for all core resources (tasks, projects, labels, sections), including specialized actions like complete, reopen, and filtering. There are no obvious gaps; agents can perform all essential operations without dead ends.

    Related MCP Connectors

    Related MCP Servers