sanjeed5/ticktick-mcp
MCP server that interacts with TickTick (Dida 365) via the TickTick Open API
TickTick MCP Server
A Model Context Protocol (MCP) server for TickTick that enables interacting with your TickTick task management system directly through Claude and other MCP clients.
Features
- ๐ View all your TickTick projects and tasks
- โ๏ธ Create new projects and tasks through natural language
- ๐ Update existing task details (title, content, dates, priority)
- โ Mark tasks as complete
- ๐๏ธ Delete tasks and projects
- ๐ Full integration with TickTick's open API
- ๐ Seamless integration with Claude and other MCP clients
Prerequisites
- Python 3.10 or higher
- uv - Fast Python package installer and resolver
- TickTick account with API access
- TickTick API credentials (Client ID, Client Secret, Access Token)
Installation
-
Clone this repository:
git clone https://github.com/jacepark12/ticktick-mcp.git cd ticktick-mcp -
Install with uv:
# Install uv if you don't have it already curl -LsSf https://astral.sh/uv/install.sh | sh # Create a virtual environment uv venv # Activate the virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install the package uv pip install -e .
-
Authenticate with TickTick:
# Run the authentication flow uv run -m ticktick_mcp.cli authThis will:
- Ask for your TickTick Client ID and Client Secret
- Open a browser window for you to log in to TickTick
- Automatically save your access tokens to a
.envfile
-
Test your configuration:
uv run test_server.py
This will verify that your TickTick credentials are working correctly.
Authentication with TickTick
This server uses OAuth2 to authenticate with TickTick. The setup process is straightforward:
-
Register your application at the TickTick Developer Center
- Set the redirect URI to
http://localhost:8000/callback - Note your Client ID and Client Secret
- Set the redirect URI to
-
Run the authentication command:
uv run -m ticktick_mcp.cli auth
-
Follow the prompts to enter your Client ID and Client Secret
-
A browser window will open for you to authorize the application with your TickTick account
-
After authorizing, you'll be redirected back to the application, and your access tokens will be automatically saved to the
.envfile
The server handles token refresh automatically, so you won't need to reauthenticate unless you revoke access or delete your .env file.
Authentication with Dida365
ๆปด็ญๆธ ๅ - Dida365 is China version of TickTick, and the authentication process is similar to TickTick. Follow these steps to set up Dida365 authentication:
-
Register your application at the Dida365 Developer Center
- Set the redirect URI to
http://localhost:8000/callback - Note your Client ID and Client Secret
- Set the redirect URI to
-
Add environment variables to your
.envfile:TICKTICK_BASE_URL='https://api.dida365.com/open/v1' TICKTICK_AUTH_URL='https://dida365.com/oauth/authorize' TICKTICK_TOKEN_URL='https://dida365.com/oauth/token'
-
Follow the same authentication steps as for TickTick
Usage with Claude for Desktop
-
Install Claude for Desktop
-
Edit your Claude for Desktop configuration file:
macOS:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
notepad %APPDATA%\Claude\claude_desktop_config.json
-
Add the TickTick MCP server configuration, using absolute paths:
{ "mcpServers": { "ticktick": { "command": "<absolute path to uv>", "args": ["run", "--directory", "<absolute path to ticktick-mcp directory>", "-m", "ticktick_mcp.cli", "run"] } } } -
Restart Claude for Desktop
Once connected, you'll see the TickTick MCP server tools available in Claude, indicated by the ๐จ (tools) icon.
Available MCP Tools
The TickTick MCP server provides 12 tools for managing your tasks and projects:
Projects
| Tool | Description | Parameters |
|---|---|---|
get_projects |
List all your TickTick projects | None |
get_project |
Get details about a specific project | project_id |
create_project |
Create a new project | name, color (optional), view_mode (optional) |
delete_project |
Delete a project | project_id |
Tasks
| Tool | Description | Parameters |
|---|---|---|
get_project_tasks |
List all tasks in a project | project_id |
get_task |
Get details about a specific task | project_id, task_id |
create_task |
Create a new task | title, project_id, content (optional), start_date (optional), due_date (optional), priority (optional) |
update_task |
Update an existing task | task_id, project_id, title (optional), content (optional), start_date (optional), due_date (optional), priority (optional) |
complete_task |
Mark a task as complete | project_id, task_id |
delete_task |
Delete a task | project_id, task_id |
create_subtask |
Create a subtask for a parent task | subtask_title, parent_task_id, project_id, content (optional), priority (optional) |
Task Filtering
| Tool | Description | Parameters |
|---|---|---|
filter_tasks |
Filter tasks with flexible criteria | date_filter (optional), priority (optional), search_term (optional), project_id (optional) |
Filter Parameters:
date_filter:"all","today","tomorrow","overdue","this_week", or"next_7_days"(default:"all")priority:0(None),1(Low),3(Medium), or5(High) (default:None= any priority)search_term: Text to search in task titles, content, or subtasks (case-insensitive)project_id: Filter to a specific project or"inbox"(default:None= all projects)
Examples:
filter_tasks(date_filter="overdue")- All overdue tasksfilter_tasks(priority=5)- All high priority tasksfilter_tasks(date_filter="today", priority=5)- High priority tasks due todayfilter_tasks(search_term="client meeting")- Search for tasks about client meetingsfilter_tasks(project_id="inbox", date_filter="this_week")- Inbox tasks due this weekfilter_tasks(priority=3, search_term="review")- Medium priority tasks containing "review"
Special Project IDs
Inbox: You can use "inbox" as a project ID to access your TickTick inbox tasks. For example:
get_project_tasks("inbox")- Get all tasks in your inboxcreate_task("My Task", "inbox")- Create a task in your inbox
MCP Prompts
The server also provides 2 prompts for workflow helpers:
| Prompt | Description | Usage |
|---|---|---|
/engaged |
Show tasks that need immediate attention (GTD "Engaged" workflow) | High priority tasks, overdue tasks, and tasks due today |
/next |
Show tasks for next actions (GTD "Next" workflow) | Medium priority tasks and tasks due tomorrow |
These prompts are user-driven and can be invoked in Cursor or other MCP clients that support prompts. They use the filter_tasks tool internally to provide GTD workflow assistance.
Example Prompts for Claude
Here are some example prompts to use with Claude after connecting the TickTick MCP server:
General
- "Show me all my TickTick projects"
- "Create a new task called 'Finish MCP server documentation' in my work project with high priority"
- "List all tasks in my personal project"
- "Mark the task 'Buy groceries' as complete"
- "Create a new project called 'Vacation Planning' with a blue color"
- "When is my next deadline in TickTick?"
Task Filtering Queries
- "Show me all overdue tasks" โ
filter_tasks(date_filter="overdue") - "What tasks do I have due today?" โ
filter_tasks(date_filter="today") - "Show me all tasks due this week" โ
filter_tasks(date_filter="this_week") - "Show me all my high priority tasks" โ
filter_tasks(priority=5) - "Search for tasks about 'project alpha'" โ
filter_tasks(search_term="project alpha") - "Show me high priority tasks due today in my inbox" โ
filter_tasks(project_id="inbox", date_filter="today", priority=5)
GTD Workflow
Following David Allen's "Getting Things Done" framework:
-
Engaged tasks: Use the
/engagedprompt orfilter_taskswith multiple criteria- "Show me my engaged tasks" โ Use
/engagedprompt - "What needs my immediate attention?" โ
filter_tasks(date_filter="overdue")orfilter_tasks(priority=5)
- "Show me my engaged tasks" โ Use
-
Next actions: Use the
/nextprompt- "Show me my next actions" โ Use
/nextprompt - "What should I work on tomorrow?" โ
filter_tasks(date_filter="tomorrow")
- "Show me my next actions" โ Use
Development
Project Structure
ticktick-mcp/
โโโ .env.template # Template for environment variables
โโโ README.md # Project documentation
โโโ requirements.txt # Project dependencies
โโโ setup.py # Package setup file
โโโ test_server.py # Test script for server configuration
โโโ ticktick_mcp/ # Main package
โโโ __init__.py # Package initialization
โโโ authenticate.py # OAuth authentication utility
โโโ cli.py # Command-line interface
โโโ src/ # Source code
โโโ __init__.py # Module initialization
โโโ auth.py # OAuth authentication implementation
โโโ server.py # MCP server implementation
โโโ ticktick_client.py # TickTick API client
Authentication Flow
The project implements a complete OAuth 2.0 flow for TickTick:
- Initial Setup: User provides their TickTick API Client ID and Secret
- Browser Authorization: User is redirected to TickTick to grant access
- Token Reception: A local server receives the OAuth callback with the authorization code
- Token Exchange: The code is exchanged for access and refresh tokens
- Token Storage: Tokens are securely stored in the local
.envfile - Token Refresh: The client automatically refreshes the access token when it expires
This simplifies the user experience by handling the entire OAuth flow programmatically.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.