Back to MCP Servers

Ticktick Sdk

Comprehensive async Python SDK for [TickTick](https://ticktick.com/) with MCP server support. Features 45 tools for tasks, projects, tags, habits, focus/pomodoro sessions, and user analytics.

other-tools-and-integrationspython
By dev-mirzabicer
13942Updated 5 months agoPythonMIT

Installation

npx -y ticktick-sdk

Configuration

{
  "mcpServers": {
    "ticktick-sdk": {
      "command": "npx",
      "args": ["-y", "ticktick-sdk"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

ticktick-sdk: A TickTick MCP Server & Full Python SDK

PyPI - Version Python 3.11+ License: MIT PyPI Downloads

A comprehensive async Python SDK for TickTick with MCP (Model Context Protocol) server support.

Includes full support for Dida365 (滴答清单) as well.

Use TickTick programmatically from Python, or let AI assistants manage your tasks.

Table of Contents


Features

MCP Server

  • 43 Tools: Streamlined coverage of TickTick functionality
  • Batch Operations: All mutations accept lists (1-100 items) for bulk operations
  • AI-Ready: Works with Claude, GPT, and other MCP-compatible assistants
  • Dual Output: Markdown for humans, JSON for machines

Python Library

  • Full Async Support: Built on httpx for high-performance async operations
  • Batch Operations: Create, update, delete, complete up to 100 tasks in a single call
  • Complete Task Management: Create, read, update, delete, complete, move, pin tasks
  • Kanban Boards: Full column management (create, update, delete, move tasks between columns)
  • Project Organization: Projects, folders, kanban boards
  • Tag System: Hierarchical tags with colors
  • Habit Tracking: Full CRUD for habits with batch check-ins, streaks, and goals
  • Focus/Pomodoro: Access focus session data and statistics
  • User Analytics: Productivity scores, levels, completion rates

Developer Experience

  • Type-Safe: Full Pydantic v2 validation with comprehensive type hints
  • Well-Tested: 300+ tests covering both mock and live API interactions
  • Documented: Extensive docstrings and examples

Why This Library?

The Two-API Problem

TickTick has two different APIs:

APITypeWhat We Use It For
V1 (OAuth2)Official, documentedProject with all tasks, basic operations
V2 (Session)Unofficial, reverse-engineeredTags, folders, habits, focus, subtasks, and more

The official V1 API is limited. Most of TickTick's power features (tags, habits, focus tracking) are only available through the undocumented V2 web API. This library combines both, routing each operation to the appropriate API automatically.

Compared to Other Libraries

Based on analysis of the actual source code of available TickTick Python libraries:

Featureticktick-sdkpyticktickticktick-pytickthonticktick-python
I/O ModelAsyncAsyncSyncSyncSync
Type SystemPydantic V2Pydantic V2Dictsattrsaddict
MCP ServerYesNoNoNoNo
HabitsFull CRUDNoBasicBasicNo
Focus/PomoYesYesYesYesNo
Unified V1+V2Smart RoutingSeparateBothV2 onlyV2 only
SubtasksAdvancedBatchYesBasicBasic
TagsFull (merge/rename)YesYesYesNo

Key Differentiators:

  • MCP Server: Only ticktick-sdk provides AI assistant integration via Model Context Protocol
  • Unified API Routing: Automatically routes operations to V1 or V2 based on feature requirements
  • Full Habit CRUD: Complete habit management including check-ins, streaks, archive/unarchive
  • Async-First: Built on httpx for high-performance async operations

Installation

pip install ticktick-sdk

Requirements:

  • Python 3.11+
  • TickTick account (free or Pro)

MCP Server Setup & Usage

Use TickTick with AI assistants like Claude through the Model Context Protocol.

Step 1: Register Your App

  1. Go to the TickTick Developer Portal
  2. Click "Create App"
  3. Fill in:
    • App Name: e.g., "My TickTick MCP"
    • Redirect URI: http://127.0.0.1:8080/callback
  4. Save your Client ID and Client Secret

Step 2: Get OAuth2 Access Token

Run the auth command with your credentials:

TICKTICK_CLIENT_ID=your_client_id \
TICKTICK_CLIENT_SECRET=your_client_secret \
ticktick-sdk auth

This will:

  1. Open your browser to TickTick's authorization page
  2. Authorize the app - Click "Authorize" to grant access
  3. Return to terminal - After authorizing, you'll see output like this:
============================================================
  SUCCESS! Here is your access token:
============================================================

a]234abc-5678-90de-f012-34567890abcd

============================================================

NEXT STEPS:

For Claude Code users:
  Run (replace YOUR_* placeholders):
    claude mcp add ticktick \
      -e TICKTICK_CLIENT_ID=YOUR_CLIENT_ID \
      ...
  1. Copy this token - You'll need it in the next step

Note: Sometimes the browser shows an "invalid credentials" error page. Just refresh the page and it should work.

SSH/Headless Users: Add --manual flag for a text-based flow that doesn't require a browser.

Step 3: Configure Your AI Assistant

Claude Code (Recommended)

claude mcp add ticktick \
  -e TICKTICK_CLIENT_ID=your_client_id \
  -e TICKTICK_CLIENT_SECRET=your_client_secret \
  -e TICKTICK_ACCESS_TOKEN=your_access_token \
  -e TICKTICK_USERNAME=your_email \
  -e TICKTICK_PASSWORD=your_password \
  -- ticktick-sdk

Note: For TICKTICK_ACCESS_TOKEN, paste the token you copied from Step 2.

Verify it's working:

claude mcp list        # See all configured servers
/mcp                   # Within Claude Code, check server status

Claude Desktop

Add to your Claude Desktop config:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "ticktick": {
      "command": "ticktick-sdk",
      "env": {
        "TICKTICK_CLIENT_ID": "your_client_id",
        "TICKTICK_CLIENT_SECRET": "your_client_secret",
        "TICKTICK_ACCESS_TOKEN": "your_access_token",
        "TICKTICK_USERNAME": "your_email",
        "TICKTICK_PASSWORD": "your_password"
      }
    }
  }
}

Other MCP-Compatible Tools

This server works with any tool that supports the Model Context Protocol, which includes most modern AI assistants and IDEs. The configuration is similar - you just need to provide the command (ticktick-sdk) and the environment variables shown above.

CLI Reference

The ticktick-sdk command provides several subcommands:

CommandDescription
ticktick-sdkStart the MCP server (default)
ticktick-sdk serverStart the MCP server (explicit)
ticktick-sdk server --host HOSTUse specific API host (ticktick.com or dida365.com)
ticktick-sdk server --enabledModules MODULESEnable only specific tool modules (comma-separated)
ticktick-sdk server --enabledTools TOOLSEnable only specific tools (comma-separated)
ticktick-sdk authGet OAuth2 access token (opens browser)
ticktick-sdk auth --manualGet OAuth2 access token (SSH-friendly)
ticktick-sdk --versionShow version information
ticktick-sdk --helpShow help message

Tool Filtering (reduces context window usage for AI assistants):

# Enable only task and project tools
ticktick-sdk server --enabledModules tasks,projects

# Enable specific tools only
ticktick-sdk server --enabledTools ticktick_create_tasks,ticktick_list_tasks

# Available modules: tasks, projects, folders, columns, tags, habits, user, focus

Example Conversations

Once configured, you can ask Claude things like:

  • "What tasks do I have due today?"
  • "Create a task to call John tomorrow at 2pm"
  • "Show me my high priority tasks"
  • "Mark the grocery shopping task as complete"
  • "What's my current streak for the Exercise habit?"
  • "Check in my meditation habit for today"
  • "Create a new habit to drink 8 glasses of water daily"

Available MCP Tools (43 Total)

All mutation tools accept lists for batch operations (1-100 items).

Task Tools (Batch-Capable)

ToolDescription
ticktick_create_tasksCreate 1-50 tasks with titles, dates, tags, etc.
ticktick_get_taskGet task details by ID
ticktick_list_tasksList tasks (active/completed/abandoned/deleted via status filter)
ticktick_update_tasksUpdate 1-100 tasks (includes column assignment)
ticktick_complete_tasksComplete 1-100 tasks
ticktick_delete_tasksDelete 1-100 tasks (moves to trash)
ticktick_move_tasksMove 1-50 tasks between projects
ticktick_set_task_parentsSet parent-child relationships for 1-50 tasks
ticktick_unparent_tasksRemove parent relationships from 1-50 tasks
ticktick_search_tasksSearch tasks by text
ticktick_pin_tasksPin or unpin 1-100 tasks

Project Tools

ToolDescription
ticktick_list_projectsList all projects
ticktick_get_projectGet project details with tasks
ticktick_create_projectCreate a new project
ticktick_update_projectUpdate project properties
ticktick_delete_projectDelete a project

Folder Tools

ToolDescription
ticktick_list_foldersList all folders
ticktick_create_folderCreate a folder
ticktick_rename_folderRename a folder
ticktick_delete_folderDelete a folder

Kanban Column Tools

ToolDescription
ticktick_list_columnsList columns for a kanban project
ticktick_create_columnCreate a kanban column
ticktick_update_columnUpdate column name or order
ticktick_delete_columnDelete a kanban column

Tag Tools

ToolDescription
ticktick_list_tagsList all tags
ticktick_create_tagCreate a tag with color
ticktick_update_tagUpdate tag properties (includes rename via label)
ticktick_delete_tagDelete a tag
ticktick_merge_tagsMerge two tags

Habit Tools (Batch-Capable)

| Tool | Description |

View source on GitHub