这是一个专为 Cursor AI 开发的 Todoist 集成模型上下文协议(MCP)服务器实现。该服务器允许 Cursor AI 助手直接从您的编码环境与您的 Todoist 任务进行交互。
要通过 Smithery 自动为 Claude Desktop 安装 TaskMaster:
npx -y @smithery/cli install @mingolladaniele/taskMaster-todoist-mcp --client claude
git clone https://github.com/mingolladaniele/todoist-mcp.git
cd todoist-mcp

pip install -r requirements.txt
# Linux/macOS
export TODOIST_API_TOKEN="your-api-token-here"
# Windows
set TODOIST_API_TOKEN="your-api-token-here"

您可以在 Todoist 设置 → 集成 → 开发者中找到您的 Todoist API 令牌。
python server.py
服务器提供以下 MCP 工具:
get_tasks_tool
使用强大的过滤选项检索任务。
参数:
filter_string
:用于复杂过滤的高级 Todoist 过滤查询字符串priority
:可选的优先级级别(1-4,1 为最高优先级)示例过滤字符串:
"today"
- 今天到期的任务"overdue"
- 逾期任务"Jan 3"
- 1 月 3 日到期的任务"due before: May 5"
- 5 月 5 日之前到期的任务"due after: May 5"
- 5 月 5 日之后到期的任务"due before: +4 hours"
- 在接下来的四个小时内到期的任务以及所有逾期任务"no date"
- 没有截止日期的任务"5 days"
或 "next 5 days"
- 在接下来的 5 天内到期的任务"recurring"
- 具有重复日期的任务要与 Cursor AI 一起使用,请创建或编辑 MCP 配置文件:
Windows: C:\Users\<username>\.cursor\mcp.json
{
"mcpServers": {
"todoist-mcp": {
"command": "C:/Users/<username>/path/to/todoist-mcp/.venv/Scripts/python.exe",
"args": [
"C:/Users/<username>/path/to/todoist-mcp/server.py"
],
"env": {
"TODOIST_API_TOKEN": "your-api-token-here"
}
}
}
}

将 <username>
和路径替换为您的实际用户名和安装的正确路径。
完成后,转到 Cursor 设置 → MCP 并检查服务器是否正确运行(绿色圆点)。
代码库组织为以下模块:
api/
: Todoist 的 API 封装config/
: 配置和设置utils/
: 实用函数和助手,包括任务格式化以下是未来版本计划的功能:
MIT 许可证