py-todoist-mcp

py-todoist-mcp

A Python MCP server that enables AI assistants to manage Todoist tasks and projects through the Model Context Protocol. It supports full CRUD operations for tasks and projects, including support for nested projects and Todoist's advanced filter syntax.

Category
访问服务器

README

py-todoist-mcp

A Python MCP (Model Context Protocol) server for Todoist integration, enabling AI assistants to manage tasks and projects via the Model Context Protocol.

Features

  • Task Management: Create, read, update, complete, and delete tasks
  • Project Management: Manage Todoist projects with support for nested projects
  • Filter Support: Query tasks using Todoist's powerful filter syntax
  • Error Handling: Robust error handling with user-friendly messages
  • Structured Logging: Comprehensive logging for debugging and monitoring

Prerequisites

  • Python 3.14 or higher
  • uv for Python package management
  • A Todoist API token

Installation

1. Install with uv

uv tool install git+https://github.com/chris-jelly/py-todoist-mcp.git

This installs todoist-mcp into an isolated environment and makes it available globally on your PATH.

2. Set up your API token

The server reads TODOIST_API_TOKEN from the environment. Add it to your shell profile (~/.bashrc, ~/.zshrc, etc.):

# Add to your shell profile
export TODOIST_API_TOKEN="your-api-token-here"

To obtain your Todoist API token:

  1. Log in to Todoist
  2. Go to Settings → Integrations → Developer
  3. Copy your API token

Note: Avoid placing your API token directly in MCP configuration files. These files are easy to accidentally commit or share. The server will pick up the token from your environment automatically.

Configuration

Opencode

Add the following to ~/.config/opencode/opencode.json:

{
  "mcpServers": {
    "todoist": {
      "command": "todoist-mcp"
    }
  }
}

Codex

Add the following to your Codex configuration file (location varies by installation):

{
  "mcpServers": {
    "todoist": {
      "command": "todoist-mcp"
    }
  }
}

Usage

Once configured, you can use natural language to interact with Todoist:

Task Examples

"Show me all my tasks"
"List my tasks for today"
"Create a task 'Buy groceries' due tomorrow with priority 1"
"Get details for task ID 123456"
"Update task 123456 to be due next Monday"
"Mark task 123456 as complete"
"Delete task 123456"

Project Examples

"List all my projects"
"Create a new project called 'Work'"
"Get details for project ID 987654"
"Update project 987654 color to blue"
"Delete project 987654"

Filter Examples

"Show me overdue tasks"
"List tasks in project work"
"Get tasks labeled urgent"

Available Tools

Task Tools

Tool Description
todoist_get_tasks List tasks with optional filters (project_id, filter_string)
todoist_get_task Get a single task by ID with full details
todoist_add_task Create a new task with content, description, due_date, priority, project_id, labels
todoist_update_task Update task attributes by ID
todoist_complete_task Mark a task as complete by ID
todoist_delete_task Delete a task by ID

Project Tools

Tool Description
todoist_get_projects List all projects
todoist_get_project Get a single project by ID with full details
todoist_add_project Create a new project with name, color, parent_id
todoist_update_project Update project attributes by ID
todoist_delete_project Delete a project by ID

Development

Setup

git clone git@github.com:chris-jelly/py-todoist-mcp.git
cd py-todoist-mcp
uv sync

Running the server locally

uv run todoist-mcp

Code Quality

This project uses Ruff for linting and formatting:

# Format code
ruff format .

# Check for linting errors
ruff check .

# Fix auto-fixable issues
ruff check . --fix

Project Structure

py-todoist-mcp/
├── src/todoist_mcp/
│   ├── __init__.py
│   ├── main.py          # Entry point
│   ├── server.py        # FastMCP server setup
│   ├── client.py        # Todoist API client
│   ├── utils.py         # Logging and error handling
│   └── tools/
│       ├── __init__.py
│       ├── tasks.py     # Task management tools
│       └── projects.py  # Project management tools
├── pyproject.toml
└── README.md

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please ensure:

  1. All code passes ruff lint and ruff format checks
  2. Follow the existing code patterns and conventions
  3. Add tests for new functionality
  4. Update documentation as needed

Troubleshooting

Server won't start

  • Verify TODOIST_API_TOKEN is set correctly
  • Check that Python 3.14+ is installed: python --version
  • Ensure uv is installed: uv --version

Authentication errors

  • Verify your API token is correct and hasn't expired
  • Check that your Todoist account is active
  • Ensure the token has appropriate permissions

AI Assistant not connecting

For Opencode:

  • Verify the configuration JSON syntax
  • Check the Opencode logs: ~/.config/opencode/logs/
  • Run opencode --version to ensure it's installed correctly
  • Restart Opencode after configuration changes

For Codex:

  • Verify the configuration JSON syntax
  • Check Codex output for error messages
  • Restart Codex after configuration changes

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选