mcp-boilerplate  by iannuttall

Cloudflare worker boilerplate for AI tool monetization

Created 4 months ago
944 stars

Top 38.8% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

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

  • Install: npm install -g wrangler
  • Clone: git clone https://github.com/iannuttall/mcp-boilerplate.git && cd mcp-boilerplate && npm install
  • Prerequisites: Node.js, Cloudflare account, Google/GitHub account, Stripe account.
  • Database Setup: npx wrangler kv namespace create "OAUTH_KV" and update wrangler.jsonc.
  • Local Development: npx wrangler dev
  • Deployment: npx wrangler deploy
  • Docs: Setup Guide

Highlighted Details

  • Supports Google and GitHub OAuth for user authentication.
  • Integrates Stripe for subscription, metered, and one-time payment models for tools.
  • Allows creation of custom free and paid tools with Zod for input validation.
  • Provides integration examples with AI assistants like Cursor and Claude Desktop.
  • Includes MCP Inspector for testing and debugging tools.

Maintenance & Community

  • The project is maintained by iannuttall.
  • Users can submit issues on the GitHub repository for bugs or problems.
  • No specific community channels (Discord/Slack) are mentioned.

Licensing & Compatibility

  • The README states the project is "free to use and open source" but does not specify a license. This requires clarification for commercial use or closed-source linking.

Limitations & Caveats

  • The project does not explicitly state its license, which may impact commercial adoption.
  • Direct support is not provided; users are directed to submit GitHub issues.
  • The README notes a temporary issue with npx @modelcontextprotocol/inspector@latest.
Health Check
Last Commit

4 months ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
0
Star History
38 stars in the last 30 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Georgios Konstantopoulos Georgios Konstantopoulos(CTO, General Partner at Paradigm), and
2 more.

mcp-server-cloudflare by cloudflare

0.7%
3k
MCP servers for LLM integration with Cloudflare services
Created 9 months ago
Updated 2 days ago
Feedback? Help us improve.