Todo MCP Server
Enables user authentication through Google OAuth integration via Kinde, allowing users to log in with their Google accounts to access the todo management system
Provides database persistence for todo management with user data storage, using Neon PostgreSQL for managing users table and todos table with proper relationships
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Todo MCP Server create a todo to finish the quarterly report by Friday"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Modern Todo MCP Server with Authentication, Database & Billing
A complete Model Context Protocol (MCP) server that demonstrates modern web development practices with authentication, billing, and database integration. Perfect for beginners learning full-stack development!
What This Project Does
This project creates a Todo Management System that you can interact with through Cursor AI (or any MCP-compatible client). It includes:
Real Authentication with Kinde
Billing System with free tier limits
Database Storage with Neon PostgreSQL
AI Integration through MCP protocol
Web Interface for authentication
Related MCP server: Cold's MCP Server - Project Management System
Key Features
5 Free Todos for new users
Upgrade to Paid for unlimited todos
Real Authentication with Google/social login
Database Persistence with PostgreSQL
AI Chat Integration through Cursor
Session Management with secure cookies
Architecture Overview
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Cursor AI │ │ MCP Server │ │ Kinde Auth │
│ (Your Chat) │◄──►│ (This Project) │◄──►│ (Authentication)│
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌──────────────────┐
│ Neon Database │
│ (PostgreSQL) │
└──────────────────┘Prerequisites
Before you start, you'll need:
Node.js (version 18 or higher)
A Neon Database account (free)
A Kinde account (free)
Cursor IDE (for MCP integration)
Quick Start Guide
Step 1: Clone and Install
# Clone the repository
git clone <your-repo-url>
cd todo-mcp-server
# Install dependencies
npm installStep 2: Set Up Environment
# Run the setup script
chmod +x setup.sh
./setup.shThis creates a .env file with placeholder values.
Step 3: Set Up Neon Database (Free)
Go to neon.tech
Create a free account
Create a new database
Copy your connection string
Update your
.envfile:
DATABASE_URL=postgresql://your-connection-string-hereStep 4: Set Up Kinde Authentication (Free)
Go to kinde.com
Create a free account
Create a new application
Copy your credentials
Update your
.envfile:
KINDE_ISSUER_URL=https://your-domain.kinde.com
KINDE_CLIENT_ID=your_client_id
KINDE_CLIENT_SECRET=your_client_secretStep 5: Initialize Database
# Set up database tables
npm run setup-dbStep 6: Build and Run
# Build the project
npm run build
# Start the MCP server
npm startProject Structure
mcp-todo-rebuild/
├── src/
│ ├── server.ts # Main MCP server
│ ├── kinde-auth-server.ts # Authentication web server
│ └── setup-db.ts # Database setup script
├── dist/ # Compiled JavaScript
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── .env # Environment variables (create this)
└── README.md # This fileHow It Works
1. MCP Server (src/server.ts)
Handles AI chat commands like "create todo", "list todos"
Manages user authentication and billing
Connects to database for data persistence
2. Auth Server (src/kinde-auth-server.ts)
Provides web interface for login/logout
Handles OAuth flow with Kinde
Automatically creates user database records
3. Database Setup (src/setup-db.ts)
Creates necessary database tables
Sets up indexes for performance
Initializes user and todo schemas
How to Use
1. Start the Servers
# Terminal 1: Start MCP server
npm start
# Terminal 2: Start auth server
npm run auth-server2. Configure Cursor
Add this to your Cursor MCP configuration (~/.cursor/mcp.json):
{
"mcpServers": {
"todo-mcp-server": {
"command": "node",
"args": ["dist/server.js"],
"cwd": "/path/to/your/project",
"env": {
"DATABASE_URL": "your_database_url",
"KINDE_ISSUER_URL": "your_kinde_issuer",
"KINDE_CLIENT_ID": "your_client_id",
"KINDE_CLIENT_SECRET": "your_client_secret",
"JWT_SECRET": "your_jwt_secret",
"NODE_ENV": "development"
}
}
}
}3. Use in Cursor Chat
Once configured, you can use these commands in Cursor:
login # Get authentication URL
save_token: <token> # Save your login token
list todos # View your todos
create todo # Create a new todo
update todo # Update an existing todo
delete todo # Delete a todo
logout # Log outAuthentication Flow
Type "login" in Cursor chat
Click the URL to open authentication page
Login with Google (or other providers)
Copy your token from the success page
Use "save_token" command in Cursor
Start creating todos!
Billing System
Free Tier: 5 todos per user
Paid Tier: Unlimited todos (upgrade through Kinde portal)
Automatic Tracking: System tracks usage automatically
Upgrade URL: Provided when limit is reached
Database Schema
Users Table
CREATE TABLE users (
id SERIAL PRIMARY KEY,
user_id TEXT UNIQUE NOT NULL,
name TEXT,
email TEXT,
subscription_status TEXT DEFAULT 'free',
plan TEXT DEFAULT 'free',
free_todos_used INTEGER DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);Todos Table
CREATE TABLE todos (
id SERIAL PRIMARY KEY,
user_id TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
completed BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);Development Commands
# Development
npm run dev # Run MCP server in development
npm run auth-server # Run auth server in development
# Database
npm run setup-db # Set up database tables
# Production
npm run build # Build for production
npm start # Run production serverConfiguration
Environment Variables
Create a .env file with these variables:
# Database
DATABASE_URL=postgresql://user:pass@host:port/db
# Kinde Authentication
KINDE_ISSUER_URL=https://your-domain.kinde.com
KINDE_CLIENT_ID=your_client_id
KINDE_CLIENT_SECRET=your_client_secret
# Security
JWT_SECRET=your_secret_key
# Environment
NODE_ENV=developmentTroubleshooting
Common Issues
"No authentication token found"
Make sure you've logged in and saved your token
Check that the auth server is running
"Database connection failed"
Verify your DATABASE_URL is correct
Make sure you've run
npm run setup-db
"Kinde authentication failed"
Check your Kinde credentials in
.envVerify your redirect URLs in Kinde dashboard
"MCP server not found in Cursor"
Restart Cursor after updating
mcp.jsonCheck that the server is running with
npm start
Debug Mode
Run with debug logging:
DEBUG=* npm run devLearning Resources
What You'll Learn
MCP Protocol: How AI assistants interact with tools
OAuth 2.0: Modern authentication flows
PostgreSQL: Database design and queries
TypeScript: Type-safe JavaScript development
Express.js: Web server development
Session Management: User state persistence
Key Concepts
Model Context Protocol (MCP): Standard for AI tool integration
OAuth Flow: Secure authentication without passwords
JWT Tokens: Secure user identification
Database Relations: User-todo relationships
Billing Integration: Freemium business models
Next Steps
Once you understand this project, you can:
Add More Features: Categories, due dates, sharing
Improve UI: Better web interface for auth
Add Real Billing: Stripe integration
Deploy: Host on Vercel, Railway, or AWS
Scale: Add caching, load balancing
Contributing
This is a learning project! Feel free to:
Report bugs
Suggest improvements
Add new features
Create tutorials
License
MIT License - feel free to use this for learning and projects!
Need Help?
If you get stuck:
Check the troubleshooting section above
Verify all environment variables are set
Make sure all services are running
Check the console for error messages
Remember: This is a learning project designed to teach modern web development concepts. Take your time, experiment, and don't hesitate to explore the code!
Available Tools
11 toolscreate_todoC
Create a new todo item with interactive prompts
Inputs: authToken, title, description, completed.
delete_todoC
Delete a todo item with interactive prompts
Inputs: authToken.
get_kinde_billingC
Get Kinde billing information and subscription status
Inputs: authToken.
get_subscription_statusC
Get the user's subscription status and todo usage
Inputs: authToken (required).
list_todosC
List all todos for the authenticated user
Inputs: authToken.
loginB
Login with Kinde to get authentication token
Inputs: no named parameters.
logoutA
Logout and clear stored authentication token
Inputs: no named parameters.
refresh_billing_statusB
Force refresh billing status from Kinde (useful after plan changes)
Inputs: authToken.
save_tokenC
Save your Kinde authentication token for future use
Inputs: token (required).
update_todoC
Update an existing todo item with interactive prompts
Inputs: authToken.
upgrade_subscriptionC
Upgrade user subscription to paid plan
Inputs: authToken (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The todo management tools (create_todo, delete_todo, list_todos, update_todo) are clearly distinct and cover the CRUD operations well. However, there is some ambiguity between get_kinde_billing and get_subscription_status, as both seem to retrieve subscription-related information, and refresh_billing_status overlaps with these. The authentication tools (login, logout, save_token) are distinct from the todo tools but have some functional overlap with each other.
Most tools follow a consistent verb_noun pattern (e.g., create_todo, list_todos, update_todo, get_kinde_billing, refresh_billing_status). The main deviation is 'login' and 'logout', which use a single verb without a noun, but this is a common convention for authentication actions. Overall, the naming is predictable and readable with only minor inconsistencies.
With 11 tools, the count is reasonable for a server that combines todo management with authentication and billing features. It's slightly on the higher side but not excessive, as it covers multiple domains (todos, auth, billing) within a coherent scope. The tools are well-distributed across these areas without obvious bloat.
For todo management, the server provides complete CRUD coverage (create, list, update, delete). Authentication is covered with login, logout, and token management. Billing features include status retrieval, refresh, and upgrade. A minor gap is the lack of a tool to downgrade or cancel subscriptions, but the core workflows are well-supported.
Related MCP Connectors
Hosted login, teams, billing and feature flags for your SaaS app, set up by your AI assistant.
AI-powered to-do list: add, list, complete and organise tasks across lists from any assistant.
One sign-in and a private Postgres database for every app you build with AI. Hosted, OAuth sign-in.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to manage todo lists through natural language by creating, listing, updating, completing, and deleting tasks stored in Firebase Firestore. Supports custom system prompts for personalized task management workflows.5ISC
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to create, manage, and track projects with associated todos, including CRUD operations and filtering by status, priority, and project.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants like Claude to create and manage projects, todos, priorities, and statuses through natural language, bridging the gap between AI and project management workflows.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage a todo list with full CRUD operations, including creating, reading, updating, and deleting todos via a FastAPI backend with SQLite persistence.-