create-solvapay
v0.5.0
Published
Scaffold SolvaPay-monetized projects — MCP servers on Cloudflare Workers and more.
Readme
create-solvapay
The recommended way to create paid MCP apps — Cloudflare Workers transport, @solvapay/mcp paywall, @solvapay/react/mcp checkout/account/topup UI, and deploy scripts in one step.
Quickstart
npm create solvapay@latest my-mcp-app -- --type mcp
# equivalent: npx create-solvapay@latest my-mcp-app -- --type mcpFrom an OpenAPI spec:
npm create solvapay@latest my-api-mcp -- --type mcp --openapi ./openapi.yamlFrom scratch (single placeholder tool):
npm create solvapay@latest my-mcp-app -- --type mcp --no-openapiSkills for coding agents
Already in an agent session? Run
npx skills add solvapay/skillsand ask to create a paid MCP app — the agent routes tocreate-mcp-appand runs the scaffold for you.npx skills add solvapay/skillsSee Use agent skills for setup.
What the scaffold includes
- Worker transport — fetch-first MCP endpoint via
@solvapay/mcp/fetch - Paywall —
registerPayabletools wired to your SolvaPay product - Widget UI —
@solvapay/react/mcpcheckout, account, and topup views - OAuth bridge — discovery metadata and bearer-token customer identity
- Deploy scripts —
npm run deploywith wrangler + secret upload
See the generated project README and MCP app guide for local dev and go-live steps.
Post-scaffold
cd my-mcp-app
npm install # skipped if you didn't pass --skip-install
npm run dev # vite watch + wrangler dev on http://localhost:8787
npm run deploy # Cloudflare Workers deploysolvapay init runs automatically after scaffold (unless --skip-init) to write SOLVAPAY_SECRET_KEY and pick a product. For existing repos, use npx solvapay init instead of this scaffolder.
Flags
Common
| Flag | Description |
| --- | --- |
| --type <kind> | Project type (mcp today). Required in non-interactive mode. |
| -y, --yes | Non-interactive: accept all defaults |
| --product <ref> | Pre-fill SOLVAPAY_PRODUCT_REF (skip the picker) |
| --non-interactive | Alias for --yes; fail fast on missing prompt input |
| --skip-install | Skip post-scaffold npm install |
| --skip-init | Skip post-scaffold solvapay init (no browser OAuth) |
| --dev | Target api-dev.solvapay.com (internal testing only) |
| --list-types | List available project types and exit |
MCP (--type mcp)
| Flag | Description |
| --- | --- |
| --openapi <url\|path> | OpenAPI / Swagger spec — implies from-openapi mode |
| --no-openapi | From-scratch mode with a placeholder paid tool |
| --tool-name <camel> | Placeholder tool name in from-scratch mode (default: helloTool) |
Run npm create solvapay my-app -- --type mcp --help for MCP-specific help.
Integration paths
| Path | Entry | Packages | Example | Docs |
| --- | --- | --- | --- | --- |
| Express API | npx solvapay init | @solvapay/server | express-basic | Express |
| Next.js checkout | npx solvapay init | @solvapay/next + @solvapay/react | checkout-demo | Next.js, React |
| Hosted checkout | npx solvapay init | @solvapay/next | hosted-checkout-demo | Purchase management |
| Supabase Edge | npx solvapay init | @solvapay/server/fetch + @solvapay/react | supabase-edge | Supabase Edge |
| MCP app (server + UI) | npm create solvapay@latest <name> -- --type mcp | @solvapay/mcp + @solvapay/react/mcp + @solvapay/server | scaffold template | MCP, MCP app |
| MCP App UI (advanced) | manual on existing server | @solvapay/mcp + @solvapay/react/mcp | mcp-checkout-app | MCP app |
| Existing MCP server | npx solvapay init | @solvapay/server + @solvapay/mcp-core | mcp-oauth-bridge | MCP |
Documentation
Support
- Issues: GitHub Issues
- Security: Security Policy
- Docs: docs.solvapay.com
