dida-mcp-server
Enables AI assistants to manage TickTick/Dida365 tasks, projects, and tags through the MCP protocol, with features for GTD-based task organization and OAuth authentication.
README
Dida MCP Server
A Model Context Protocol (MCP) server for interacting with TickTick/Dida365 task management service. This server provides tools to manage tasks, projects, and tags through the TickTick API.
Overview
Dida MCP Server is built on the Model Context Protocol framework, enabling AI assistants to interact with your TickTick/Dida365 account. It provides a comprehensive set of tools for task and project management, allowing AI assistants to help organize your tasks according to GTD (Getting Things Done) principles.
Features
- Authentication: OAuth-based authentication with TickTick/Dida365 API
- Task Management: Create, read, update, delete, and move tasks
- Project Management: Create, read, update, and delete projects
- Batch Operations: Efficiently manage multiple tasks at once
- GTD Assistant: Built-in system prompt for GTD-based task organization
- Cached Data: Efficient caching of projects and tags data
Prerequisites
- Node.js (v16 or higher)
- npm (v7 or higher)
- TickTick/Dida365 account
- Client ID and Client Secret from Dida365 Developer Center (for OAuth authentication)
Installation
Option 1: Install from npm (Recommended)
# Install globally
npm install -g dida-mcp-server
# Or install locally in your project
npm install dida-mcp-server
Option 2: Install from source
# Clone the repository
git clone https://github.com/zhongwencool/dida-mcp-server.git
cd dida-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Authentication
Before using the server, you need to authenticate with TickTick/Dida365. The server supports two authentication methods:
- OAuth Authentication (V1 API): Uses the Dida365 Open API with OAuth tokens
- Username/Password Authentication (V2 API): Uses the internal API with session tokens
Using get-access-token
The get-access-token script handles the authentication process for both API versions. To use it:
# If installed globally
dida-get-token
# If installed locally or from source
npm run get-token
The script will:
- Prompt you for your TickTick/Dida365 username and password (for V2 API)
- Prompt you for your Client ID and Client Secret ([for V1 API OAuth])
- Start a local server on port 3000 to handle the OAuth callback
- Open your browser to authorize the application
- Exchange the authorization code for an access token
- Store both tokens in the configuration file at
~/.dida-mcp-config.json - Display a success page with token information and MCP server configuration
Prerequisites for OAuth Authentication
To use OAuth authentication, you need to:
- Register your application in the Dida365 Developer Center
- Set your redirect URI to
http://localhost:3000/oauth/callback - Obtain a Client ID and Client Secret
Configuration File
The authentication process creates a configuration file at ~/.dida-mcp-config.json with the following structure:
{
"access_token": "your-v1-oauth-token",
"refresh_token": "your-refresh-token",
"expires_at": 1234567890000,
"token_type": "bearer",
"v2_access_token": "your-v2-session-token",
"inboxId": "your-inbox-project-id"
}
This file is automatically detected and used by the server when it starts.
Usage
Starting the Server
# If installed globally
dida-mcp-server
# If installed locally or from source
npm start
The server will automatically attempt to authenticate using stored tokens and display the authentication status.
Connecting with an MCP Client
You can connect to the server using any MCP-compatible client. The server provides a configuration that can be added to your MCP client configuration:
{
"mcpServers": {
"dida": {
"command": "dida-mcp-server"
}
}
}
Or if you installed it locally:
{
"mcpServers": {
"dida": {
"command": "node",
"args": [
"/path/to/node_modules/dida-mcp-server/dist/index.js"
]
}
}
}
Available Tools
Authentication Tools
check-auth-status: Check the current authentication status
Project Management Tools
list-projects: Get all projectscreate-project: Create a new projectupdate-project: Update an existing projectdelete-project: Delete a projectrefresh-project-cache: Manually refresh the project cache
Task Management Tools
list-tasks: Get tasks from a project (defaults to inbox)create-task: Create a new taskget-task: Get a specific task by IDupdate-task: Update a taskbatch-update-tasks: Update multiple tasks at oncecomplete-task: Mark a task as completeddelete-task: Delete a taskbatch-delete-tasks: Delete multiple tasks at oncemove-task: Move a task to a different projectbatch-move-tasks: Move multiple tasks to different projects
Data Query Tools
list-cached-data: View cached projects and tags data
System Prompts
The server includes two built-in prompts:
- GTD Assistant Prompt: A system prompt that provides guidance on using the tools to implement GTD methodology
- Process Inbox Prompt: A user-level prompt that helps organize tasks in the inbox according to GTD principles
Development
Running in Development Mode
npm run dev
This will start the server in watch mode, automatically recompiling and restarting when changes are made.
Running Tests
npm test
Or to run tests in watch mode:
npm run test:watch
Project Structure
├── dist/ # Compiled JavaScript files
├── src/
│ ├── auth/ # Authentication-related code
│ ├── projects/ # Project management tools
│ ├── resources/ # Resource definitions (cached data)
│ ├── tasks/ # Task management tools
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ ├── config.ts # Configuration management
│ ├── get-access-token.ts # Token acquisition script
│ ├── index.ts # Main server entry point
│ └── systemPrompt.ts # GTD assistant system prompt
├── tests/ # Test files
├── package.json # Project metadata and dependencies
├── LICENSE # ISC License file
└── tsconfig.json # TypeScript configuration
API Documentation
This project uses the Dida365 Open API. For more information, see the Dida365 Open API Documentation.
License
ISC
Publishing to NPM
To publish the package to NPM, follow these steps:
# Login to npm (if not already logged in)
npm login
# Build the project
npm run build
# Test the package
npm test
# Publish to npm
npm publish
To update the package:
- Update the version in
package.json - Run
npm publish
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgements
- Model Context Protocol for the MCP framework
- TickTick/Dida365 for the task management service
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。