Skip to content
LogoLogo

CLI Reference

Built-in command-line tool for paid HTTP requests

The mppx package includes a CLI for making HTTP requests with automatic payment handling.

Usage

The mppx CLI is bundled with the package.

Global install

To use the mppx CLI outside of a project, install globally.

Commands and options

terminal
$ mppx --help
mppx@0.6.20 — Make HTTP requests with automatic payment handling

Usage: mppx <url> [options]

Arguments:
  url  URL to make request to

Options:
  --account, -a <string>       Account name (env: MPPX_ACCOUNT)
  --auto-swap                  Auto-swap source tokens into payment currency
  --config, -c <string>        Path to config file
  --confirm                    Show confirmation prompts
  --data, -d <string>          Send request body (implies POST unless -X is set)
  --fail, -f                   Fail silently on HTTP errors (exit 22)
  --header, -H <array>         Add header (repeatable)
  --include, -i                Include response headers in output
  --insecure, -k               Skip TLS certificate verification (true for localhost/.local)
  --json-body, -J <string>     Send JSON body (sets Content-Type and Accept, implies POST)
  --location, -L               Follow redirects
  --method, -X <string>        HTTP method
  --method-opt, -M <array>     Method-specific option (key=value, repeatable)
  --network <mainnet|testnet>  Tempo network
  --pay-with <string>          Source token for Tempo auto-swap
  --rpc-url, -r <string>       RPC endpoint, defaults to public RPC for chain (env: MPPX_RPC_URL)
  --silent, -s                 Silent mode (suppress progress and info)
  --slippage <number>          Tempo auto-swap max slippage percentage
  --user-agent, -A <string>    Set User-Agent header (default: mppx/0.6.20)
  --verbose, -v <count>        Verbosity (-v details, -vv headers) (default: 0)

Examples:
  mppx mpp.dev/api/ping/paid  # Make a payment request

Commands:
  account   Manage accounts (create, default, delete, export, fund, list, view)
  discover  Discovery tooling
  init      Create an mppx.config.ts file in the current directory
  services  Browse the MPP services registry
  sign      Sign a payment challenge and output the Authorization header

Integrations:
  completions  Generate shell completion script
  mcp add      Register as MCP server
  skills       Sync skill files to agents (add, list)

Global Options:
  --filter-output <keys>              Filter output by key paths (e.g. foo,bar.baz,a[0,3])
  --format <toon|json|yaml|md|jsonl>  Output format
  --full-output                       Show full output envelope
  --help                              Show help
  --llms, --llms-full                 Print LLM-readable manifest
  --mcp                               Start as MCP stdio server
  --schema                            Show JSON Schema for command
  --token-count                       Print token count of output (instead of output)
  --token-limit <n>                   Limit output to n tokens
  --token-offset <n>                  Skip first n tokens of output
  --version                           Show version

Environment variables

VariableDescription
MPPX_ACCOUNTDefault account name
MPPX_PRIVATE_KEYUse a private key directly instead of the keychain
MPPX_RPC_URLDefault RPC endpoint
MPPX_STRIPE_SECRET_KEYStripe secret key for Stripe payment methods (test mode only: sk_test_...)
MPPX_STRIPE_SPT_URLCustom Stripe shared payment token endpoint (advanced)

Method options

Pass method-specific key-value pairs with -M (repeatable):

terminal
$ mppx example.com/content -M channel=0x123 -M deposit=1000000

For Tempo session payments, use channel and deposit. For Stripe, use paymentMethod.

JSON output

Pass --format json to commands that support structured output. This is useful when another tool calls mppx.

terminal
$ mppx account list --format json
{
  "accounts": [
    {
      "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
      "isDefault": true,
      "name": "main"
    }
  ]
}

Init command

Create an mppx.config.ts file in the current directory:

terminal
$ mppx init

Use --force to overwrite an existing config file:

terminal
$ mppx init --force

Sign command

Sign a payment Challenge and output the Authorization header value without making a request. Accepts a challenge via --challenge or stdin.

terminal
$ mppx sign --challenge 'Payment method="tempo-session";chain-id=4217;...'
terminal
$ echo 'Payment method="tempo-session";chain-id=4217;...' | mppx sign

Use --dry-run to validate and parse a Challenge without signing:

terminal
$ mppx sign --challenge 'Payment method="tempo-session";...' --dry-run

Account commands

Manage local keychain-backed accounts with mppx account.

terminal
$ mppx account create --account main
$ mppx account default --account main
$ mppx account list
$ mppx account view --account main

Export a local account private key when you need to import it into another wallet or tool:

terminal
$ mppx account export --account main

Stripe payments

The CLI supports Stripe payment methods. Set your Stripe test-mode secret key and make requests to Stripe-enabled endpoints.

terminal
$ export MPPX_STRIPE_SECRET_KEY=sk_test_...
$ mppx https://example.com/content

Pass method-specific options with -M:

terminal
$ mppx https://example.com/content -M paymentMethod=pm_card_visa

Agent integration

Register mppx as an MCP server for use with coding agents:

terminal
$ mppx mcp add

Sync skill files to your agent's skill directory:

terminal
$ mppx skills add

Generate shell completions:

terminal
$ mppx completions