TodoList
A MCP server that allows the LLM to create / manage a todo list
Ask AI about TodoList
Powered by Claude Β· Grounded in docs
I know everything about TodoList. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
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
| Priority | Description | Use Case |
|---|---|---|
LOWEST | Minimal priority | Optional tasks, nice-to-haves |
LOW | Low priority | Less urgent but important |
NORMAL | Default priority | Standard tasks |
HIGH | High priority | Important tasks, complete soon |
HIGHEST | Maximum priority | Urgent, critical tasks |
π Task States
| State | Description | When to Use |
|---|---|---|
NOT_COMPLETED | Initial state | New tasks, not started |
WORKING_ON | In progress | Currently being worked on |
COMPLETED | Finished | Task completed successfully |
π§ API Reference
Task Operations
addToTodoList(String task)βintaddToTodoListBulk(String... tasks)βint[]removeFromTodoList(int taskId)βvoidremoveFromTodoListBulk(int... taskIds)βvoid
Priority Operations
addToPriorityList(int taskId, TaskPriority priority)βvoidaddToPriorityListBulk(int[] taskIds, TaskPriority[] priorities)βvoidremoveFromPriorityList(int taskId)βvoidremoveFromPriorityListBulk(int... taskIds)βvoid
State Operations
addToStateList(int taskId, TaskState state)βvoidaddToStateListBulk(int[] taskIds, TaskState[] states)βvoidremoveFromStateList(int taskId)βvoidremoveFromStateListBulk(int... taskIds)βvoid
System Operations
clearTodoList()βvoidclearPriorityList()βvoidclearStateList()βvoidreset()β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:
IllegalArgumentExceptionfor 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE 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.
