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-serverYour 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:
- Linking your Custena account (device flow, opens a browser)
- Registering a new service — choose pricing, free-tier limits, and compliance settings
- Generating a service-specific secret key
custena wrap
custena wrap -- your-mcp-server --your-flagsEverything 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 }
}