mcp-boilerplate  by iannuttall

Cloudflare worker boilerplate for AI tool monetization

created 2 months ago
859 stars

Top 42.6% 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

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
879 stars in the last 90 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
3 more.

composio by ComposioHQ

0.2%
26k
Toolset for AI agent integrations via function calling
created 1 year ago
updated 22 hours ago
Feedback? Help us improve.