ST

sholajegede/todo_mcp_server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

24 stars 7 forks 质量 67 趋势 10MIT

MCP服务器实现了完整的待办管理系统,支持OAuth认证、免费增值计费模式和PostgreSQL数据库。

概览

一台完整的服务器,展示了现代网页开发实践,包括身份验证、计费和数据库集成。非常适合学习全栈开发的初学者! 该项目创建了一个你可以通过(或任何兼容MCP客户端)进行交互的。它包括: - 通过 Kinde - 有免费套餐限制 - 通过 Neon PostgreSQL - 通过 MCP 协议 - 用于认证 - 新用户 - 无限待办事项 - 使用Google/社交登录 - 使用PostgreSQL - 通过Cursor登录 - 使用安全Cookie 1. (版本18或更高) 2.账户(免费) 3.(免费)4. (用于MCP集成) 这会创建一个带有占位值的 .env 文件。 1. 进入 neon.tech 2.创建一个免费账户 3.创建一个新数据库 4.复制你的连接字符串 5.更新你的 .env 文件: 1. 前往 kinde.com 2.创建免费账户 3.创建新应用 4.复制你的凭证 5.更新你的 .env 文件:

概述(AI 翻译)

一个完整的**模型上下文协议(MCP)**服务器,展示了现代网页开发实践,包括认证、计费和数据库集成。非常适合学习全栈开发的初学者!

这个项目的作用

该项目创建了一个待办事项管理系统,您可以通过Cursor AI(或任何兼容MCP的客户端)进行交互。它包括:

  • 真实认证与Kinde合作
  • 计费系统,含免费套餐限制
  • 利用Neon PostgreSQL的数据库存储
  • 通过MCP协议实现AI集成
  • 用于认证的网页接口

主要特色

  • 5 新用户免费待办事项
  • 升级为付费以获得无限待办事项
  • 真实认证与谷歌/社交登录
  • 数据库持久化与PostgreSQL合作
  • 通过光标实现AI聊天集成
  • 带安全Cookie的会话管理

建筑概述

先修条件

在开始之前,你需要:

  1. Node.js(版本18及以上)
  2. Neon数据库账户(免费)
  3. 一个Kinde账号(免费)
  4. 光标IDE(用于MCP集成)

快速入门指南

第一步:克隆并安装

第二步:环境搭建

这会生成一个“。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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

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:

  1. Node.js (version 18 or higher)
  2. A Neon Database account (free)
  3. A Kinde account (free)
  4. Cursor IDE (for MCP integration)

Quick Start Guide

Step 1: Clone and Install

# Clone the repository
git clone 
cd todo-mcp-server

# Install dependencies
npm install

Step 2: Set Up Environment

# Run the setup script
chmod +x setup.sh
./setup.sh

This creates a .env file with placeholder values.

Step 3: Set Up Neon Database (Free)

  1. Go to neon.tech
  2. Create a free account
  3. Create a new database
  4. Copy your connection string
  5. Update your .env file:
DATABASE_URL=postgresql://your-connection-string-here

Step 4: Set Up Kinde Authentication (Free)

  1. Go to kinde.com
  2. Create a free account
  3. Create a new application
  4. Copy your credentials
  5. Update your .env file:
KINDE_ISSUER_URL=https://your-domain.kinde.com
KINDE_CLIENT_ID=your_client_id
KINDE_CLIENT_SECRET=your_client_secret

Step 5: Initialize Database

# Set up database tables
npm run setup-db

Step 6: Build and Run

# Build the project
npm run build

# Start the MCP server
npm start

Project Structure

mcp-todo-rebuild/
├── src/
│   ├── server.ts              # Main MCP server
│   ├── kinde-auth-server.ts   # Authentication web server
│   └── setup-db.ts           # Database setup script
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }