这是一个专为 Cursor AI 开发的 Todoist 模型上下文协议(MCP)服务器实现。借助该服务器,Cursor AI 助手能够直接在您的编程环境中与您的 Todoist 任务进行交互。
本项目是专为 Cursor AI 打造的 Todoist 模型上下文协议(MCP)服务器实现,能让您在编程环境中便捷地与 Todoist 任务交互。您可参考以下内容进行操作。
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" - 2024 年 1 月 3 日截止的任务。"due before: May 5" - 在 2024 年 5 月 5 日之前截止的任务。"due after: May 5" - 在 2024 年 5 月 5 日之后截止的任务。"due before: +4 hours" - 在接下来的四小时内截止以及所有逾期任务。"no date" - 没有截止日期的任务。"5 days" 或 "next 5 days" - 接下来的五天内截止的任务。"recurring" - 带有重复日期的任务。要在 Cursor AI 中使用,需创建或编辑 MCP 配置文件:
Windows:C:\Users\
{
"mcpServers": {
"todoist-mcp": {
"command": "C:/Users//path/to/todoist-mcp/.venv/Scripts/python.exe" ,
"args": [
"C:/Users//path/to/todoist-mcp/server.py"
],
"env": {
"TODOIST_API_TOKEN": "your-api-token-here"
}
}
}
}
请将 替换为您实际的用户名。完成编辑后,保存文件并重新启动 Cursor,此时您应该可以使用 Todoist 任务了!
api/ - API 包裹器config/ - 配置与设置models/ - 模型相关文件tasks/ - 任务处理逻辑utils/ - 工具和辅助函数此项目使用 MIT 许可证。