ToDoMCPServer

re-cinq/ToDoMCPServer

3.2

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.

Tools
5
Resources
0
Prompts
0
  __  __  _____ _____    _______          _____          _      _     _
 |  \/  |/ ____|  __ \  |__   __|        |  __ \        | |    (_)   | |
 | \  / | |    | |__) |    | | ___ ______| |  | | ___   | |     _ ___| |_
 | |\/| | |    |  ___/     | |/ _ \______| |  | |/ _ \  | |    | / __| __|
 | |  | | |____| |         | | (_) |     | |__| | (_) | | |____| \__ \ |_
 |_|  |_|\_____|_|         |_|\___/      |_____/ \___/  |______|_|___/\__|

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

  1. Clone the repository:

    git clone <repository-url>
    cd todo
    
  2. Install dependencies:

    npm install
    
  3. Set up environment variables:

    • Create a .env file in the root directory.
    • Add the following variables:
      MONGO_URL=mongodb://localhost:27017/todo
      
  4. 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

  1. Add a to-do item:

    npm run tool add-todo -- --action="Buy groceries" --author="John" --due="2025-06-01T12:00:00Z"
    
  2. List all to-do items:

    npm run tool list-todo
    
  3. Mark an item as completed:

    npm run tool update-todo -- --_id="<item-id>" --completed=true
    
  4. 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.