Quick start
Install custena-connect and your agents will automatically pay for any API or MCP tool call that responds with a 402. No code changes to your agent, no crypto wallet, no protocol knowledge required.
Install
Choose the method that fits your environment.
npm global install (recommended)
Step 1 installs the CLI globally. Step 2 registers the MCP server, drops the skill file at ~/.claude/skills/custena-pay.md, and opens your browser to sign in.
Or install locally and run via npx:
Shell installer - no Node.js required
Works on Linux, macOS, WSL, and Git Bash. Same result as npm.
Claude Code - add MCP server manually
Then inside Claude Code, run /mcp and click Authorize on the custena entry to complete the OAuth sign-in.
This only adds the payment tool. Without the skill file, Claude has the ability to pay but won't auto-pay 402 responses - it will ask each time.
To enable silent auto-pay, also install the skill:
OpenAI Codex - add MCP server manually
Open (or create) this file:
And append this block:
Then authenticate (Codex does its own OAuth flow against Custena):
Do not add bearer_token or default_tools_approval_mode under [mcp_servers.custena] - Codex rejects both for streamable_http servers. Authentication is handled by codex mcp login.
How it works
- 1Top up your accountGo to app.custena.com and add a credit card. Your balance is used to pay for agent API calls.
- 2Agent hits a 402When your agent calls a paid API or MCP tool, the server responds with HTTP 402 Payment Required and a payment challenge.
- 3Custena auto-paysThe skill intercepts the 402, calls the Custena MCP server, and pays from your balance. The agent retries the original request with the payment header - invisible to the agent.
- 4You see every transactionEvery payment is logged in your dashboard with amount, protocol, service, and EU AI Act Article 26 receipt.
Supported agents
Any agent can also pay via the HTTP API directly - no native adapter required.