TodoList MCP Server

TodoList MCP Server

Enables full management of ToDoList (.tdl) XML files with CRUD operations, hierarchical task support, and advanced filtering. Maintains compatibility with the ToDoList desktop application while allowing programmatic task management.

Category
访问服务器

README

TodoList MCP Server

A comprehensive Python MCP server for managing ToDoList (.tdl) XML files. This server provides full CRUD operations for tasks in the ToDoList application format, allowing you to manage your tasks programmatically while maintaining compatibility with the ToDoList desktop application.

Features

  • Full CRUD Operations: Create, read, update, and delete tasks
  • Hierarchical Task Support: Handle nested tasks and subtasks
  • Rich Metadata: Support for priorities, due dates, categories, assignments, and progress tracking
  • Search and Filtering: Advanced task filtering by various criteria
  • ToDoList Compatibility: Full compatibility with ToDoList application XML format
  • Real-time Sync: Works with live ToDoList files

Prerequisites

  • Python 3.7 or higher
  • ToDoList application (for .tdl file creation)

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/todolist-mcp.git
cd todolist-mcp
  1. Install dependencies:
pip install -r requirements.txt

Configuration

By default, the server monitors D:\Projects\mylist.tdl. You can change this by modifying the DEFAULT_TDL_FILE constant in tdl_mcp_server.py.

Usage

Starting the Server

python tdl_mcp_server.py

Available Tools

Task Management

  • get_my_tasks: Get all tasks from your main ToDoList file
  • get_today_tasks: Get tasks due today (or specific date)
  • add_task: Create new tasks with full metadata
  • update_task: Update existing tasks
  • move_task: Move tasks to different positions in the hierarchy
  • get_task: Get detailed information about a specific task

Search and Filtering

  • search_tasks: Search and filter tasks by various criteria

File Operations

  • get_file_status: Check ToDoList file status and statistics
  • read_any_tdl_file: Read tasks from any .tdl file
  • analyze_structure: Analyze the XML structure of ToDoList files

Example MCP Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "todolist": {
      "command": "python",
      "args": ["path/to/todolist-mcp/tdl_mcp_server.py"]
    }
  }
}

API Reference

Task Operations

Create a Task

add_task({
    "title": "Complete project documentation",
    "description": "Write comprehensive README files",
    "due_date": "2024-12-31",
    "priority": "High",
    "category": "Documentation"
})

Update a Task

update_task({
    "task_id": "123",
    "percent_done": 75,
    "allocated_to": "John Doe",
    "priority": "Above Normal"
})

Search Tasks

search_tasks({
    "search_term": "documentation",
    "category": "Work",
    "completed": false,
    "priority": "High"
})

Task Properties

Property Type Description
title string Task title
description string Detailed task description
due_date string Due date (YYYY-MM-DD format)
priority enum Low, Below Normal, Normal, Above Normal, High, Urgent
category string Task category or project
allocated_to string Person(s) assigned to the task
percent_done integer Completion percentage (0-100)
position string Hierarchical position (e.g., "1.2.3")

Project Structure

todolist-mcp/
├── tdl_mcp_server.py      # Main MCP server
├── requirements.txt       # Python dependencies
├── test_server.py         # Server tests
├── test_update_functionality.py  # Update functionality tests
├── claude_desktop_config.json    # Example MCP configuration
├── Introduction.tdl       # Sample ToDoList file
└── README.md             # This file

ToDoList File Format

The server works with ToDoList's native XML format (.tdl files). Key features:

  • Hierarchical Structure: Tasks can have unlimited nested subtasks
  • Rich Metadata: Supports all ToDoList fields and properties
  • Position Tracking: Maintains task order and hierarchy
  • Compatibility: Files remain fully compatible with ToDoList application

Example Task Structure

<TASK ID="1" TITLE="Project Alpha" PRIORITY="1" DUEDATE="44927">
    <CATEGORY>Work</CATEGORY>
    <ALLOCATEDTO>John Doe</ALLOCATEDTO>
    <TASK ID="2" TITLE="Research Phase" PERCENTDONE="100">
        <TASK ID="3" TITLE="Market Analysis" PERCENTDONE="100"/>
        <TASK ID="4" TITLE="Competitor Review" PERCENTDONE="75"/>
    </TASK>
</TASK>

Testing

Run the test suite:

python test_server.py
python test_update_functionality.py

Integration with ToDoList Application

This MCP server is designed to work alongside the ToDoList desktop application:

  1. Live Editing: Modify files that ToDoList has open
  2. Real-time Updates: Changes appear immediately in ToDoList
  3. Backup Safety: ToDoList maintains automatic backups
  4. Format Preservation: All ToDoList-specific formatting is preserved

Advanced Features

Hierarchical Task Management

  • Create nested task structures
  • Move tasks between hierarchy levels
  • Maintain parent-child relationships

Position Management

# Add task at specific position
add_task({"title": "New Task", "position": "1.2.3"})

# Move task to new location
move_task({"task_id": "123", "new_position": "2.1"})

Flexible Searching

# Complex search example
search_tasks({
    "search_term": "urgent",
    "category": "Work",
    "priority": "High", 
    "completed": false,
    "assigned_to": "John"
})

Error Handling

The server provides comprehensive error handling:

  • File validation and format checking
  • Task ID validation
  • Date format verification
  • Hierarchy consistency checks

Performance Considerations

  • File Size: Optimized for large ToDoList files (1000+ tasks)
  • Memory Usage: Efficient XML parsing and manipulation
  • Concurrent Access: Safe for use with ToDoList application running

Troubleshooting

Common Issues

  1. File Access: Ensure the .tdl file exists and is accessible
  2. XML Format: Verify the file is a valid ToDoList XML format
  3. Permissions: Check file write permissions
  4. ToDoList Lock: Close ToDoList if experiencing file lock issues

Debug Mode

Enable detailed logging:

python -u tdl_mcp_server.py

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure ToDoList compatibility
  5. Submit a pull request

License

Licensed under the Apache License 2.0. See LICENSE file for details.

Support

For issues and questions, please open an issue on GitHub.

Changelog

v0.4.0

  • Added comprehensive task management
  • Improved hierarchical support
  • Enhanced search capabilities
  • Better error handling

v0.3.0

  • Added update functionality
  • Position management
  • File status checking

v0.2.0

  • Initial CRUD operations
  • Basic search functionality

v0.1.0

  • Initial release
  • Read-only operations

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选