Skip to main content
Glama

MCP Todoist

by dkeesey

MCP Todoist

模型上下文协议 (MCP) 服务器使 Claude 能够与您的 Todoist 帐户进行交互。

特征

  • 管理任务:创建、更新、完成和删除任务
  • 使用标签来组织项目中的任务
  • 根据各种标准搜索和过滤任务
  • 与 Claude Desktop 无缝集成

先决条件

快速入门

1.安装

# Install using UV uvx mcp-todoist

2.配置

  1. Todoist Integrations 设置中获取您的 Todoist API 令牌
  2. 配置环境变量:
    # Add to your .env file or environment TODOIST_API_TOKEN=your_api_token_here
  3. 配置Claude桌面:
    // ~/.config/claude/claude_desktop_config.json or equivalent { "mcpServers": { "mcp-todoist": { "command": "uvx", "args": ["mcp-todoist"] } } }

3. 与 Claude 一起使用

配置完成后,您可以要求 Claude 与您的 Todoist 帐户进行交互:

  • “显示今天截止的任务”
  • “创建一个新的任务,明天去买杂货”
  • “将我的‘发送电子邮件’任务标记为已完成”
  • “创建一个名为‘家居装修’的新项目”
  • “显示我的工作项目中的所有任务”

可用工具

任务管理

  • list-tasks - 检索和过滤任务
  • create-task创建新任务
  • update-task - 更新现有任务
  • complete-task - 将任务标记为已完成
  • delete-task ——删除任务

项目管理

  • list-projects -获取所有项目
  • create-project创建新项目
  • update-project - 更新项目
  • delete-project - 删除项目

标签管理

  • list-labels - 获取所有标签
  • create-label创建新标签
  • update-label - 更新标签
  • delete-label ——删除标签

公用事业

  • search - 使用复杂的过滤功能跨任务搜索

运行 MCP 服务器

有多种方法可以运行 Todoist MCP 服务器:

方法一:直接命令行

在终端窗口中运行服务器:

# Set your API token export TODOIST_API_TOKEN=your_api_token_here # Run the server using UV uvx mcp-todoist # Alternative: Run from source cd /path/to/mcp-todoist uv run python -m mcp_todoist

使用 Claude Desktop 时保持此终端窗口打开。

方法2:使用启动脚本(推荐)

创建 Claude Desktop 可用于自动启动服务器的启动脚本:

  1. 创建一个名为start-todoist-mcp.sh的文件,内容如下:
#!/bin/bash # Set environment variables export MCP_SERVER_NAME="mcp-todoist" export MCP_LOG_LEVEL="INFO" export MCP_DEBUG="true" export TODOIST_API_TOKEN="your_todoist_api_token_here" # Path to your Todoist MCP server MCP_PATH="/path/to/mcp-todoist" # Log file for debugging LOG_FILE="${MCP_PATH}/todoist-mcp.log" # Create log file or clear existing one echo "Starting Todoist MCP server at $(date)" > "${LOG_FILE}" # Navigate to the project directory cd "${MCP_PATH}" # Start the MCP server echo "Starting MCP server from ${MCP_PATH}" >> "${LOG_FILE}" uv run python -m mcp_todoist >> "${LOG_FILE}" 2>&1
  1. 使脚本可执行:
chmod +x start-todoist-mcp.sh
  1. 更新您的 Claude Desktop 配置以使用此脚本:
{ "mcpServers": { "mcp-todoist": { "command": "/absolute/path/to/start-todoist-mcp.sh", "args": [] } } }

这种方法有几个优点:

  • 服务器随 Claude Desktop 自动启动
  • 所有日志均被捕获到文件中,以便于调试
  • 环境变量设置一致

调试

如果您遇到 MCP 服务器问题,以下是一些调试策略:

1.检查日志

如果使用启动脚本,请检查日志文件:

cat /path/to/mcp-todoist/todoist-mcp.log

2. 启用调试模式

MCP_DEBUG环境变量设置为true以获得更详细的日志记录:

export MCP_DEBUG=true uvx mcp-todoist

3. 验证 API 令牌

确保您的 Todoist API 令牌正确且仍然有效:

# Test the token with a simple curl request curl -X GET \ https://api.todoist.com/rest/v2/projects \ -H "Authorization: Bearer $TODOIST_API_TOKEN"

4. 使用 MCP 检查器

MCP Inspector 是用于调试 MCP 服务器的强大工具:

npx @modelcontextprotocol/inspector uvx mcp-todoist

这将打开一个 Web 界面,显示 Claude 和 MCP 服务器之间的所有通信。

5.常见问题及解决方案

  • “MCP 服务器不可用”错误:确保服务器在单独的终端中或通过启动脚本运行。
  • 身份验证错误:检查您的 Todoist API 令牌是否在您的环境中正确设置。
  • “未找到命令”错误:确保 Astral UV 已安装且位于您的 PATH 中。
  • 超时错误:如果您的 MCP 服务器响应缓慢,请尝试增加 Claude Desktop 设置中的超时时间。

发展

设置

# Clone the repository git clone https://github.com/yourusername/mcp-todoist.git cd mcp-todoist # Install dependencies uv sync

测试

# Run tests uv run pytest

本地开发

对于本地开发,您可以使用 Todoist API 令牌创建一个.env文件:

TODOIST_API_TOKEN=your_api_token_here

然后运行服务器:

uv run python -m mcp_todoist

执照

MIT 许可证 - 详情请参阅 LICENSE 文件。

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器使 Claude 能够与您的 Todoist 帐户进行交互,让您可以通过自然语言管理任务、项目和标签。

  1. 特征
    1. 先决条件
      1. 快速入门
        1. 1.安装
        2. 2.配置
        3. 与 Claude 一起使用
      2. 可用工具
        1. 任务管理
        2. 项目管理
        3. 标签管理
        4. 公用事业
      3. 运行 MCP 服务器
        1. 方法一:直接命令行
        2. 方法2:使用启动脚本(推荐)
      4. 调试
        1. 1.检查日志
        2. 启用调试模式
        3. 验证 API 令牌
        4. 使用 MCP 检查器
        5. 5.常见问题及解决方案
      5. 发展
        1. 设置
        2. 测试
        3. 本地开发
      6. 执照

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that integrates with Notion's API to manage personal todo lists, allowing users to view, add, and update tasks directly from Claude.
          Last updated -
          13
          Python
          MIT License
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables Claude to interact with the ConnectWise Manage API to perform operations like retrieving, creating, updating, and deleting tickets, companies, contacts, and other entities.
          Last updated -
          JavaScript
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Profile server that enables Claude to interact with Todoist, allowing users to create, retrieve, update, and manage tasks through natural language commands.
          Last updated -
          1
          Python
          MIT License
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that bridges Claude with Google Tasks, allowing users to manage task lists and tasks directly through Claude interface.
          Last updated -
          5
          TypeScript
          MIT License
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkeesey/todoist-mcp-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server