Skip to content
Gemini CLI

x402 Universal Payer for Gemini CLI

io.github.nirholas/x402-bridge

Pay any x402 endpoint on the open web: auto-paying bridge with Bazaar discovery and spend caps.

client:Gemini CLI transport:stdio runtime:npm

Install x402 Universal Payer in Gemini CLI

~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "x402-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/mcp-bridge"
      ],
      "env": {
        "MCP_BRIDGE_EVM_PRIVATE_KEY": "<MCP_BRIDGE_EVM_PRIVATE_KEY>",
        "MCP_BRIDGE_SVM_PRIVATE_KEY": "<MCP_BRIDGE_SVM_PRIVATE_KEY>",
        "MCP_BRIDGE_MAX_PRICE_PER_CALL_ATOMIC": "<MCP_BRIDGE_MAX_PRICE_PER_CALL_ATOMIC>",
        "MCP_BRIDGE_MAX_TOTAL_ATOMIC": "<MCP_BRIDGE_MAX_TOTAL_ATOMIC>",
        "MCP_BRIDGE_ALLOWED_PAYTO": "<MCP_BRIDGE_ALLOWED_PAYTO>",
        "MCP_BRIDGE_ALLOWED_HOSTS": "<MCP_BRIDGE_ALLOWED_HOSTS>",
        "MCP_BRIDGE_ALLOW_HTTP": "<MCP_BRIDGE_ALLOW_HTTP>",
        "MCP_BRIDGE_DISCOVER_LIMIT": "<MCP_BRIDGE_DISCOVER_LIMIT>",
        "MCP_BRIDGE_BAZAAR_URL": "<MCP_BRIDGE_BAZAAR_URL>",
        "MCP_BRIDGE_BATCH_DEPOSIT_MULTIPLIER": "<MCP_BRIDGE_BATCH_DEPOSIT_MULTIPLIER>",
        "MCP_BRIDGE_MAX_DEPOSIT_ATOMIC": "<MCP_BRIDGE_MAX_DEPOSIT_ATOMIC>",
        "X402_MCP_BRIDGE_CHANNELS_DIR": "<X402_MCP_BRIDGE_CHANNELS_DIR>",
        "RPC_URL_8453": "<RPC_URL_8453>"
      }
    }
  }
}

Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs

x402 Universal Payer in other clients