Vibe Nextjs Supabase Todo MCP
MCP server: Vibe Nextjs Supabase Todo MCP
Installation
npx vibe-nextjs-supabase-todo-mcpAsk AI about Vibe Nextjs Supabase Todo MCP
Powered by Claude Β· Grounded in docs
I know everything about Vibe Nextjs Supabase Todo MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
π Meow OS - Mobile Todo App with MCP Integration
A modern mobile-first todo application built with Next.js 14, Supabase, and Model Context Protocol (MCP) integration for AI agents. Features a beautiful Duolingo-inspired UI design with comprehensive todo management, group organization, and complete AI agent integration capabilities.
π± Screenshots
β¨ Features
Mobile App Experience
- π¨ Duolingo-Inspired UI: Beautiful, gamified interface with achievement levels, streak counters, and progress bars
- π± Mobile-First Design: Optimized for mobile devices with touch-friendly interactions
- π Color-Coded Organization: Customizable colors for todos and groups with visual color picker
- π Smart Todo Grouping: Organize tasks into categories like Personal, Work, Health, Shopping, Fitness, and Learning
- π Splash Screen: Engaging onboarding experience with smooth animations
- π― Bottom Navigation: Easy access to Landing, Add, Groups, and Profile sections
- π Dashboard Analytics: Quick stats, upcoming deadlines, and progress tracking
- π Smart Search & Filtering: Find todos by text, status, group, or deadline
- π Internationalization: Support for English and Chinese (Hong Kong) with easy language switching
Core Features
- π Enhanced Authentication: Complete auth flow with splash, login, register, and password reset pages
- π Advanced Todo Management: Full CRUD operations with priorities, deadlines, colors, and group assignments
- π Three-Tier Priority System: Visual priority indicators (Low, Medium, High) with color coding
- π Smart Deadline Management: Calendar view with today, tomorrow, and this week categorization
- βοΈ Comprehensive Settings: Profile management, API key generation, theme toggle, and data export/import
- π Advanced Security: Row-Level Security with user data isolation and secure API key management
- π¨ Compact Todo Items: Inline edit/delete buttons for better UX and space efficiency
- π± Modal-based Group Management: Separate create/edit group modals for improved user experience
- π Enhanced Dark Theme: Full dark mode support across all components with consistent theming
- π Duolingo-style Buttons: Consistent 3D button styling with animations throughout the app
- π― Better UI Consistency: Matched input/select styling for cohesive form elements
AI Agent Integration (MCP)
- π€ MCP Server: Complete Model Context Protocol implementation
- π‘ API Keys: Secure API key generation and management system
- π§ Four MCP Tools: Create, update, complete, and delete todos via AI agents
- π Dynamic Resources: Todos exposed as MCP resources for AI consumption
π οΈ Tech Stack
Frontend
- Next.js 14 (App Router) - React framework with server-side rendering
- React 18 - UI library with server components
- TypeScript - Type safety and developer experience
- Tailwind CSS - Utility-first CSS framework with custom Duolingo color palette
- shadcn/ui - High-quality component library
- Framer Motion - Smooth animations and transitions
- next-intl - Internationalization with support for multiple languages
- Lucide React - Beautiful, customizable icons
- date-fns - Modern date utility library
Backend
- Next.js API Routes - Server-side API endpoints
- Supabase - PostgreSQL database with real-time capabilities
- Supabase Auth - Authentication with SSR support
- Row-Level Security - Database-level access control
AI Integration
- Model Context Protocol (MCP) - AI agent communication standard
- @modelcontextprotocol/sdk - Official MCP SDK for Node.js
- Direct MCP Server - Standalone MCP server for external AI agents
- API Key Authentication - Secure token-based authentication for AI agents
Development & Deployment
- Vercel - Hosting and deployment platform
- ESLint - Code linting and formatting
- PostCSS - CSS processing and optimization
π Quick Start
1. Prerequisites
- Node.js 18+ and npm
- Supabase account and project (Create one here)
- Git for version control
2. Installation & Setup
-
Clone the repository:
git clone https://github.com/your-username/meow-os-todo-webapp.git cd meow-os-todo-webapp npm install -
Environment configuration:
cp .env.example .env.localConfigure your Supabase credentials in
.env.local:NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-keyπ‘ Tip: Find these values in your Supabase dashboard under Settings β API
-
Database setup: Execute the SQL script in your Supabase SQL Editor to create the required tables and security policies:
# Run the database setup script psql -f supabase-setup.sqlOr copy and paste the contents of
supabase-setup.sqlinto your Supabase SQL Editor.This script creates:
- Enhanced
todostable with color support and UUID columns - Updated
todo_groupstable with color and icon fields, UUID columns, and inserted_at column api_keystable for MCP authentication- Proper RLS policies and indexes
- UUID migration with backward compatibility views
- Enhanced
-
Start the development server:
npm run devThe application will be available at:
- Web App:
http://localhost:3000- Main todo interface - MCP Server:
http://localhost:3000/api/mcp- AI agent endpoint
- Web App:
3. First Steps
- Register an account at
http://localhost:3000/login - Create your first todo in the web interface
- Generate an API key in Settings for AI agent access
- Test the MCP integration using the provided tools
π€ MCP Integration Guide
Understanding MCP
Model Context Protocol (MCP) enables AI agents to interact with your todo app programmatically. The app exposes:
- π Resources: Your todos as readable resources
- π οΈ Tools: Four operations for todo management
- π Authentication: Secure API key-based access
MCP Server Architecture
The app provides two MCP integration methods:
- Direct API Endpoint:
http://localhost:3000/api/mcp - Standalone MCP Server: Using
mcp-direct.jsfor external tools
API Key Management
- Navigate to Settings:
http://localhost:3000/settings - Generate API Key: Click "Generate New API Key"
- Copy the Key: Store it securely (it's only shown once)
- Use in AI Agents: Configure your AI agent with the key
Testing MCP Functionality
Use these curl commands to test the MCP API (replace YOUR_API_KEY with your actual key):
# Test authentication and list todos
curl -X POST "http://localhost:3000/api/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "resources/list",
"params": {},
"id": 1
}'
# Create a new todo
curl -X POST "http://localhost:3000/api/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "create-todo",
"arguments": {
"text": "Buy groceries",
"priority": 1
}
},
"id": 2
}'
# Update a todo
curl -X POST "http://localhost:3000/api/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "update-todo",
"arguments": {
"id": 1,
"text": "Buy organic groceries"
}
},
"id": 3
}'
# Mark todo as completed
curl -X POST "http://localhost:3000/api/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "complete-todo",
"arguments": {
"id": 1
}
},
"id": 4
}'
External MCP Server (mcp-direct.js)
For AI agents that need a standalone MCP server:
-
Configure the MCP server:
{ "servers": { "todo-webapp-direct": { "command": "node", "args": ["mcp-direct.js"], "env": { "MCP_API_URL": "http://localhost:3000/api/mcp", "MCP_API_KEY": "your-api-key-here" } } } } -
Run the server:
node mcp-direct.js
MCP Tools Reference
1. create-todo
Creates a new todo item with optional priority and deadline.
Parameters:
text(required): Todo text content (1-500 characters)priority(optional): Priority level (0=Low, 1=Medium, 2=High)deadline(optional): Deadline in YYYY-MM-DD format
2. update-todo
Updates an existing todo item.
Parameters:
id(required): Todo ID to updatetext(optional): New todo textpriority(optional): New priority leveldeadline(optional): New deadlinecompleted(optional): Mark as completed/incomplete
3. complete-todo
Marks a todo as completed.
Parameters:
id(required): Todo ID to complete
4. delete-todo
Permanently deletes a todo.
Parameters:
id(required): Todo ID to delete
MCP Resources
Todos are exposed as MCP resources with the URI pattern: todo://{id}
Each resource includes:
- Title: Todo text
- Description: Status, priority, and deadline information
- Content: Formatted markdown with full todo details
π Deployment
Vercel Deployment (Recommended)
-
Prepare for deployment:
npm run build npm run type-check -
Deploy to Vercel:
vercel --prod -
Configure environment variables in Vercel Dashboard:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY
-
Your MCP endpoint will be available at:
https://your-app.vercel.app/api/mcp
Manual Deployment
For custom server deployment:
npm run build
npm start
The app will be available at http://localhost:3000 with MCP at /api/mcp.
Environment Variables for Production
Ensure these environment variables are set in your production environment:
NEXT_PUBLIC_SUPABASE_URL=your-production-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-production-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-production-service-role-key
π οΈ Development
Available Scripts
| Script | Description |
|---|---|
npm run dev | Start development server with hot reloading |
npm run build | Build optimized production bundle |
npm run start | Start production server |
npm run lint | Run ESLint checks and auto-fix issues |
npm run type-check | Run TypeScript type checking |
Project Structure
meow-os-todo-webapp/
βββ app/ # Next.js 14 App Router
β βββ api/ # API routes
β β βββ mcp/ # MCP server endpoint
β β β βββ route.ts # Main MCP implementation
β β βββ todos/ # Todo CRUD operations
β β β βββ route.ts # List & create todos
β β β βββ [id]/route.ts # Update & delete todos
β β βββ groups/ # Group management API
β β β βββ route.ts # List & create groups
β β β βββ [id]/route.ts # Update & delete groups
β β βββ user/ # User profile API
β β β βββ route.ts # User data management
β β βββ settings/ # Settings API
β β βββ api-keys/ # API key management
β β βββ route.ts # List & create API keys
β β βββ [id]/route.ts # Delete API keys
β βββ splash/ # Onboarding pages
β β βββ page.tsx # Splash screen
β βββ welcome/ # Welcome page
β β βββ page.tsx # Feature showcase
β βββ login/ # Authentication pages
β β βββ page.tsx # Login form
β β βββ actions.ts # Auth server actions
β βββ register/ # Registration page
β β βββ page.tsx # Register form
β βββ forgot-password/ # Password reset
β β βββ page.tsx # Forgot password form
β βββ reset-password/ # Password reset
β β βββ page.tsx # Reset password form
β βββ landing/ # Dashboard/Landing
β β βββ page.tsx # Main dashboard
β βββ add/ # Add todo page
β β βββ page.tsx # Todo creation form
β βββ groups/ # Group management
β β βββ page.tsx # Groups list
β β βββ [id]/page.tsx # Individual group view
β βββ profile/ # User profile
β β βββ page.tsx # Profile and settings
β βββ home/ # Home redirect page
β β βββ page.tsx # Redirect to main todos page
β βββ globals.css # Global styles with Duolingo theme
β βββ layout.tsx # Root layout with navigation
β βββ page.tsx # Main todos page
βββ components/ # React components
β βββ ui/ # shadcn/ui components
β β βββ button.tsx # Enhanced with duolingo-button styling
β β βββ card.tsx
β β βββ dialog.tsx
β β βββ input.tsx
β β βββ select.tsx # Updated for styling consistency
β β βββ badge.tsx
β β βββ drawer.tsx
β βββ modals/ # Modal components
β β βββ create-group-modal.tsx # Modal for creating new groups
β β βββ edit-group-modal.tsx # Modal for editing existing groups
β βββ shared/ # Shared components
β β βββ app-bar.tsx # Enhanced with dark theme support
β βββ bottom-nav.tsx # Mobile bottom navigation
β βββ color-picker.tsx # Color selection component
β βββ language-switcher.tsx # Language toggle
β βββ todo-item-compact.tsx # Compact todo item with inline actions
β βββ edit-todo-modal.tsx # Todo editing modal
βββ lib/ # Utilities and helpers
β βββ utils.ts # Tailwind merge utilities
β βββ i18n.ts # Internationalization config
βββ translations/ # I18n translation files
β βββ en.json # English translations
β βββ zh-HK.json # Chinese (Hong Kong) translations
βββ public/ # Static assets
β βββ manifest.json # PWA manifest
βββ .vscode/ # VS Code configuration
β βββ extensions.json # Recommended extensions
β βββ settings.json # VS Code settings
βββ mcp-direct.js # Standalone MCP server
βββ middleware.ts # Authentication middleware
βββ supabase-setup.sql # Complete database schema setup
βββ tailwind.config.js # Tailwind with Duolingo colors
βββ tsconfig.json # TypeScript configuration
βββ next.config.js # Next.js configuration
Database Schema
The application uses the following enhanced Supabase tables:
todos
id: Primary key (bigint)user_id: Foreign key to auth.users (uuid)group_id: Foreign key to todo_groups (bigint, nullable)text: Todo content (text)completed: Completion status (boolean)is_finished: Alternative completion flag (boolean)priority: Priority level 0-2 (integer)deadline: Optional deadline (date)color: Hex color code for visual theming (varchar, default: '#3B82F6')inserted_at: Creation timestampcreated_at: Created timestampupdated_at: Last update timestamp
todo_groups
id: Primary key (bigint)user_id: Foreign key to auth.users (uuid)title: Group name (text)icon: Group icon name for UI rendering (text, default: 'FolderOpen')color: Hex color code for group theming (varchar, default: '#3B82F6')inserted_at: Creation timestamp (added via supabase-schema-update.sql)created_at: Created timestampupdated_at: Last update timestamp
api_keys
id: Primary key (bigint)user_id: Foreign key to auth.users (uuid)name: Human-readable key name (text)key: API key string with 'mcp_' prefix (text)created_at: Creation timestamplast_used: Last usage timestamp (nullable)
All tables include comprehensive Row-Level Security (RLS) policies ensuring users can only access their own data.
Key Features Implementation
Mobile App Architecture
- Bottom Navigation:
/landing(dashboard),/add(create todo),/groups(manage groups),/profile(settings) - Duolingo Theme: Custom color palette with green (#58CC02), blue (#1CB0F6), orange (#FF9600), red (#FF4B4B), purple (#CE82FF), and pink (#FF86B7)
- Color System: Visual color picker with 8 predefined colors for todos and groups
- Gamification: Streak counters, achievement levels, progress bars, and completion tracking
- Responsive Design: Mobile-first approach with touch-friendly interactions and optimized spacing
Authentication Flow
- Enhanced Auth Pages: Splash screen, welcome page, separate login/register forms with graphics
- Password Recovery: Complete forgot/reset password flow with email verification
- Server-side authentication using Supabase SSR with enhanced middleware protection
- HTTP-only cookies for secure session management with automatic token refresh
Security Implementation
- Row-Level Security (RLS) on all tables
- User isolation enforced at database level
- API key authentication for MCP endpoints
- Secure key generation using crypto.randomBytes
MCP Integration Architecture
- Standards-compliant MCP server implementation
- JSON-RPC 2.0 protocol support
- Resource and tool exposure patterns
- Error handling with proper MCP error codes
- Authentication middleware for API key validation
Development Guidelines
Code Style
- TypeScript for type safety
- ESLint for code consistency
- Tailwind CSS for styling
- Server components by default
- Client components only when needed
Best Practices
- Server actions for form submissions
- Error boundaries for graceful error handling
- Loading states for better UX
- Responsive design with mobile-first approach
- Accessibility considerations in UI components
π Security
Authentication & Authorization
- Supabase Auth with email/password flow
- Server-side session validation in middleware
- Row-Level Security policies on all tables
- API key-based authentication for MCP endpoints
Data Protection
- User data isolation via RLS policies
- Secure API key generation with cryptographic randomness
- HTTP-only cookies prevent XSS attacks
- Environment variable protection for sensitive keys
Security Headers
- Content Security Policy via Next.js
- HTTPS enforcement in production
- Secure cookie settings with SameSite protection
API Security
- Rate limiting considerations for MCP endpoints
- Input validation on all API routes
- SQL injection prevention via Supabase client
- CORS configuration for API endpoints
π Troubleshooting
Common Issues
Database Connection Issues
# Check environment variables
echo $NEXT_PUBLIC_SUPABASE_URL
echo $NEXT_PUBLIC_SUPABASE_ANON_KEY
# Verify database connection
npm run dev
# Check browser console for errors
MCP Authentication Failures
# Verify API key format (should start with 'mcp_')
# Check API key in database
# Ensure Authorization header is correctly formatted
Build/Type Errors
# Run type checking
npm run type-check
# Fix ESLint issues
npm run lint
# Clear Next.js cache
rm -rf .next
npm run dev
Getting Help
- Next.js Issues: Next.js Documentation
- Supabase Issues: Supabase Documentation
- MCP Issues: MCP Documentation
- TypeScript Issues: TypeScript Handbook
Debug Mode
Enable debug logging:
# Development with debug logs
DEBUG=* npm run dev
# Or specific modules
DEBUG=mcp:* npm run dev
π Additional Resources
Learning Resources
- Next.js 14 App Router Guide
- Supabase Auth with Next.js
- Model Context Protocol Specification
- Tailwind CSS Documentation
Community & Support
π€ Contributing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Development Setup for Contributors
- Install dependencies:
npm install - Set up environment: Copy
.env.exampleto.env.local - Run type checks:
npm run type-check - Run linter:
npm run lint - Test locally:
npm run dev
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Next.js Team for the amazing framework
- Supabase Team for the fantastic backend-as-a-service
- MCP Team for the innovative AI agent protocol
- shadcn/ui for the beautiful component library
- Vercel for the seamless deployment platform
Built with β€οΈ using Next.js 14, Supabase, and Model Context Protocol
This project demonstrates the power of modern web development combined with AI agent integration capabilities.
