任务管理服务器

一个基于Python的Todoist MCP服务器,用于任务管理和自动化工作流程。

  • by mikemc
  • Python
  • 本地部署
  • 9 星标
  • 更新于
在 GitHub 查看 mikemc/todoist-mcp-server

使用说明

Todoist MCP服务器(Python)

一个用Python编写的Todoist MCP服务器,使用 Todoist Python API我首先使用Claude来翻译这个,从而创建了服务器 TypeScript Todoist MCP服务器 Python。当我尝试使用Claude来帮助进行任务管理时,我正在逐步更改和添加功能以适应我的工作流程。

安装

先决条件

  • Python 3.10+
  • UV包管理器(安装指南)
  • Todoist API令牌

获取Todoist API代币

  1. 登录您的Todoist帐户
  2. 转到“设置”→ 集成
  3. 在“开发者”下找到您的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_projects
    • todoist_get_project
    • todoist_add_project
    • todoist_update_project
    • todoist_delete_project
  • 章节
    • todoist_get_sections
    • todoist_get_section
    • todoist_add_section
    • todoist_update_section
    • todoist_delete_section
  • 任务
    • todoist_get_task
    • todoist_get_tasks
    • todoist_filter_tasks
    • todoist_add_task
    • todoist_update_task
    • todoist_complete_task
    • todoist_uncomplete_task
    • todoist_move_task
    • todoist_delete_task
  • 评论
    • todoist_get_comment
    • todoist_get_comments
    • todoist_add_comment
    • todoist_update_comment
    • todoist_delete_comment

许可证

该项目根据MIT许可证获得许可。请参阅 许可证 文件以获取详细信息。