custena CLI

Wrap any MCP server with payment middleware in two commands. No code changes required.

custena~2 min

Quickstart

npx custena init
custena wrap -- your-mcp-server

Your MCP server now charges per tool call. Set pricing in the dashboard — all payment protocols are accepted automatically.

custena init

Creates a custena.config.json in the current directory and walks you through:

  1. Linking your Custena account (device flow, opens a browser)
  2. Registering a new service — choose pricing, free-tier limits, and compliance settings
  3. Generating a service-specific secret key

custena wrap

custena wrap -- your-mcp-server --your-flags

Everything after -- is forwarded verbatim to your MCP server's process. The CLI spawns your server, attaches the Custena middleware, and exposes a payment-enforcing endpoint on the port configured in custena.config.json (default: :4000).

Config file

{
  "service": "svc_01HZ...",
  "port": 4000,
  "transport": "stdio",
  "price": { "currency": "USD", "amount": 0.01 }
}

Next steps

  • Generate a service in the dashboard
  • Read about the Node SDK for programmatic integration