Cloudflare worker boilerplate for AI tool monetization
Top 42.6% on sourcepulse
This project provides a boilerplate for creating a remote AI model context protocol (MCP) server on Cloudflare Workers. It enables user authentication via Google or GitHub and integrates Stripe for managing free and paid tools, targeting developers who want to monetize their AI-powered tools.
How It Works
The boilerplate leverages Cloudflare Workers for serverless deployment and utilizes wrangler
for managing the worker environment. User authentication is handled by OAuth 2.0 flows with Google and GitHub. Stripe integration allows for subscription-based, metered-usage, or one-time payment models for accessing specific tools. Tools are defined as TypeScript functions within the src/tools
directory and registered with the MCP agent.
Quick Start & Requirements
npm install -g wrangler
git clone https://github.com/iannuttall/mcp-boilerplate.git && cd mcp-boilerplate && npm install
npx wrangler kv namespace create "OAUTH_KV"
and update wrangler.jsonc
.npx wrangler dev
npx wrangler deploy
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
npx @modelcontextprotocol/inspector@latest
.2 months ago
Inactive