Paygent
Sign in

Connecting an AI agent

Give your agent an API key, and it can request and fund a virtual card on your behalf using USDG or ETH on Robinhood Chain.

1. Get your API key

Sign in with Google to get one.

2. Configure your MCP client

Add this to your agent's MCP client configuration:

{
  "mcpServers": {
    "paygent": {
      "type": "remote",
      "url": "https://mcp.paygent.tech/sse",
      "headers": {
        "Authorization": "Bearer pgt_live_your_api_key_here"
      }
    }
  }
}

3. Fund it

Send USDG or ETH on Robinhood Chain to your deposit address (shown on your dashboard, or returned by create_card below). Send anywhere between the minimum and maximum shown in the response — a card is issued automatically for exactly what arrives. Deposits are detected automatically, no manual step needed once funds land on-chain.

4. Tool reference

ToolPurpose
create_cardGet a deposit address; a card is issued automatically for whatever arrives
card_detailsPoll for card status; returns PAN/CVV/expiry once funded and active
card_balanceCheck just the current balance and last-four digits — no PAN or CVV, always fresh
card_transactionsList recent card transactions
close_cardClose the card, refund remaining balance to wallet
deposit_historyView on-chain deposit history
release_holdRelease any on-hold deposits to a given address
wallet_balanceCurrent USDG/ETH wallet balances
withdraw_linkGet a URL to withdraw wallet balance externally
withdrawal_historyWithdrawal history

5. Example flow

Step 1 — Request a card:

// Call: create_card
// Arguments: {}

// Response:
{
  "cardId": null,
  "depositAddress": "0x4384B5305D7d416D0f876e281b1FdF54062B4895",
  "depositQrCodeUrl": "https://.../qrcode.html?text=0x4384...",
  "minAmount": "1.00",
  "maxAmount": "20.00",
  "acceptedCurrencies": ["USDG", "ETH"],
  "message": "Send between $1 and $20 worth of USDG or ETH to this address. A card will be issued automatically for the exact amount received."
}

Step 2 — Send funds to depositAddress, then poll:

// Call: card_details
// Arguments: {}

// Response, before funding clears:
"Card creation not complete. This may be caused by insufficient top-up funds or pending payment arrival."

// Response, once funded:
{
  "cardId": "e217e507-08e0-4ead-a3b8-a6bdbba29a16",
  "pan": "4549241817900517",
  "cvv": "892",
  "expMonth": "07",
  "expYear": "2029",
  "bin": "45492418",
  "cardLastFour": "0517",
  "status": "ACTIVE",
  "balance": "5.00"
}

Step 3 — Check just the balance any time (lighter than card_details, no sensitive fields):

// Call: card_balance
// Arguments: {}

// Response:
{
  "cardLastFour": "0517",
  "balance": "1.00",
  "status": "ACTIVE"
}

Step 4 — Check wallet balance any time:

// Call: wallet_balance
// Arguments: {}

// Response:
{
  "balances": [
    { "currency": "USDG", "available": "0.00", "pending": "0.00", "frozen": "0.00", "walletId": "wal_...", "updatedAt": 1783732276771 },
    { "currency": "ETH",  "available": "0.000000", "pending": "0.000000", "frozen": "0.000000", "walletId": "wal_...", "updatedAt": 1783732304919 }
  ],
  "message": "Stablecoin wallet balances returned."
}

6. Minimal Node.js client

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";

const API_KEY = process.env.PAYGENT_API_KEY; // never hardcode this

async function main() {
  const transport = new SSEClientTransport(new URL("https://mcp.paygent.tech/sse"), {
    requestInit: { headers: { Authorization: `Bearer ${API_KEY}` } }
  });
  const client = new Client({ name: "my-agent", version: "1.0.0" }, { capabilities: {} });
  await client.connect(transport);

  const created = await client.callTool({ name: "create_card", arguments: {} });
  console.log(created.content[0].text);

  await client.close();
}

main();

Notes