FM 

f/mcp-startup-framework
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
127 stars 15 forks 品質 59 トレンド 0
f/mcp-startup-frameworkは、[[T0]からインポートされたMCPサーバー候補です。
概要
f/mcp-startup-frameworkは、[[T0]からインポートされたMCPサーバー候補です。
概要(AI 翻訳)
Cloudflare Workers上でOAuth認証、PostgreSQLデータベース、Stripe搭載有料ツールを備えたリモートモデルコンテキストプロトコル(MCP)サーバーを構築するための完全なフレームワークです。
🚀 特徴
- ** 🔐 OAuth 2.1 プロバイダー** - ユーザー登録/ログインによる完全な認証
- ** 🗄️ PostgreSQL統合** - 接続プーリングを備えたスケーラブルな本番対応データベース
- ** 💳 有料ツールフレームワーク** - サブスクリプション対応のStripe搭載プレミアムツール
- ** 🌐 プラットフォームに依存しない** - Cloudflare Workers向けに最適化されているが、どこでも展開可能(Vercel、Railway、AWS、セルフホスト)
- ** 🛠️ MCP Tools Framework** - ユーザーコンテキスト付きのモジュラーツールシステム
- ** 🔌 REST APIルート** - カスタムエンドポイントの追加が使いやすいシステム
- ** 🎨 カスタムビュー** - プライバシーポリシー、利用規約、ドキュメントページの拡張可能なUIシステム
- ** 📡 Streamable HTTP Transport** - ローカルのClaude Desktop統合のために
mcp-remoteと連携 - ** 📱 クロスプラットフォーム** - デスクトップ、ウェブ、モバイルMCPクライアントで動作
⚡ クイックスタート
前提条件
- Node.js 18+
- Cloudflareアカウント
- PostgreSQLデータベース(データベース設定参照)
- Stripeアカウント(有料ツール用)
就任
構成
編集:'.dev.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Startup Framework
A complete framework for building remote Model Context Protocol (MCP) servers on Cloudflare Workers with OAuth authentication, PostgreSQL database, and Stripe-powered paid tools.
🚀 Features
- 🔐 OAuth 2.1 Provider - Complete authentication with user registration/login
- 🗄️ PostgreSQL Integration - Scalable production-ready database with connection pooling
- 💳 Paid Tools Framework - Stripe-powered premium tools with subscription support
- 🌐 Platform Agnostic - Optimized for Cloudflare Workers but deployable anywhere (Vercel, Railway, AWS, self-hosted)
- 🛠️ MCP Tools Framework - Modular tool system with user context
- 🔌 REST API Routes - Easy-to-use system for adding custom endpoints
- 🎨 Custom Views - Extensible UI system for privacy policies, ToS, documentation pages
- 📡 Streamable HTTP Transport - Works with
mcp-remotefor local Claude Desktop integration - 📱 Cross-Platform - Works on desktop, web, and mobile MCP clients
⚡ Quick Start
Prerequisites
- Node.js 18+
- Cloudflare account
- PostgreSQL database (see database setup)
- Stripe account (for paid tools)
Installation
# Clone the repository
git clone https://github.com/f/mcp-startup-framework
cd mcp-startup-framework
# Install dependencies
npm install
# Copy environment template
cp .dev.vars.example .dev.vars
Configuration
Edit .dev.vars with your settings:
DATABASE_URL="postgresql://username:password@host:port/database"
JWT_SECRET="your-super-secret-jwt-key"
COOKIE_ENCRYPTION_KEY="32-character-encryption-key"
STRIPE_SECRET_KEY="sk_test_your_stripe_key"
STRIPE_PRICE_ID_FOR_PREMIUM_MATH="price_your_stripe_price_id"
BASE_URL="https://your-domain.workers.dev"
Development
# Start development server
npm run dev
# Initialize database (in another terminal)
curl -X POST http://localhost:8787/init-db
# Visit http://localhost:8787 to register/login
🛠️ Adding Tools & Routes
Everything starts from src/index.ts:
// Register MCP tools
backend
.registerTool(registerAddTool)
.registerTool(registerGreetingTool)
.registerTool(registerPremiumMathTool);
// Add REST API routes
backend
.route('GET', '/api/status', (c) => c.json({ status: 'ok' }))
.authRoute('GET', '/api/profile', (c, userContext) =>
c.json({ user: userContext })
);
See Tools Guide and Routes Guide for details.
Custom Views
Extend beyond MCP with custom pages:
// Add privacy policy, terms of service, documentation
backend
.route('GET', '/privacy', (c) => c.html(generatePrivacyPage()))
.route('GET', '/terms', (c) => c.html(generateTermsPage()))
.route('GET', '/docs', (c) => c.html(generateDocsPage()));
See Views Guide for creating custom pages.
🚀 Deployment
# Set production secrets
wrangler secret put JWT_SECRET
インストール
npx -y mcp-remote https://your-domain.workers.dev/mcp設定
{
"mcpServers": {
"my-startup": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://your-domain.workers.dev/mcp"
]
}
}
}