SuperAPIAI Directory

ticktick-sdk

github.com · AI developer platforms

Async Python SDK and MCP server for TickTick: tasks, projects, tags, habits, focus/pomodoro sessions and user analytics.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · API

About this tool

ticktick-sdk is a comprehensive asynchronous Python library for programmatically operating TickTick, with built-in MCP (Model Context Protocol) server support that enables AI assistants to directly manage tasks. It also fully supports Dida365.

Purpose

The library solves the problem of the limited functionality of the official TickTick V1 API: advanced features such as tags, habits, and focus tracking can only be accessed through the undocumented V2 Web API. ticktick-sdk unifies the two APIs and automatically routes to the appropriate API based on the operation requirements, thereby providing complete feature coverage.

Main Capabilities

  • 43 MCP tools: Covering TickTick core functionality for AI assistants to call.
  • Batch operations: All mutation operations accept lists (1-100 items), supporting batch creation, updates, deletion, and task completion.
  • Complete task management: Create, read, update, delete, complete, move, and pin tasks.
  • Kanban management: Complete column management (create, update, delete columns, move tasks between columns).
  • Project organization: Projects, folders, kanban boards.
  • Tag system: Supports hierarchical tags and custom colors.
  • Habit tracking: Complete CRUD for habits, supporting batch check-ins, streaks, and goals.
  • Focus/Pomodoro: Access focus session data and statistics.
  • User analytics: Productivity score, level, completion rate.
  • Dual output: Markdown output for humans, JSON output for machines.
  • Full asynchronous support: Built on httpx, high-performance asynchronous operations.
  • Type safety: Complete Pydantic v2 validation and type hints.
  • Comprehensive testing: 300+ tests covering mocked and real API interactions.

Usage

MCP Server Setup

  1. Register an application: Go to the TickTick developer portal, click "Create App", fill in the application name (e.g. "My TickTick MCP") and redirect URI (http://127.0.0.1:8080/callback),保存 Client ID and Client Secret.
  2. Obtain an OAuth2 access token: Run the authentication command with the credentials, open the TickTick authorization page in the browser and authorize, then return to the terminal and copy the token. SSH/headless users can add the --manual flag to use a text-based flow.
  3. Configure the AI assistant: Put the token into the environment variable TICKTICK_ACCESS_TOKEN and add it to the Claude Desktop configuration file (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json). The configuration must provide the command ticktick-sdk and the above environment variable. This server works with any tool that supports MCP.

After configuration is complete, you can ask Claude questions such as: "What tasks are due for me today?" "Create a task to call John tomorrow at 2 PM" "Show my high-priority tasks" "Mark the shopping task as complete" "What is my current streak for my exercise habit?" "Check in for the meditation habit for today" "Create a new habit to drink 8 glasses of water every day".

Python library setup

You also need to create an app in the TickTick developer portal, create a .env file in the project directory, and fill in the access token. After that, you can call it asynchronously in a Python application.

Use cases

  • Users who want to automatically manage TickTick tasks through an AI assistant (such as Claude, GPT).
  • Developers who need to integrate TickTick tasks, projects, habits, and focus data into a Python application.
  • Automation scenarios that require batch operations on tasks or habit check-ins.
  • Scenarios that require access to TickTick advanced features (tags, habits, focus) that the official API does not support.

Limitations and notes

  • A TickTick account is required (free or Pro).
  • Using either MCP or the Python library requires registering an app in the TickTick developer portal and completing OAuth2 authorization.
  • 2FA/MFA is currently not supported.
  • The TickTick API has several special behaviors: creating a recurring task must provide start_date, otherwise the recurrence rule is silently ignored; setting parent_id when creating a subtask is ignored and must be called separately; deleting a task moves it to the trash (deleted=1) rather than permanently deleting it; when clearing due_date, start_date must also be cleared at the same time; tag order is not preserved; the Inbox is a special project and cannot be deleted, and its ID must be obtained via await client.get_status().
  • You may encounter rate limits and need to wait 30-60 seconds before retrying.
  • If authentication fails, check whether the credentials and redirect URI match exactly (including trailing slashes).
  • V2 initialization failure may be related to special characters in the password; it is recommended to change the password.

Development and license

The project uses the MIT license. Contributions are welcome; you need to fork the repository, create a feature branch, write tests, ensure the tests pass (pytest), run type checking (mypy src/), and submit a pull request.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools