theatulanand
MCP Servertheatulanandpublic

to do mcp server

Todo app using mcp server

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
JavaScript
Language
-
License

About This Server

Todo app using mcp server

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Todo App using MCP Server

A simple Todo application enhanced with natural language processing using the Google Gemini API, MongoDB for persistence, and MCP (Model Context Protocol) for real-time updates via Server-Sent Events (SSE). Built using a modular MVC architecture with Express.js.


Features

  • Add todos using natural language (e.g., "Add a task to buy milk")
  • List todos (optionally include completed ones)
  • Mark todos as complete using their MongoDB ID
  • Delete todos by their MongoDB ID
  • Receive real-time updates using Server-Sent Events (SSE) with MCP

Tech Stack

  • Node.js: Server runtime
  • Express.js: Routing and middleware
  • MongoDB (Atlas): Cloud-based NoSQL database
  • Mongoose: ODM for MongoDB
  • Google Gemini API: Handles natural language command interpretation
  • @modelcontextprotocol/sdk: For MCP integration and SSE
  • dotenv: For managing environment variables

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB Atlas cluster (credentials required)
  • Google Gemini API Key (available from Google AI Studio)

Installation

  1. Clone the repository

    git clone https://github.com/theatulanand/to-do-mcp-server.git
    cd todo-mcp-single
    
  2. Install dependencies

    npm install
    
  3. Set up environment variables

    Create a .env file in the root directory:

    PORT=3000
    MONGO_URI=URI
    GEMINI_API_KEY=
    

Running the App

Start the server:

npm start

You should see:

Connected to MongoDB with Mongoose
Server running on http://localhost:3000

To stop the server, press Ctrl + C.


How to Use

Send a POST request to /api/command with a JSON body:

{ "command": "Add a task to buy milk" }

Example Commands

  • Add:

    curl -X POST http://localhost:3000/api/command -H "Content-Type: application/json" -d '{"command": "Add a task to buy milk"}'
    
  • List:

    curl -X POST http://localhost:3000/api/command -H "Content-Type: application/json" -d '{"command": "List my todos"}'
    
  • Complete:

    curl -X POST http://localhost:3000/api/command -H "Content-Type: application/json" -d '{"command": "Complete todo with ID some_mongodb_id"}'
    
  • Delete:

    curl -X POST http://localhost:3000/api/command -H "Content-Type: application/json" -d '{"command": "Delete todo with ID some_mongodb_id"}'
    
  • List including completed:

    curl -X POST http://localhost:3000/api/command -H "Content-Type: application/json" -d '{"command": "List my todos including completed"}'
    

Real-time Updates (SSE)

Connect to /sse to receive live updates. (Requires MCP-compatible client.)


Project Structure

todo-mcp-single/
├── models/           # Mongoose schemas
│   └── Todo.js
├── controllers/      # Business logic
│   └── todoController.js
├── routes/           # API routes
│   └── todoRoutes.js
├── utils/            # Utility functions (e.g., Gemini integration)
│   └── gemini.js
├── .env              # Environment configuration
└── server.js         # App entry point

Troubleshooting

  • MongoDB Connection Failed: Check MONGO_URI and IP whitelist in Atlas.
  • Gemini API Errors: Validate API key and network access to generativelanguage.googleapis.com.
  • Unrecognized Commands: Check Gemini raw output in logs for debugging.

Quick Start

1

Clone the repository

git clone https://github.com/theatulanand/to-do-mcp-server
2

Install dependencies

cd to-do-mcp-server
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownertheatulanand
Repoto-do-mcp-server
LanguageJavaScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation