v0.1 — Beta

Prerequisites

  • An MPPPal operator account — request access here
  • Your operator API key from the dashboard
  • USDC to fund your first agent wallet (testnet USDC available on devnet)
Two paths. This quickstart covers both the TypeScript SDK and the raw REST API. Both are supported; the SDK is recommended for production agent code.

Step 1 — Install the SDK

bash
npm install @mpppal/sdk

Set your API key as an environment variable. Never hardcode credentials in source.

bash
export MPPPAL_API_KEY="mpk_live_..."

Step 2 — Provision an agent wallet

Each AI agent gets its own wallet — a Program Derived Address (PDA) on Solana with an associated USDC token account and an on-chain spending policy. One API call.

typescript
import { MPPPal } from "@mpppal/sdk";

const client = new MPPPal({ apiKey: process.env.MPPPAL_API_KEY });

const wallet = await client.accounts.create({
  name: "research-agent-prod",
});

console.log(wallet.account_id);        // acct_01j8k4x9p2qrst7yz
console.log(wallet.solana_address);    // 9xTz4KqR8mYvPn3Sd...
console.log(wallet.usdc_token_account); // Fund this address with USDC

Or via the REST API:

bash
curl -X POST https://api.mpppal.com/v1/accounts \
  -H "Authorization: Bearer $MPPPAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "research-agent-prod"}'
json
{
  "account_id": "acct_01j8k4x9p2qrst7yz",
  "name": "research-agent-prod",
  "solana_address": "9xTz4KqR8mYvPn3SdFgHj6WbCeAuLo1XkQi5NtZpMwV",
  "usdc_token_account": "7mZp2VbQnXeYjLo9KrTzFdCgWqA3ShNkRi4UwPtMxHs",
  "balance_usdc": "0.000000",
  "status": "active"
}

Step 3 — Set a spending policy

Set policy before you fund the wallet. An unfunded wallet with no policy is harmless. A funded wallet with no policy has no limits.

typescript
await client.policy.update(wallet.account_id, {
  max_single_transfer: 5,         // No single payment over $5 USDC
  max_daily_spend: 50,            // $50/day cap
  categories: ["inference", "data"], // Only inference and data providers
  require_memo: true,
  paused: false,
});
Start restrictive. You can always expand limits based on observed behavior. It is much harder to recover USDC that an agent sent to the wrong address because the daily cap was set too high.

Step 4 — Fund the wallet

Send USDC to the usdc_token_account address returned in step 2. This is a Solana SPL token account — fund it with USDC only. Do not send SOL to this address.

SPL address, not SOL address. Fund the usdc_token_account, not the solana_address. They are different. Sending SOL to a USDC token account results in unrecoverable funds.

Confirm the balance:

typescript
const { balance_usdc } = await client.accounts.getBalance(wallet.account_id);
console.log(`Balance: $${balance_usdc} USDC`);
// Balance: $50.000000 USDC

Step 5 — Make a payment via MPP

Wrap the SDK's HTTP client around your agent's outbound calls. MPPPal intercepts HTTP 402 responses, resolves the payment challenge, and retries the request — no changes to your agent's logic.

typescript
import { MPPPal } from "@mpppal/sdk";

const agent = new MPPPal.Agent({
  wallet: wallet.account_id,
  apiKey: process.env.MPPPAL_AGENT_KEY, // agent-scoped key, not operator key
});

const http = agent.createHttpClient();

// This call may return HTTP 402 — MPPPal resolves it automatically
const result = await http.post("https://api.someservice.xyz/inference", {
  prompt: "Summarize Q3 earnings calls",
});

// Payment settled on Solana. Receipt available in transaction history.
console.log(result.data);
Done. The payment resolved the HTTP 402 challenge, the service returned the response, and the receipt is queued for on-chain settlement on Solana. Verify it at GET /v1/accounts/:id/transactions.

Step 6 — Make a direct transfer (optional)

For direct agent-to-agent or agent-to-service transfers that don't use MPP, use the Transfers API. Every transfer requires a unique idempotency_key.

typescript
const transfer = await client.transfers.create({
  from: wallet.account_id,
  to: "acct_02k9...",             // another MPPPal account or raw SPL address
  amount: "12.50",
  memo: "Task reward: compute-88",
  idempotency_key: "task-88-reward-2026-04-13",
});

console.log(transfer.status);       // "settled"
console.log(transfer.tx_signature); // Solana tx signature

Next steps