Security-hardened MCP server for TickTick task management
Project description
TickTick MCP Server (Security-Hardened Fork)
A security-hardened Model Context Protocol (MCP) server for TickTick that enables interacting with your TickTick task management system directly through Claude and other MCP clients.
This is a security-focused fork of jacepark12/ticktick-mcp
Why This Fork?
The original TickTick MCP server had 9 security vulnerabilities ranging from critical to medium severity. This fork addresses all of them:
| Severity | Vulnerability | Status |
|---|---|---|
| Critical | CSRF in OAuth callback - state parameter not validated | Fixed |
| High | Credentials stored with insecure file permissions | Fixed |
| High | OAuth server binds to all network interfaces | Fixed |
| High | No explicit TLS certificate verification | Fixed |
| Medium | Raw API errors exposed to users (info leakage) | Fixed |
| Medium | No rate limiting on OAuth callback server | Fixed |
| Medium | Bare except clause catches system signals | Fixed |
| Medium | Path traversal via unsanitized IDs in URLs | Fixed |
| Medium | Race conditions from global mutable state | Fixed |
Security Improvements in Detail
1. CSRF Protection (Critical)
- OAuth state parameter is now validated on callback
- Attackers cannot trick users into authorizing malicious sessions
2. Secure Credential Storage (High)
.envfiles are now created with0600permissions (owner read/write only)- Other users on the system cannot read your tokens
3. Localhost-Only Binding (High)
- OAuth callback server now binds to
127.0.0.1only - Prevents remote attackers from intercepting OAuth callbacks
4. Explicit TLS Verification (High)
- All API requests now explicitly verify SSL certificates
- Prevents man-in-the-middle attacks
5. Sanitized Error Messages (Medium)
- API errors are logged but sanitized before showing to users
- Prevents accidental exposure of sensitive information
6. Rate Limiting (Medium)
- OAuth callback server limits requests to prevent DoS attacks
- Maximum 100 requests per authentication flow
7. Input Validation (Medium)
- All project/task IDs are validated before use in URLs
- Prevents path traversal attacks like
../admin
8. Proper Exception Handling (Medium)
- Replaced bare
except:with specific exception types - System signals (Ctrl+C) now work correctly
9. Thread-Safe State Management (Medium)
- OAuth state is cleared before each new auth flow
- Prevents race conditions in concurrent usage
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
- GTD (Getting Things Done) workflow support
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)
Installation
Option 1: Using uvx (Recommended)
No installation required! Just run directly with uvx:
# Authenticate with TickTick (first time only)
uvx ticktick-mcp-server auth
# Run the server
uvx ticktick-mcp-server
Option 2: Using pip
pip install ticktick-mcp-server
# Authenticate
ticktick-mcp-server auth
# Run
ticktick-mcp-server
Option 3: From Source
git clone https://github.com/felores/ticktick-mcp-server.git
cd ticktick-mcp-server
uv pip install -e .
Authentication with TickTick
This server uses OAuth2 to authenticate with TickTick:
-
Register your application at the TickTick Developer Center
- Set the redirect URI to
http://localhost:8080/callback - Note your Client ID and Client Secret
- Set the redirect URI to
-
Run the authentication command:
uvx ticktick-mcp-server auth # or if installed: ticktick-mcp-server auth
-
Follow the prompts to enter your Client ID and Client Secret
-
A browser window will open for you to authorize the application
-
After authorizing, your access tokens will be securely saved to the
.envfile
The server handles token refresh automatically.
Authentication with Dida365
Dida365 is the China version of TickTick. To use it:
-
Register your application at the Dida365 Developer Center
- Set the redirect URI to
http://localhost:8080/callback
- 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 uvx (recommended):
{ "mcpServers": { "ticktick": { "command": "uvx", "args": ["ticktick-mcp-server"] } } }
Or using installed package:
{ "mcpServers": { "ticktick": { "command": "ticktick-mcp-server" } } }
-
Restart Claude for Desktop
Available MCP Tools
Project Management
| Tool | Description | Parameters |
|---|---|---|
get_projects |
List all your TickTick projects | None |
get_project |
Get details about a specific project | project_id |
get_project_tasks |
List all tasks in a project | project_id |
create_project |
Create a new project | name, color (optional), view_mode (optional) |
delete_project |
Delete a project | project_id |
Task Management
| Tool | Description | Parameters |
|---|---|---|
get_task |
Get details about a specific task | project_id, task_id |
create_task |
Create a new task | title, project_id, content, start_date, due_date, priority |
update_task |
Update an existing task | task_id, project_id, title, content, start_date, due_date, priority |
complete_task |
Mark a task as complete | project_id, task_id |
delete_task |
Delete a task | project_id, task_id |
Task Retrieval & Search
| Tool | Description | Parameters |
|---|---|---|
get_all_tasks |
Get all tasks from all projects | None |
get_tasks_by_priority |
Get tasks filtered by priority level | priority_id (0: None, 1: Low, 3: Medium, 5: High) |
search_tasks |
Search tasks by title, content, or subtasks | search_term |
Date-Based Task Retrieval
| Tool | Description | Parameters |
|---|---|---|
get_tasks_due_today |
Get all tasks due today | None |
get_tasks_due_tomorrow |
Get all tasks due tomorrow | None |
get_tasks_due_in_days |
Get tasks due in exactly X days | days |
get_tasks_due_this_week |
Get tasks due within the next 7 days | None |
get_overdue_tasks |
Get all overdue tasks | None |
GTD (Getting Things Done) Framework
| Tool | Description | Parameters |
|---|---|---|
get_engaged_tasks |
Get "engaged" tasks (high priority or overdue) | None |
get_next_tasks |
Get "next" tasks (medium priority or due tomorrow) | None |
batch_create_tasks |
Create multiple tasks at once | tasks (list) |
Example Prompts
General
- "Show me all my TickTick projects"
- "Create a new task called 'Finish MCP server documentation' in my work project with high priority"
- "Mark the task 'Buy groceries' as complete"
Task Filtering
- "What tasks do I have due today?"
- "Show me everything that's overdue"
- "Show me all my high priority tasks"
GTD Workflow
- "Time block the rest of my day with items from my engaged list"
- "Walk me through my next actions for tomorrow"
- "Break down this project into 5 smaller actionable tasks"
Project Structure
ticktick-mcp-server/
├── .env.template # Template for environment variables
├── README.md # Project documentation
├── requirements.txt # Project dependencies
├── setup.py # Package setup file
├── test_server.py # Test script
└── ticktick_mcp/ # Main package
├── __init__.py
├── authenticate.py # OAuth authentication utility
├── cli.py # Command-line interface
└── src/
├── __init__.py
├── auth.py # OAuth implementation (security-hardened)
├── server.py # MCP server implementation
└── ticktick_client.py # TickTick API client (security-hardened)
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
Credits
This is a security-hardened fork of jacepark12/ticktick-mcp. Thanks to the original author for creating the foundation of this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ticktick_mcp_server-0.2.0.tar.gz.
File metadata
- Download URL: ticktick_mcp_server-0.2.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b97aba0e8a3608933fcd2e884f4d72a178af50b70b8c413fc98850b27a008257
|
|
| MD5 |
128df45edb0c4fd886bf8caa6a53cba1
|
|
| BLAKE2b-256 |
7f8398842a7349fcd101e7260d02bfdb2d770f02d57ba952e50a4db48566ab89
|
File details
Details for the file ticktick_mcp_server-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ticktick_mcp_server-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
854dbf8d5e771833d0dbf192a6b7a8facc182da0df0005354cc1dd60e0e20fa2
|
|
| MD5 |
aa64326f3e190286de7b0ac2801575ef
|
|
| BLAKE2b-256 |
17626ca341036350bd6b98d1ce6536e849e89887817b1f947a4aec93c7252b09
|