MCP Todo Server
A distributed task management server built on the Model Context Protocol (MCP). Uses TypeScript, Redis for shared state, and OpenAI for smart task analysis.
Features
MCP protocol implementation with 6 custom tools
Multi-node setup with load balancing via Caddy
Redis for distributed state (works across nodes)
AI task prioritization using OpenAI
Docker Compose for easy deployment
Health monitoring and graceful shutdown
Available Tools
todo_add- Add new tasks with priority levelstodo_list- List todos with status filteringtodo_remove- Remove specific taskstodo_clear- Clear all taskstodo_mark_done- Mark tasks as completedtodo_analyze- Get AI-powered task prioritization
Architecture
Getting Started
Prerequisites
Docker and Docker Compose
Node.js 18+ (for local dev)
OpenAI API key
Installation
Clone the repository
git clone https://github.com/yourusername/mcp-todo-server.git cd mcp-todo-serverSet up environment variables
cp .env.example .env # Edit .env and add your OPENAI_API_KEYStart with Docker Compose
docker compose up --buildThis starts:
Redis on port 6379
MCP Server Node 1 on port 3001
MCP Server Node 2 on port 3002
Caddy load balancer on port 3000
Verify the deployment
curl http://localhost:3000/health
API Endpoints
Health Check
MCP Endpoint
Uses Server-Sent Events (SSE) for communication.
Development
Running Locally (without Docker)
Build for Production
Testing
Run the test suite:
Or try the example client:
Using with MCP Clients
VS Code / Cursor
Add to your MCP config:
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Project Structure
Security Notes
For production, add:
Authentication
HTTPS
Redis password
Input validation
Rate limiting
Resources
License
MIT