Description
# MCP Boilerplate: Simple Setup Guide
This project helps you create your own remote MCP server on Cloudflare with user login and payment options. You don't need to be a technical expert to get it running.
> [!NOTE]
> This project is now free to use and open source. If you want to support me, just follow me on X [@iannuttall](https://x.com/iannuttall) and subscribe to [my newsletter](https://ian.is).
## What You'll Get
- An MCP server that works with Cursor, Claude and other AI assistants
- User login with Google or GitHub
- Payment processing with Stripe
- The ability to create both free and paid MCP tools
## Setup Checklist
Before starting, make sure you have:
- Node.js installed (download from [nodejs.org](https://nodejs.org/))
- A Cloudflare account (sign up at [dash.cloudflare.com/sign-up](https://dash.cloudflare.com/sign-up))
- A Google account for setting up login (or GitHub if you prefer)
- A Stripe account for payments (sign up at [dashboard.stripe.com/register](https://dashboard.stripe.com/register))
## Step-by-Step Setup
### Step 1: Get the Code
1. Clone this repository to your computer:
```bash
git clone https://github.com/iannuttall/mcp-boilerplate.git
cd mcp-boilerplate
```
2. Install everything needed:
```bash
npm install
```
### Step 2: Set Up the Database
1. Install Wrangler (Cloudflare's tool) if you haven't already:
```bash
npm install -g wrangler
```
2. Create a database for user login:
```bash
npx wrangler kv namespace create "OAUTH_KV"
```
Note: you can't use a different name for this database. It has to be "OAUTH_KV".
3. After running this command, you'll see some text that includes `id` and `preview_id` values
4. Open the `wrangler.jsonc` file in the project folder
5. Look for the section with `"kv_namespaces": [`
6. Add your database information there:
```json
"kv_namespaces": [
{
"binding": "OAUTH_KV",
"id": "paste-your-id-here",
"preview_id": "paste-your-preview-id-here"
}
]
```
### Step 3: Set Up Your L