loading…
Search for a command to run...
loading…
Agent-friendly CLI and MCP server for TickTick and Dida365 task management APIs, enabling project and task management with stable JSON output and OAuth authenti
Agent-friendly CLI and MCP server for TickTick and Dida365 task management APIs, enabling project and task management with stable JSON output and OAuth authentication.
简体中文 | English
Agent-friendly CLI and MCP server for TickTick international and Dida365 domestic APIs.
TickTick MCP CLI is designed for both human operators and AI agents:
If you paste this repository link into an agent, the agent should be able to install the project, check authentication, list projects/tasks, and use the MCP tools by following this README alone.
TickTick MCP CLI provides a shared Python core with two thin frontends:
ticktick-mcp-cli, legacy ticktask, and short alias tt.ticktick-mcp and legacy ticktask-mcp for agent runtimes that support Model Context Protocol.Supported service profiles:
ticktick → https://api.ticktick.comdida365 → https://api.dida365.comCurrent capabilities:
expires_at is near or past expiry.today, tomorrow, next monday, YYYY-MM-DD).today, overdue, upcoming, high-priority, no-date), priority/status validation, and task tag add/remove.CHECKLIST tasks.POST /open/v1/task/completed API.Retry-After handling for rate limits and transient 5xx responses.category, retryable, and remediation hints accompany every error payload.json, jsonl, csv, or markdown.*_configured flags.TICKTASK_INTEGRATION=1.For a one-command setup with MCP server and keyring extras, run:
curl -fsSL https://raw.githubusercontent.com/GeekMai90/ticktick-mcp-cli/main/scripts/install.sh | sh
The script installs from this GitHub repository by default (ticktick-mcp-cli[mcp,keyring] @ git+https://github.com/GeekMai90/ticktick-mcp-cli.git) because the PyPI package name is not published yet. It prefers uv tool install and falls back to pipx install, then prints the same verification commands used by the docs:
ticktick-mcp-cli --version
ticktick-mcp-cli doctor --json
ticktick-mcp-cli auth status --json
Agent runtimes with Node.js can run the GitHub wrapper without a global npm registry package:
npx github:GeekMai90/ticktick-mcp-cli doctor --json
npx github:GeekMai90/ticktick-mcp-cli auth status --json
npx --package github:GeekMai90/ticktick-mcp-cli ticktick-mcp
The wrapper delegates to the Python package from this GitHub repository via uvx when available, with a python3 -m pipx run fallback. Default spec: ticktick-mcp-cli[mcp,keyring] @ git+https://github.com/GeekMai90/ticktick-mcp-cli.git. It does not store credentials.
Use the repository source until the ticktick-mcp-cli package is published on PyPI:
uv tool install 'ticktick-mcp-cli[mcp,keyring] @ git+https://github.com/GeekMai90/ticktick-mcp-cli.git'
# or
pipx install 'ticktick-mcp-cli[mcp,keyring] @ git+https://github.com/GeekMai90/ticktick-mcp-cli.git'
If you do not need keyring support, use only the MCP extra:
uv tool install 'ticktick-mcp-cli[mcp] @ git+https://github.com/GeekMai90/ticktick-mcp-cli.git'
# or
pipx install 'ticktick-mcp-cli[mcp] @ git+https://github.com/GeekMai90/ticktick-mcp-cli.git'
git clone https://github.com/GeekMai90/ticktick-mcp-cli.git
cd ticktick-mcp-cli
uv sync --all-extras --dev
uv run ticktask --help
uv run tt --help
The project has release automation, but the ticktick-mcp-cli package is not available on PyPI until a maintainer publishes a release. After publication, these commands should work:
uv tool install ticktick-mcp-cli
# or
pipx install ticktick-mcp-cli
Then verify:
ticktick-mcp-cli --version
ticktick-mcp-cli doctor --json
Console scripts:
ticktick-mcp-cli — main public CLI.ticktask — backward-compatible legacy CLI.tt — short CLI alias.ticktick-mcp — main public stdio MCP server.ticktask-mcp — backward-compatible legacy MCP server.Create a TickTick or Dida365 developer OAuth app, then store its credentials locally:
ticktask auth init \
--service ticktick \
--client-id "$TICKTICK_CLIENT_ID" \
--client-secret "$TICKTICK_CLIENT_SECRET" \
--redirect-uri "http://localhost:8080/callback"
For Dida365, use:
ticktask auth init \
--service dida365 \
--client-id "$DIDA365_CLIENT_ID" \
--client-secret "$DIDA365_CLIENT_SECRET" \
--redirect-uri "http://localhost:8080/callback"
Local config path:
ticktask config path
Do not commit local config files, client secrets, access tokens, or refresh tokens. For OS-managed secret storage, initialize auth with --token-storage keyring after installing the optional extra (pipx install 'ticktick-mcp-cli[keyring]' or uv tool install 'ticktick-mcp-cli[keyring]'); the JSON config then keeps only non-secret metadata while client secret/access/refresh tokens are stored in the system keyring.
Start the local callback login flow:
ticktask auth login --service ticktick --local-server --json
This opens the browser and waits for one callback on the configured localhost redirect URI.
Manual browser flow:
ticktask auth login --service ticktick --no-browser --json
Open the returned authorization_url. After the provider redirects to your callback URL, complete login with either the full callback URL:
ticktask auth login \
--service ticktick \
--callback-url 'http://localhost:8080/callback?code=***&state=STATE' \
--json
or with code + state:
ticktask auth login --service ticktick --code CALLBACK_CODE --state STATE --json
Check status:
ticktask auth status --json
ticktask project list
ticktask task list
ticktask today
ticktask add "Plan release" --project Inbox
ticktask task add "Plan release" --project Inbox --idempotency-key agent-run-123:create-plan-release --json
ticktask task search "release"
ticktask task query "high priority #agent release" --json
ticktask task list --tag agent --filter high-priority
ticktask task filter --tag agent --priority high
ticktask completed today
ticktask task analytics week --project Inbox --json
Mutating dangerous operations require exact IDs and explicit confirmation:
ticktask project update PROJECT_ID --name "Renamed" --json
ticktask project delete PROJECT_ID --yes --json
ticktask task complete TASK_ID --project-id PROJECT_ID --yes
ticktask task delete TASK_ID --project-id PROJECT_ID --yes
ticktask task move TASK_ID --from-project-id PROJECT_ID --to-project-id OTHER_PROJECT_ID
ticktask task reminder set TASK_ID --project-id PROJECT_ID --reminder TRIGGER:PT10M
ticktask task reminder clear TASK_ID --project-id PROJECT_ID
ticktask task repeat set TASK_ID --project-id PROJECT_ID --preset weekly
ticktask task repeat clear TASK_ID --project-id PROJECT_ID
ticktask task batch complete --task-id TASK_ID_1 --task-id TASK_ID_2 --project-id PROJECT_ID
ticktask task batch delete --task-id TASK_ID --project-id PROJECT_ID --execute --yes
ticktask task batch move --task-id TASK_ID --from-project-id PROJECT_ID --to-project-id OTHER_PROJECT_ID
ticktask task tag add TASK_ID agent --project-id PROJECT_ID
ticktask task tag remove TASK_ID agent --project-id PROJECT_ID
ticktask task item delete TASK_ID ITEM_ID --project-id PROJECT_ID --yes
Export examples:
ticktask export tasks --format jsonl --status all
ticktask export tasks --format csv --project Inbox
ticktask export completed --format markdown --from 2026-05-01 --to 2026-05-17
ticktask export focus --format csv --from 2026-01-01 --to 2026-01-30 --type 0
Analytics and progress examples:
ticktask task analytics today --json
ticktask task analytics week --project Inbox --json
ticktask task analytics --from 2026-05-01 --to 2026-05-17 --json
ticktask report progress week --project Inbox --json
ticktask report progress --from 2026-05-01 --to 2026-05-17 --focus-type 1 --json
Incremental sync/export examples:
ticktask sync state --json
ticktask sync mark tasks:all --timestamp 2026-05-01T00:00:00Z --json
ticktask sync export tasks --format jsonl --state-key tasks:all --status all --save-state --json
Diagnostic bundle example:
ticktask doctor bundle --output ./ticktask-diagnostics.zip --json
The diagnostic bundle is a ZIP containing diagnostics.json and report.md. It is designed for bug reports and agent handoff: config paths, active service, runtime, MCP buildability, and tool counts are included, while client secrets, access tokens, refresh tokens, OAuth state, and PKCE verifier values are never written.
Backup examples:
ticktask backup tasks --output-dir ~/ticktask-backups --format markdown,jsonl,csv --status all --json
ticktask backup tasks --output-dir ~/ticktask-backups --date 2026-05-17 --project Inbox --from 2026-05-01 --to 2026-05-17 --json
Backups are written under OUTPUT_DIR/YYYY-MM-DD/project-slug/ with a date-level manifest.json.
When using ticktask from an agent:
--json for all CLI commands that support it.ok first, then on error.code when ok is false.--yes only after verifying the exact target of complete or delete.TICKTASK_INTEGRATION=1 as permission to make read-only real API calls only..env files.Success:
{"ok": true, "data": {}, "meta": {}}
Error:
{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human message",
"hint": "Next step",
"category": "validation",
"retryable": false,
"remediation": {
"action": "fix_arguments",
"command": "rerun with valid arguments",
"safe_to_retry": false
}
}
}
Structured error categories include configuration, auth, api, lookup, validation, safety, and unexpected. Agents should branch on ok, then error.code; use retryable and remediation.safe_to_retry before retrying.
# Discover state
ticktask doctor --json
ticktask doctor bundle --output ./ticktask-diagnostics.zip --json
ticktask auth status --json
ticktask project list --json
ticktask project create "Focus" --json
ticktask project update PROJECT_ID --name "Renamed" --json
ticktask project delete PROJECT_ID --yes --json
# Read tasks
ticktask task list --json
ticktask task list --status completed --from 2026-05-01 --to 2026-05-17 --json
ticktask task search "release" --json
ticktask task list --tag agent --filter high-priority --json
ticktask task filter --tag agent --priority high --json
ticktask task analytics week --json
ticktask report progress week --json
ticktask sync export tasks --format jsonl --state-key tasks:all --status all --json
ticktask backup tasks --output-dir ~/ticktask-backups --format markdown,jsonl --status all --json
# Mutate only after exact IDs are known
# For task creation retries, reuse the same --idempotency-key only with the same payload.
ticktask task add "Plan release" --project Inbox --idempotency-key agent-run-123:create-plan-release --json
ticktask task update TASK_ID --project-id PROJECT_ID --title "New title" --json
ticktask task complete TASK_ID --project-id PROJECT_ID --yes --json
ticktask task delete TASK_ID --project-id PROJECT_ID --yes --json
ticktask task tag add TASK_ID agent --project-id PROJECT_ID --json
ticktask task tag remove TASK_ID agent --project-id PROJECT_ID --json
ticktask task item add TASK_ID "Checklist item" --project-id PROJECT_ID --json
ticktask task item update TASK_ID ITEM_ID --project-id PROJECT_ID --title "Renamed" --status completed --json
ticktask task item complete TASK_ID ITEM_ID --project-id PROJECT_ID --json
ticktask task item delete TASK_ID ITEM_ID --project-id PROJECT_ID --yes --json
# Habits and focus
ticktask habit list --json
ticktask habit create "Read" --goal 1 --unit time --json
ticktask habit checkin HABIT_ID 20260101 --value 1 --json
ticktask habit history HABIT_ID --from 20260101 --to 20260131 --json
ticktask focus list --from 2026-01-01 --to 2026-01-30 --type 0 --json
ticktask focus delete FOCUS_ID --type 0 --yes --json
# Safe real-API smoke: skipped unless explicitly enabled
ticktask integration smoke --json
TICKTASK_INTEGRATION=1 ticktask integration smoke --service dida365 --json
Install optional MCP dependencies when working from a clone:
uv sync --extra mcp
uv run ticktick-mcp
If installed as a tool, run:
ticktick-mcp
The MCP server uses stdio and exposes the same shared core behavior as the CLI. It also exposes read-only MCP resources for common agent planning context and reusable MCP prompt templates for common workflows.
For AI agents, start with ticktask_describe_tools to inspect descriptions, parameter enum hints, confirmation requirements, and examples. Use ticktask_cli_parity to map MCP tools back to CLI commands. Read ticktask://projects, ticktask://config, and ticktask://saved-views when you need project context, sanitized local configuration, or smart-filter presets without invoking a tool. Use the built-in prompt templates for daily planning, weekly reviews, safe cleanup, and exports.
When agents create tasks, pass idempotency_key to ticktask_create_task or --idempotency-key to ticktask task add. Reusing the same key with the same create arguments returns the cached task instead of creating a duplicate remote task; reusing the key with different arguments fails validation. Idempotency records are stored locally in idempotency.json next to the active config directory.
MCP tools:
ticktask_describe_toolsticktask_cli_parityticktask_doctorticktask_diagnostic_bundleticktask_auth_statusticktask_list_projectsticktask_create_projectticktask_update_projectticktask_delete_projectticktask_list_tasksticktask_filter_tasksticktask_search_tasksticktask_create_taskticktask_complete_taskticktask_todayticktask_get_taskticktask_update_taskticktask_delete_taskticktask_move_taskticktask_batch_complete_tasksticktask_batch_delete_tasksticktask_batch_move_tasksticktask_set_task_remindersticktask_clear_task_remindersticktask_set_task_repeatticktask_clear_task_repeatticktask_add_task_tagticktask_remove_task_tagticktask_add_checklist_itemticktask_update_checklist_itemticktask_complete_checklist_itemticktask_delete_checklist_itemticktask_completedticktask_task_analyticsticktask_progress_reportticktask_list_habitsticktask_get_habitticktask_create_habitticktask_update_habitticktask_checkin_habitticktask_habit_checkinsticktask_list_focusesticktask_get_focusticktask_delete_focusticktask_export_tasksticktask_sync_stateticktask_mark_sync_stateticktask_sync_export_tasksticktask_backup_tasksticktask_export_focusesMCP resources:
ticktask://projects — read-only project list for planning and exact-ID lookup.ticktask://config — sanitized active service/profile configuration with secrets redacted.ticktask://saved-views — built-in smart-filter presets and equivalent MCP/CLI arguments.MCP prompts:
ticktask_daily_planning — plan today using project context and saved views.ticktask_weekly_review — review progress with task analytics, completed tasks, habits, and focus.ticktask_cleanup — identify stale tasks with dry-run batch operations first.ticktask_export — export, backup, or incrementally sync task data.The integration smoke command is safe by default:
ticktask integration smoke --json
It returns skipped: true unless explicitly enabled.
To run a read-only real API check:
TICKTASK_INTEGRATION=1 ticktask integration smoke --service dida365 --json
This only lists projects and returns project_count. It does not create, update, complete, move, or delete projects or tasks.
git clone https://github.com/GeekMai90/ticktick-mcp-cli.git
cd ticktick-mcp-cli
uv sync --all-extras --dev
uv run pytest -q
uv run ticktick-mcp-cli --help
uv run ticktick-mcp-cli doctor --json
uv run --with 'mcp>=1.0' python -c 'from ticktask.mcp.server import build_server; build_server(); print("mcp_build_ok")'
Project notes:
ticktask.core..env, token files, local config files, dist/, and build outputs are ignored by git.projectIds for global queries to avoid missing Dida365 completed tasks.MIT. See LICENSE.
Выполни в терминале:
claude mcp add ticktick-mcp-cli -- npx Read and write pages in your workspace
автор: NotionIssues, cycles, triage — from Claude
автор: LinearSearch and read your Drive files
автор: GoogleConnect and unify data across various platforms and databases with [MindsDB as a single MCP server](https://docs.mindsdb.com/mcp/overview).
автор: mindsdbНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории productivity