Bring Your Own Wallet (Production Setup)

Use indie.money with an external wallet for production — payments signed locally by x402-proxy, private keys never leave your machine

Written By pvdyck

Last updated About 5 hours ago

Bring Your Own Wallet (Production Setup)

The MCP's built-in create-wallet / import-wallet / export-wallet tools are a convenience for exploration and testnet. They generate or accept private keys and store them on the platform so your AI assistant can sign payments for you. On testnet, tokens have no real value, so the trust trade-off is low.

For production with real funds, don't put private keys on the platform. Use x402-proxy — an open-source local proxy that sits between your AI client (Claude Desktop, Cursor, Claude Code, …) and indie.money's MCP server. It intercepts payment challenges, signs them with a wallet on your machine, and forwards the result back to your assistant. Your private key never leaves your local disk.

AI client (Claude Desktop / Cursor / …)        │  MCP stdio        ▼x402-proxy (local, signs payments from ~/.config/x402-proxy/wallet.json)        │  MCP over HTTPS        ▼indie.money MCP  →  paid indie.money endpoints

TL;DR

EnvironmentRecommended setup
Testnet (chain 84532)Use the MCP's built-in wallet tools as documented in the AI assistant guide.
Production (chain 8453)Use x402-proxy. Install once, point your AI client at it, and let it sign payments locally.

Tested compatibility: end-to-end with x402-proxy version 0.11.6 or newer. Older versions pre-date the final wire-protocol interop and may not work.

1. Install and wire it up

x402-proxy ships on npm and runs via npx — no global install required.

The fastest path is the auto-configure command. It detects your AI client (Claude Desktop, Claude Code, Cursor, VS Code, and 16+ others), writes the config for you, and runs the wallet wizard if you don't have one yet:

# Productionnpx x402-proxy mcp add indie-money https://executor.indie.money/mcp# Staging / testnet (free to try, test tokens have no value)npx x402-proxy mcp add indie-money-staging https://executor-staging.indie.money/mcp

That's it. Restart your AI client and the indie-money tools appear with payment handled locally.

Manual config

