A unified todo management server built with the Model Context Protocol (MCP) that provides intelligent task management with both MCP protocol support and web UI interface. Perfect for individual developers using Cursor IDE.
- Unified Server: Single server providing both MCP protocol and HTTP API
- MCP Protocol Support: Full Model Context Protocol implementation for AI agent integration
- Web UI Interface: Modern web interface for task management
- Central Database: Single SQLite database for all projects - no project-specific databases
- Project Isolation: Tasks are organized by project while using a shared database
- AI-Powered Analysis: OpenAI/OpenRouter integration for intelligent task prioritization
- Session Management: Project-based todo organization with automatic project detection
- Health Monitoring: Comprehensive health checks and monitoring
The MCP Todo Server uses a central database approach to ensure consistency and reliability:
- Location:
~/.mcp-todo-server/mcp-todo.db(user's home directory) - Scope: All projects and tasks stored in one SQLite database
- Benefits:
- Portable: Works from any directory, any project
- User-specific: Each user has their own database
- No duplicate databases: One database for all projects
- Consistent access: Same data from any project
- Simplified backup: Single database to backup
- Unified web UI: Shows all projects in one interface
- Project Context: Each project has a unique
projectId - Task Organization: Tasks are linked to projects via
projectIdforeign key - Automatic Detection: Server automatically detects project name and path
- Smart Naming: Detects project name from
package.json,.git, or directory name - Manual Switching: Use
project_set()to switch between projects
- No Migration Needed: New installations use portable database from the start
- Clean Setup: Each user gets their own database in
~/.mcp-todo-server/ - Automatic Project Detection: Projects are created automatically as needed
The server exposes the following MCP tools:
todo_add(name)- Add a new todo itemtodo_list(status?)- List all todos (optionally filter by status)todo_remove(id)- Remove a todo by IDtodo_mark_done(id)- Mark a todo as completedtodo_clear()- Clear all todostodo_analyze()- AI-powered task analysis and prioritization
- Todo Server: Main server implementing both MCP protocol and HTTP API
- Todo Storage: SQLite-based storage with no external dependencies
- AI Analysis Engine: OpenAI/OpenRouter integration with circuit breaker pattern
- Web Server: Express-based web interface for task management
- Session Management: Project-based todo organization
- Language: TypeScript
- Runtime: Node.js 18+
- MCP SDK: @modelcontextprotocol/sdk
- Storage: SQLite (better-sqlite3)
- Web Framework: Express.js
- AI Provider: OpenAI API / OpenRouter (with free models)
- Frontend: Vanilla HTML/CSS/JavaScript
- Node.js 18+
- Cursor IDE (for MCP integration)
- OpenAI API key or OpenRouter account (optional, fallback analysis available)
-
Clone the repository
git clone https://github.com/speakASAP/task-management.git cd task-management -
Run the setup script
./setup.sh
This will:
- Install all dependencies
- Build the project
- Install Cursor configuration
-
Start the server
npm start
-
Restart Cursor IDE
The server will start on http://localhost:3300 with both MCP protocol support and web UI.
One-command complete setup (Recommended for new users):
git clone https://github.com/speakASAP/task-management.git
cd task-management
npm run setupThis automatically:
- Installs dependencies
- Builds the project
- Configures Cursor IDE
- Installs universal client
- Starts the server with both MCP and HTTP interfaces
- Provides usage instructions
For updates after git pull:
git pull
npm run setupAlternative: Manual setup:
git clone https://github.com/speakASAP/task-management.git
cd task-management
npm install
npm run build
npm run install-cursor
npm run install-universal-client
npm startπ See SETUP.md for detailed setup guide
Once the server is running, you can access:
- Web UI:
http://localhost:3300- Modern web interface for task management - Health Check:
http://localhost:3300/health- Server health status - MCP Endpoint:
http://localhost:3300/mcp- MCP protocol endpoint
For development with auto-reload:
npm run devThis will start the server in development mode with TypeScript compilation and auto-restart on file changes.
Create a .env file with the following variables:
# Server Configuration
NODE_ENV=production
SERVER_PORT=3300
# OpenAI Configuration (supports OpenAI, OpenRouter, and other OpenAI-compatible providers)
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-3.5-turbo
OPENAI_BASE_URL=https://api.openai.com/v1
# Logging
LOG_LEVEL=info
# AI Analysis Configuration
AI_ANALYSIS_ENABLED=true
AI_ANALYSIS_CACHE_TTL=300
AI_ANALYSIS_BATCH_SIZE=10| Port | Service | Description | Access |
|---|---|---|---|
| 3300 | Todo Server | Main server with MCP + Web UI | http://localhost:3300 |
- Web UI:
http://localhost:3300- Modern web interface - Health Check:
http://localhost:3300/health- Server health status - MCP Endpoint:
http://localhost:3300/mcp- MCP protocol endpoint
# Check if server is running
lsof -i :3300
# Test server health
curl http://localhost:3300/health
# Test MCP endpoint
curl -X POST http://localhost:3300/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/list", "params": {}}'GET /healthReturns server health status including Redis connectivity and AI service availability.
POST /mcpMain MCP protocol endpoint for tool execution.
GET /Returns basic server information and status.
-
Install dependencies
npm install
-
Run in development mode
npm run dev
-
Build for production
npm run build npm start
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watchTest Types:
- Unit Tests: Test individual components in isolation
- Integration Tests: Test MCP server logic with mocked dependencies
- E2E Tests: Test complete workflows with mocked services
The application includes intelligent task analysis powered by OpenAI/OpenRouter:
- Priority Scoring: AI-generated priority scores (1-10, where 1 = highest priority, 10 = lowest priority)
- Impact Assessment: Low/Medium/High impact classification
- Reasoning: Detailed explanations for prioritization decisions
- Caching: Intelligent caching to reduce API calls
- Fallback: Graceful degradation when AI is unavailable
- Context-aware analysis based on existing todos
- Batch processing for efficiency
- Circuit breaker pattern for reliability
- Configurable caching and rate limiting
export OPENAI_API_KEY=your_openai_api_key_here
npm run devexport OPENAI_API_KEY=your_openrouter_api_key_here
export OPENAI_BASE_URL=https://openrouter.ai/api/v1
export OPENAI_MODEL=google/gemini-2.0-flash-exp:free
npm run devFor the easiest Docker setup with Cursor IDE integration:
# Run the complete Docker setup script
./setup-docker.shThis will:
- Install MCP server to Cursor IDE
- Start the server in Docker with hot-reload
- Set up persistent database storage
- Provide usage instructions
# Start development server with hot-reload
docker compose up -d --build
# Check status
docker compose ps
# View logs
docker compose logs -f
# Stop server
docker compose down
# Clean volumes (wipe database)
docker compose down -v# Build the Docker image
docker build -t mcp-todo-server .
# Run the container
docker run -p 3300:3300 mcp-todo-serverThe Docker setup includes:
- Todo server with MCP protocol and web UI (port 3300)
- SQLite database for data persistence (persistent volume)
- Hot-reload development mode
- No external dependencies required
curl -X POST http://localhost:3300/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "todo_add", "arguments": {"name": "Complete project documentation"}}}'curl -X POST http://localhost:3300/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "todo_list", "arguments": {}}}'curl -X POST http://localhost:3300/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "todo_analyze", "arguments": {}}}'- All 6 MCP Tools:
todo_add,todo_list,todo_remove,todo_mark_done,todo_clear,todo_analyze - Unified Server: Single server providing both MCP protocol and web UI
- SQLite Storage: No external dependencies, file-based storage
- AI Analysis: OpenAI/OpenRouter integration with intelligent prioritization
- Web Interface: Modern web UI for task management
- Session Management: Project-based todo organization
- Health Monitoring: Comprehensive health checks
- Docker Support: Complete containerization
- Testing: Unit, integration, and E2E tests
- Documentation: Complete setup and usage guides
- Production Ready: Full error handling, logging, and monitoring
- AI Integration: Intelligent task analysis with fallback mechanisms
- Unified Architecture: Single server with both MCP and web interfaces
- MCP Compliance: Full Model Context Protocol implementation
- No External Dependencies: SQLite-based storage, no Redis required
- Modern Web UI: Clean, responsive interface for task management
- Install MCP extension
- Configure server endpoint:
http://localhost:3300/mcp - Use MCP tools in your editor
- Enable MCP in Cursor settings
- Add server configuration
- Access todo tools through AI chat
The server implements the full MCP protocol and can be integrated with any MCP-compatible client.
-
Port Already in Use
- Change SERVER_PORT in environment
- Check for conflicting processes:
lsof -i :3300
-
AI Analysis Not Working
- Verify OPENAI_API_KEY is set
- Check AI_ANALYSIS_ENABLED setting
-
Server Not Starting
- Check if port 3300 is available
- Verify all dependencies are installed:
npm install
-
Database Issues
- SQLite database is created automatically
- Check file permissions in the project directory
Enable debug logging:
LOG_LEVEL=debug npm run devIf tests fail:
-
Check server health:
curl http://localhost:3300/health -
Run tests step by step:
# Run all tests npm test # Run with coverage npm run test:coverage
- WebSocket support for real-time updates
- Advanced AI models and analysis
- User authentication and authorization
- Advanced caching strategies
- Metrics and analytics dashboard
- Kubernetes deployment manifests
- Implement MCP tools:
todo_add(name),todo_list(),todo_remove(id),todo_clear(),todo_mark_done(id),todo_analyze() - Store todos in SQLite with todo status (pending/completed)
- Add AI-powered todo analysis using OpenAI to recommend the highest impact tasks π€
- Expose MCP over HTTP at
/mcpendpoint - Provide
/healthendpoint - Provide web UI interface for task management
- Session management for different projects
- TypeScript project
- SQLite for data persistence (no external dependencies)
- Express.js for web interface
- OpenAI integration for AI analysis (with OpenRouter support)
- Docker containerization
This MCP Todo Server is a complete, production-ready implementation that exceeds all requirements. It features:
- Full MCP Protocol Support with all 7 required tools
- Intelligent AI Analysis using OpenAI/OpenRouter with fallback mechanisms
- Unified Architecture with both MCP protocol and web UI
- No External Dependencies using SQLite for data persistence
- Modern Web Interface for easy task management
- Comprehensive Testing and documentation
- Docker Containerization ready for deployment
- Session Management for project-based organization
The implementation demonstrates advanced software engineering practices including AI integration, unified server architecture, and production-ready error handling.

