Skip to main content

Quick comparison

Prerequisites

  • Node.js 20+
  • pnpm
  • SolvaPay account (for real-backend examples)
  • Supabase project (for Supabase examples)
From workspace root:

Run any example

Use .env instead of .env.local when the example README says so.

Example notes

express-basic

express-provider-linkage

nextjs-auth0

  • Auth0 Regular Web App + embedded Pay As You Go checkout
  • Canonical web reference for Auth0 sub → SolvaPay customer linkage
  • README: examples/nextjs-auth0/README.md

checkout-demo

hosted-checkout-demo

supabase-edge

  • Fetch-native backend for Supabase Edge Functions using @solvapay/server/fetch
  • One two-line file per handler; solvapayWebhook factory for webhooks
  • README: examples/supabase-edge/README.md

mcp-time-app

  • MCP app UI resource + protected tools
  • Demonstrates createSolvaPayMcpServer and registerPayable with OAuth context
  • README: examples/mcp-time-app/README.md

mcp-oauth-bridge

mcp-checkout-app

  • Full 5-intent MCP App (plans, checkout, top-up, usage, paywall)
  • Hybrid checkout: embedded Stripe Elements via <PaymentForm> on compliant hosts (basic-host, ChatGPT); auto-falls back to hosted SolvaPay checkout on hosts that ignore _meta.ui.csp (Claude)
  • Ships with createMcpAppAdapter wired to SolvaPayProvider and a paywalled demo toolbox
  • README: examples/mcp-checkout-app/README.md

cloudflare-workers-mcp

  • Single fetch handler built with createSolvaPayMcpFetch from @solvapay/mcp/fetch — OAuth discovery, bridge routes, tool calls, and the widget iframe in one worker
  • Ships a seeded stock-predictor demo toolbox (predict_price_chart, predict_direction) to exercise the paywall end-to-end
  • README: examples/cloudflare-workers-mcp/README.md

supabase-edge-mcp

  • Same toolbox as cloudflare-workers-mcp, deployed as a single Supabase Edge Function
  • Uses Deno.serve(createSolvaPayMcpFetch(…)) from @solvapay/mcp/fetch
  • Pair with supabase-edge-mcp-proxy if you need a custom domain in front of Supabase’s /functions/v1/… URL shape (required for RFC 9728 .well-known/oauth-protected-resource discovery)
  • README: examples/supabase-edge-mcp/README.md

supabase-edge-mcp-proxy

  • Cloudflare Worker that remaps https://your-subdomain/*https://<proj>.supabase.co/functions/v1/mcp/*
  • Fixes OAuth Protected Resource Metadata discovery for MCP Inspector and ChatGPT connectors
  • README: examples/supabase-edge-mcp-proxy/README.md

Next steps