Buyer

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.

1

npm global install (recommended)

npm install -g custena-connect
npx custena-connect install

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:

npm install custena-connect
npx custena-connect install
or
1

Shell installer - no Node.js required

curl -fsSL https://custena.com/install.sh | bash

Works on Linux, macOS, WSL, and Git Bash. Same result as npm.

or, configure your agent manually
Claude Code

Claude Code - add MCP server manually

claude mcp add --transport http --scope user \
--client-id custena-connect-cli custena https://api.custena.com/mcp

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:

mkdir -p ~/.claude/skills && curl -fsSL \
https://custena.com/skills/custena-pay.md \
-o ~/.claude/skills/custena-pay.md
Codex

OpenAI Codex - add MCP server manually

Open (or create) this file:

~/.codex/config.toml

And append this block:

[mcp_servers.custena]
url = "https://api.custena.com/mcp"

Then authenticate (Codex does its own OAuth flow against Custena):

codex mcp login 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

  1. 1
    Top up your account
    Go to app.custena.com and add a credit card. Your balance is used to pay for agent API calls.
  2. 2
    Agent hits a 402
    When your agent calls a paid API or MCP tool, the server responds with HTTP 402 Payment Required and a payment challenge.
  3. 3
    Custena auto-pays
    The 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.
  4. 4
    You see every transaction
    Every payment is logged in your dashboard with amount, protocol, service, and EU AI Act Article 26 receipt.

Supported agents

Claude Code
Claude Code
Available now
Codex
OpenAI Codex
Available now
OpenClaw
OpenClaw
Coming soon

Any agent can also pay via the HTTP API directly - no native adapter required.