__ __ _____ _____ _______ _____ _ _ _
| \/ |/ ____| __ \ |__ __| | __ \ | | (_) | |
| \ / | | | |__) | | | ___ ______| | | | ___ | | _ ___| |_
| |\/| | | | ___/ | |/ _ \______| | | |/ _ \ | | | / __| __|
| | | | |____| | | | (_) | | |__| | (_) | | |____| \__ \ |_
|_| |_|\_____|_| |_|\___/ |_____/ \___/ |______|_|___/\__|
Welcome to the MCP To-Do List Demo, a project created as part of the re:cinq initiative. This project demonstrates how to build and manage a to-do list using a Model Context Protocol (MCP) server, TypeScript, Node.js, and MongoDB.
- Create new to-do items.
- Update existing to-do items.
- Delete specific items.
- List existing to-do items.
- Use Luxon for date handling.
- In-memory MongoDB server for isolated testing.
- Fully tested with Jest.
- Node.js (v16 or later)
- npm (v7 or later)
- MongoDB
-
Clone the repository:
git clone <repository-url> cd todo
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env
file in the root directory. - Add the following variables:
MONGO_URL=mongodb://localhost:27017/todo
- Create a
-
Build the project:
npm run build
To start the MCP server, run:
npm start
- add-todo: Add an item to the to-do list.
- list-todo: List all items on the to-do list.
- update-todo: Update an existing to-do item.
- delete-todo: Delete a specific to-do item.
- delete-all-todos: Clear the entire to-do list.
-
Add a to-do item:
npm run tool add-todo -- --action="Buy groceries" --author="John" --due="2025-06-01T12:00:00Z"
-
List all to-do items:
npm run tool list-todo
-
Mark an item as completed:
npm run tool update-todo -- --_id="<item-id>" --completed=true
-
Delete all items:
npm run tool delete-all-todos
Run the tests using Jest:
npm test
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy using the MCP To-Do List Demo! If you have any questions or feedback, feel free to reach out.