If you prefer to write the config by hand (example shows production — swap the URL for https://executor-staging.indie.money/mcp on testnet):

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{  "mcpServers": {    "indie-money": {      "command": "npx",      "args": ["-y", "x402-proxy", "mcp", "https://executor.indie.money/mcp"]    }  }}

Cursor / Claude Code / VS Code — same shape, dropped into the respective mcpServers block in their settings file.

Restart the client after editing.

2. Set up your wallet

On first run, x402-proxy opens a wizard that either generates a fresh BIP-39 mnemonic or imports one you already have. It stores the wallet at:

~/.config/x402-proxy/wallet.json

(or $XDG_CONFIG_HOME/x402-proxy/ if that environment variable is set).

A single mnemonic derives an EVM address at the standard m/44'/60'/0'/0/0 path — that's the address you fund with USDC on Base.

Import an existing wallet

If you have a wallet you already use elsewhere (MetaMask, a hardware signer export, etc.), run:

npx x402-proxy setup

and choose the import option, or set the corresponding environment variable before any other command:

export X402_PROXY_WALLET_MNEMONIC="word1 word2 …"# OR a bare EVM private keyexport X402_PROXY_WALLET_EVM_KEY="0x…"

Environment variables take precedence over the stored wallet.json.

Security: treat wallet.json like any other secrets file. It lives in your home directory in plaintext by default. For high-value wallets, use the env-var path with a secrets manager (1Password CLI, pass, a KMS plugin, etc.) so the key is only in memory during sessions.

3. Fund your wallet

Your x402-proxy wallet needs USDC on Base to pay for indie.money services.

  • Testnet (chain 84532, Base Sepolia) — ask the AI assistant to get test tokens for your address, then swap USDC to InUSD (see the AI assistant guide). Your x402-proxy address behaves exactly like any other indie.money wallet.
  • Production (chain 8453, Base) — send real USDC to your x402-proxy address. Then swap a portion to InUSD through the marketplace as usual.

Check your address and balances at any time:

npx x402-proxy wallet

View payment history:

npx x402-proxy wallet history

Show overall status (config + balances + recent spend):

npx x402-proxy status

4. Use it

Once the proxy is configured, your AI assistant uses indie.money's tools exactly as documented in the AI assistant guide — with one difference: skip the create-wallet / import-wallet / export-wallet steps. Your wallet lives in x402-proxy, not on the platform.

You never pass a wallet-key parameter. When your assistant calls a paid tool, the proxy:

  1. Forwards the call to indie.money's MCP.
  2. Receives the payment challenge.
  3. Signs the payment locally with your wallet.
  4. Forwards the signed call back to indie.money.
  5. Returns the final result to your assistant.

Your AI sees a normal tool result. Your private key stayed on your machine the whole time.

Example prompts

Same as the convenience flow — just drop any mention of a wallet key:

"Browse the indie.money marketplace on chain 8453."

"Buy a Listing Pass on chain 8453."

"Register a weather service at $0.05 per execution on chain 8453."

"Run webhook a1b2c3d4 with input {\"city\":\"Paris\"}."

5. Smoke-test your setup

Before relying on the proxy with real funds, verify the wiring end-to-end with a single low-cost call. On testnet:

  1. Fund your x402-proxy wallet with test tokens. Ask your AI:

    "Get test tokens for this address on chain 84532: 0x…<your x402-proxy address>."

    Then swap a few dollars of USDC to InUSD by asking:

    "Request an InUSD swap for $5 worth of USDC from 0x…<your x402-proxy address> on chain 84532, and give me the payment requirements."

    Your AI will return the payment requirements; x402-proxy will sign the actual swap on retry.

  2. Buy a Listing Pass to exercise the full paid flow:

    "Buy a Listing Pass on chain 84532."

  3. Your AI should report success with a transaction hash. Behind the scenes, indie.money's MCP returns a settlement receipt and x402-proxy surfaces it. You can also verify directly:

    npx x402-proxy wallet history

    A successful smoke test shows: your wallet address, one outgoing payment of ~$2.99 InUSD for the Listing Pass, and a transaction hash you can look up on Base Sepolia Explorer.

If any step fails, see Troubleshooting below.

6. Verify what you're spending

Every payment x402-proxy makes is logged locally:

# Show spend summarynpx x402-proxy status# Full payment historynpx x402-proxy wallet history

Use --verbose on any command to see the full payment negotiation:

npx x402-proxy --verbose wallet

Operational notes

Key rotation and export

# Export the EVM private key (hex) for use in another toolnpx x402-proxy wallet export-key evm# Export the seed phrasenpx x402-proxy wallet export-key mnemonic

Outputs go to stdout — pipe them into a secrets manager, never paste them into a chat window.

Running multiple wallets

Use the -c <dir> flag to point x402-proxy at an alternate config directory:

npx x402-proxy -c ~/.config/x402-proxy-staging/ status

Each directory holds its own wallet.json. Useful for separating testnet from production, or keeping per-project wallets.

Force a specific chain

npx x402-proxy --network base   # mainnet

Troubleshooting

The tool list doesn't appear in my AI client. Restart the client after editing the config. Check the client's logs for the stdio handshake.

The proxy prompts for a wallet every run. It can't find wallet.json. Either run npx x402-proxy setup once (the wizard needs an interactive terminal — don't run it from inside the AI client), or set X402_PROXY_WALLET_MNEMONIC / X402_PROXY_WALLET_EVM_KEY in the environment your AI client launches with.

Payments fail with "insufficient balance". Fund the address shown by npx x402-proxy wallet with USDC on the chain you're using, then swap a portion to InUSD through the marketplace. On testnet, ask your AI for test tokens first.

A call returns a payment-required error that looks unhandled. Make sure your config uses "command": "npx" + "args": ["-y", "x402-proxy", "mcp", "<url>"] — pointing the AI client directly at https://…/mcp bypasses the proxy entirely and gives you the raw unsigned response.

Your AI says "buyer is required when payment-signature is present". Your indie.money endpoint is on an older release that requires the buyer field explicitly. Current releases derive the buyer from the signature — upgrade to the latest staging or production URL.

Calls work but you don't see a transaction hash. Only real-payment tools emit a settlement receipt (e.g. purchase-service, execute-service, swap-tokens, fund-budget, purchase-pass). Identity-only actions like register-webhook complete without an on-chain settlement and have no tx hash to report.

Production checklist

  • Configure x402-proxy before connecting your AI client to mainnet endpoints.
  • Verify with npx x402-proxy wallet that the address shown is the one you funded.
  • Keep wallet.json (or the env-var source) under the same protection as any other production secret.
  • Never paste the output of wallet export-key into a chat or ticket.
  • Monitor wallet history periodically — every payment is logged locally with timestamp, amount, recipient, and tx hash.

See also