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.
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:
- Log in to Todoist
- Go to Settings → Integrations → Developer
- 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:
- All code passes
ruff lintandruff formatchecks - Follow the existing code patterns and conventions
- Add tests for new functionality
- Update documentation as needed
Troubleshooting
Server won't start
- Verify
TODOIST_API_TOKENis 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 --versionto 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.