MCP Startup Framework
About
A framework for building MCP servers on Cloudflare Workers with OAuth, PostgreSQL, and Stripe.
Details
- Author
- f
- Categories
- Developer Tools, Other
Jump to
Setup
Install MCP Startup Framework in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/f/mcp-startup-framework
Follow the installation instructions in the repository README, then restart your MCP client.
A framework for building MCP servers on Cloudflare Workers with OAuth, PostgreSQL, and Stripe.
A complete framework for building remote Model Context Protocol (MCP) servers on Cloudflare Workers with OAuth authentication, PostgreSQL database, and Stripe-powered paid tools.
- π 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 withmcp-remotefor local Claude Desktop integration
- π± Cross-Platform- Works on desktop, web, and mobile MCP clients
- Node.js 18+
- Cloudflare account
- PostgreSQL database (seedatabase setup)
- Stripe account (for paid tools)
# 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
# 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
// 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 }) );
SeeTools GuideandRoutes Guidefor details.
// 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()));
SeeViews Guidefor creating custom pages.
SeeDeployment Guidefor full instructions.
For claude.ai Pro users, you can integrate directly:
- Navigate toclaude.ai settings
- Click "Add Integration"
- Enter your server URL:https://your-domain.workers.dev/sse
- Complete the OAuth flow
Open Claude Desktop settings:Settings > Developer > Edit Config
Add to yourclaude_desktop_config.json:
{ "mcpServers": { "my-startup": { "command": "npx", "args": [ "-y", "mcp-remote", "https://your-domain.workers.dev/mcp" ] } } }
After saving, restart Claude Desktop. Your MCP tools will appear in the chat interface.
The framework supports multiple transport protocols:
- Streamable HTTP(default) -/mcpendpoint
- Server-Sent Events (SSE)-/sseendpoint
Both work seamlessly withmcp-remotefor local development and production use.
While optimized forCloudflare Workers, this framework runs anywhere:
- Vercel: Deploy with@vercel/noderuntime
- Railway: One-click deploy with built-in PostgreSQL
- AWS Lambda: Use with RDS or Aurora Serverless
- Google Cloud Run: Deploy with Cloud SQL
- Self-hosted: Run with Docker on any VPS
Simply update your database connection and deployment configuration!
The framework works with any PostgreSQL provider:
- Neon- Serverless PostgreSQL with autoscaling
- Supabase- PostgreSQL with real-time features
- Railway- Managed PostgreSQL with automatic backups
- Amazon RDS- Enterprise-grade PostgreSQL
- Cloudflare Hyperdrive- Connection pooling for optimal performance
All providers support the scalability needed for production MCP servers.
- Setup Guide- Detailed installation and configuration
- Database Setup- PostgreSQL options and optimization
- Development Guide- Project structure and workflows
- Adding Tools- Create free and paid MCP tools
- Custom Routes- Add REST API endpoints
- Views Customization- Customize all UI pages (login, consent, payment, etc.)
- Deployment- Production deployment instructions
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
An example of a remote, authentication-free MCP server deployable on Cloudflare Workers.
One remote MCP server for 500+ production APIs β Stripe, HubSpot, Postgres, Gmail, and more. OAuth and API key auth, credential management, and a CLI.
A remote MCP server deployable on Cloudflare Workers without authentication.
A template for creating a remote, authentication-free MCP server deployable on Cloudflare Workers.
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
An example of a remote MCP server without authentication, deployable on Cloudflare Workers or runnable locally via npm.
An authentication-free, remote MCP server designed for deployment on Cloudflare Workers.
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
An authless remote MCP server designed for deployment on Cloudflare Workers. It can be set up locally using npm create.
An authentication-free remote MCP server designed for deployment on Cloudflare Workers.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





