TodoList

Touchie771/TodoList

3.2

If you are the rightful owner of TodoList and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The TodoList MCP Server is a deprecated task management system built with Spring Boot and Spring AI MCP, designed for AI assistants to manage tasks efficiently.

TodoList MCP Server

A comprehensive todo list management system built with Spring Boot and Spring AI MCP (Model Context Protocol) server. This service enables AI assistants to create, manage, and organize tasks with priorities and states through both single and bulk operations.

⚠️ Deprecated: This MCP server is deprecated and will no longer receive updates, please use our new MCP server, AgentMode

🚀 Features

  • Task Management: Create, read, and delete tasks with unique IDs
  • Priority System: 5-level priority system (LOWEST to HIGHEST)
  • State Tracking: 3-state workflow (NOT_COMPLETED → WORKING_ON → COMPLETED)
  • Bulk Operations: Efficient batch operations for managing multiple tasks
  • MCP Integration: Seamless integration with AI assistants via Spring AI MCP
  • Comprehensive API: Full CRUD operations for all entities

📋 Prerequisites

  • Java 21 or higher
  • Gradle 8.0 or higher
  • Spring Boot 3.5.7
  • Spring AI 1.0.3

🛠️ Installation

Clone the Repository

git clone https://github.com/Touchie771/TodoList.git
cd TodoList

Build the Project

./gradlew build

Run the Application

./gradlew bootRun

The application will start on the default Spring Boot port (8080) and register as an MCP server.

📖 Usage

Basic Task Operations

// Add a single task
int taskId = todoList.addToTodoList("Complete project documentation");

// Add multiple tasks at once
int[] taskIds = todoList.addToTodoListBulk(
    "Write unit tests",
    "Review code changes",
    "Update README"
);

// Get all tasks
Map<Integer, String> allTasks = todoList.getTodoMap();

Priority Management

// Set priority for a single task
todoList.addToPriorityList(taskId, TaskPriority.HIGH);

// Set priorities for multiple tasks
int[] taskIds = {1, 2, 3};
TaskPriority[] priorities = {TaskPriority.HIGHEST, TaskPriority.HIGH, TaskPriority.NORMAL};
todoList.addToPriorityListBulk(taskIds, priorities);

// Get all priorities
Map<Integer, TaskPriority> allPriorities = todoList.getPriorityMap();

State Management

// Mark task as being worked on
todoList.addToStateList(taskId, TaskState.WORKING_ON);

// Complete a task
todoList.addToStateList(taskId, TaskState.COMPLETED);

// Set states for multiple tasks
int[] taskIds = {1, 2, 3};
TaskState[] states = {TaskState.COMPLETED, TaskState.WORKING_ON, TaskState.NOT_COMPLETED};
todoList.addToStateListBulk(taskIds, states);

// Get all states
Map<Integer, TaskState> allStates = todoList.getStateMap();

Bulk Operations

// Remove multiple tasks
todoList.removeFromTodoListBulk(1, 2, 3);

// Remove multiple priorities
todoList.removeFromPriorityListBulk(1, 2, 3);

// Remove multiple states
todoList.removeFromStateListBulk(1, 2, 3);

System Management

// Clear all tasks (keeps priorities and states)
todoList.clearTodoList();

// Clear all priorities
todoList.clearPriorityList();

// Clear all states
todoList.clearStateList();

// Reset everything
todoList.reset();

🎯 Priority Levels

PriorityDescriptionUse Case
LOWESTMinimal priorityOptional tasks, nice-to-haves
LOWLow priorityLess urgent but important
NORMALDefault priorityStandard tasks
HIGHHigh priorityImportant tasks, complete soon
HIGHESTMaximum priorityUrgent, critical tasks

🔄 Task States

StateDescriptionWhen to Use
NOT_COMPLETEDInitial stateNew tasks, not started
WORKING_ONIn progressCurrently being worked on
COMPLETEDFinishedTask completed successfully

🔧 API Reference

Task Operations

  • addToTodoList(String task)int
  • addToTodoListBulk(String... tasks)int[]
  • removeFromTodoList(int taskId)void
  • removeFromTodoListBulk(int... taskIds)void

Priority Operations

  • addToPriorityList(int taskId, TaskPriority priority)void
  • addToPriorityListBulk(int[] taskIds, TaskPriority[] priorities)void
  • removeFromPriorityList(int taskId)void
  • removeFromPriorityListBulk(int... taskIds)void

State Operations

  • addToStateList(int taskId, TaskState state)void
  • addToStateListBulk(int[] taskIds, TaskState[] states)void
  • removeFromStateList(int taskId)void
  • removeFromStateListBulk(int... taskIds)void

System Operations

  • clearTodoList()void
  • clearPriorityList()void
  • clearStateList()void
  • reset()void

Query Operations

  • getTodoMap()Map<Integer, String>
  • getPriorityMap()Map<Integer, TaskPriority>
  • getStateMap()Map<Integer, TaskState>

🧪 Testing

Run the test suite:

./gradlew test

Run with coverage:

./gradlew test jacocoTestReport

📁 Project Structure

src/
├── main/
│   └── java/
│       └── me/touchie771/todoList/
│           ├── TodoList.java          # Main service class
│           ├── TaskPriority.java      # Priority enum
│           ├── TaskState.java         # State enum
│           └── TodoListApplication.java # Spring Boot main class
└── test/
    └── java/
        └── me/touchie771/todoList/
            └── TodoListTest.java      # Unit tests

🔒 Error Handling

The service includes comprehensive error handling:

  • Array Length Mismatch: IllegalArgumentException for bulk operations with mismatched array lengths
  • Invalid Task IDs: Silent handling for non-existent task IDs (remove operations)
  • Null Values: Standard Java null handling for task descriptions

🚀 Performance Considerations

  • Memory Usage: O(n) where n is the number of tasks
  • Time Complexity: O(1) for single operations, O(k) for bulk operations (k = batch size)
  • Thread Safety: HashMap-based implementation (consider ConcurrentHashMap for production use)

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the file for details.

👤 Author

Touchie771 - Initial work - Touchie771

🙏 Acknowledgments

  • Spring Boot team for the excellent framework
  • Spring AI team for MCP server support
  • The Java community for inspiration and best practices

Note: This project is designed to work with AI assistants through the MCP protocol. All operations are exposed as tools that can be called by compatible AI systems.