re-cinq/ToDoMCPServer
If you are the rightful owner of ToDoMCPServer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP To-Do List Demo is a project that showcases the use of a Model Context Protocol (MCP) server to manage a to-do list application using TypeScript, Node.js, and MongoDB.
__ __ _____ _____ _______ _____ _ _ _
| \/ |/ ____| __ \ |__ __| | __ \ | | (_) | |
| \ / | | | |__) | | | ___ ______| | | | ___ | | _ ___| |_
| |\/| | | | ___/ | |/ _ \______| | | |/ _ \ | | | / __| __|
| | | | |____| | | | (_) | | |__| | (_) | | |____| \__ \ |_
|_| |_|\_____|_| |_|\___/ |_____/ \___/ |______|_|___/\__|
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.
Features
- 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.
Setup
Prerequisites
- Node.js (v16 or later)
- npm (v7 or later)
- MongoDB
Installation
-
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
Usage
Start the MCP Server
To start the MCP server, run:
npm start
Available Tools
- 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.
Example
-
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
Testing
Run the tests using Jest:
npm test
License
This project is licensed under the MIT License. See the file for details.
Enjoy using the MCP To-Do List Demo! If you have any questions or feedback, feel free to reach out.