使用说明
Todoist MCP服务器(Python)
一个用Python编写的Todoist MCP服务器,使用 Todoist Python API我首先使用Claude来翻译这个,从而创建了服务器 TypeScript Todoist MCP服务器 Python。当我尝试使用Claude来帮助进行任务管理时,我正在逐步更改和添加功能以适应我的工作流程。
安装
先决条件
- Python 3.10+
- UV包管理器(安装指南)
- Todoist API令牌
获取Todoist API代币
- 登录您的Todoist帐户
- 转到“设置”→ 集成
- 在“开发者”下找到您的API代币
使用Claude Desktop进行配置
将MCP服务器添加到claude_desktop_config.json中,
{
"mcpServers": {
"todoist": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/mikemc/todoist-mcp-server",
"todoist-mcp"
],
"env": {
"TODOIST_API_TOKEN": "your_todoist_api_token"
}
}
}
}
或者从本地副本运行,
{
"mcpServers": {
"todoist": {
"command": "uvx",
"args": [
"--from",
"/absolute/path/to/todoist-mcp-server",
"todoist-mcp"
],
"env": {
"TODOIST_API_TOKEN": "your_todoist_api_token"
}
}
}
}
使用Goose(和本地LLM)进行配置
您可以使用 鹅 以及当地LLM提供商: LM工作室 或 奥拉马.
配置您希望Goose使用的LLM:
$ goose configure
此命令将询问您是要使用本地模型还是云托管模型。确保您的模型提供商首先运行您的模型。指定模型API的地址和模型名称。许多本地部署的LLM使用与兼容的格式 Ollama,所以对于两者 LM Studio 或 Ollama LLM,选择 Ollama.
◇ Which model provider should we use?
│ Ollama
│
◇ Provider Ollama requires OLLAMA_HOST, please enter a value
│ localhost:1234
│
◇ Model fetch complete
│
◇ Enter a model from that provider:
│ phi-4
然后再次运行相同的命令来配置Todoist MCP:
$ goose configure
这一次,它将询问扩展:
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ todoist
│
◇ What command should be run?
│ uvx git+https://github.com/mikemc/todoist-mcp-server
│
◇ Please set the timeout for this tool (in secs):
│ 60
│
◇ Would you like to add a description?
│ No
│
◇ Would you like to add environment variables?
│ Yes
│
◇ Environment variable name:
│ TODOIST_API_TOKEN
│
◇ Environment variable value:
│ ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
│
◇ Add another environment variable?
│ No
│
└ Added todoist extension
现在你可以跑了 goose 向它询问有关待办事项列表的问题,或进行更改。
$ goose
starting session | provider: ollama model: phi-4
logging to ******
working directory: ******
Goose is running! Enter your instructions, or try asking what goose can do.
( O)> how many todo list tasks have I completed in the last 7 days
─── todoist_get_tasks | todoist ──────────────────────────
filter: last 7 days completed
...
*Ideally* You have been very busy this week. You have completed 15 tasks! Listed below are the tasks.
...
可用工具
要查看当前可用的工具,请运行
# With GNU grep installed as ggrep (as with `brew install grep` on Mac)
ggrep -Po '(?<=^mcp.tool\(\)\()([^)]+)' src/main.py
截至2025年5月26日,
- 项目
todoist_get_projectstodoist_get_projecttodoist_add_projecttodoist_update_projecttodoist_delete_project
- 章节
todoist_get_sectionstodoist_get_sectiontodoist_add_sectiontodoist_update_sectiontodoist_delete_section
- 任务
todoist_get_tasktodoist_get_taskstodoist_filter_taskstodoist_add_tasktodoist_update_tasktodoist_complete_tasktodoist_uncomplete_tasktodoist_move_tasktodoist_delete_task
- 评论
todoist_get_commenttodoist_get_commentstodoist_add_commenttodoist_update_commenttodoist_delete_comment
许可证
该项目根据MIT许可证获得许可。请参阅 许可证 文件以获取详细信息。