Developer API · MCP

Order by API or AI agent

Connect any MCP-capable AI agent (Claude, Cursor, …) or your own app to BM Store and place orders programmatically. Browse the live catalog, check your balance and buy — every purchase is paid from your store wallet and delivered the same way as on the site.

Base URL https://metabmstore.com/api/mcp · JSON-RPC 2.0 over MCP Streamable HTTP · auth via a personal agent token.

Quick start

1
Create an account & top up
Sign in at the store and fund your wallet (USDT or card). Orders draw from this balance.
2
Generate your agent token
On the wallet page, open “Buy with your AI agent”Generate. You get a token (aat_…) and a one-line prompt.
3
Connect & buy
Paste the one-line prompt into your agent, or add the MCP server config below. Your agent can now order automatically.

1 · Connect

Authenticate with Authorization: Bearer aat_… on every request. The token is brand-scoped and spends only your wallet — rotate it anytime by generating a new one.

One-line prompt for an AI agent
Shop for me on BM Store through its MCP server. Connect to https://metabmstore.com/api/mcp (MCP, Streamable HTTP) and send the HTTP header "Authorization: Bearer aat_YOUR_TOKEN" on every request. Tools: list_products(platform?, search?, limit?), wallet_balance(), buy_asset(productId, reference, expectedTotal, qty?, discountCode?), order_history(). To buy: call list_products to find the item, wallet_balance to confirm I have funds, then buy_asset with its productId. Orders remain pending until delivery is recorded. Reuse the same reference after a timeout; do not create a second purchase. Buy exactly what I ask for, confirm the total first, then report the order id and status. Retrieve delivered details from the private wallet page.
MCP server config (Claude Desktop / Cursor)
{
  "mcpServers": {
    "metabmstore": {
      "url": "https://metabmstore.com/api/mcp",
      "headers": {
        "Authorization": "Bearer aat_YOUR_TOKEN"
      }
    }
  }
}

2 · Tools

list_products(platform?, search?, limit?)

Browse the live catalog. Each item returns its id, name, category, platform, price (USD), delivery type and stock status.

platformFilter by platform, e.g. Facebook, Instagram, TikTok, Telegram.
searchCase-insensitive match on name or category.
limitMax items (default 50, max 200).
Returns { count, products: [{ id, name, category, platform, price, delivery, inStock }] }
wallet_balance()

Your wallet balance in USD. available funds buying; manual orders move funds to frozen escrow until delivered.

Returns { email, currency, available, frozen }
buy_asset(productId, reference, expectedTotal, qty?, discountCode?)

Place an order, paid from your wallet. Funds are held until delivery. Unstarted supplier purchases expire after 24 hours. Never charges more than the shown total.

productIdRequired. The id from list_products.
referenceRequired. Stable unique order reference; reuse on retry.
expectedTotalRequired. Maximum customer-authorized USD total.
qtyQuantity (default 1).
discountCodeOptional promo code.
Returns { ok, total, reference, orders: [{ orderId, name, qty, price, delivery, status, asset? }] }
order_history(limit?)

This store’s recent orders with status and amount, plus a private wallet link for delivered details.

limitMax orders (default 20, max 100).
Returns { count, walletUrl, orders: [{ id, amount, status, product, delivery, createdAt }] }

3 · Examples

Browse the catalog
curl -X POST https://metabmstore.com/api/mcp \
  -H "Authorization: Bearer aat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"list_products","arguments":{"platform":"Facebook","limit":5}}}'
{
  "count": 2,
  "products": [
    { "id": 31, "name": "Facebook Account", "category": "Facebook Accounts",
      "platform": "Facebook", "price": 14.99, "delivery": "auto", "inStock": true },
    { "id": 18, "name": "Reinstated Business Manager (3-6 months)", "category": "Business Managers",
      "platform": "Facebook", "price": 18.84, "delivery": "auto", "inStock": true }
  ]
}
Place an order
curl -X POST https://metabmstore.com/api/mcp \
  -H "Authorization: Bearer aat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
       "params":{"name":"buy_asset","arguments":{"productId":31,"qty":1,"reference":"my-order-unique-001","expectedTotal":50}}}'
{
  "ok": true,
  "total": 14.99,
  "reference": "…",
  "orders": [
    { "orderId": "…", "name": "Facebook Account", "qty": 1,
      "price": 14.99, "delivery": "auto", "status": "pending" }
  ]
}

Delivery & wallet

  • Auto delivery — fulfillment runs after the order is reserved. Funds stay held until delivery is verified.
  • Manual delivery — staff fulfill the reserved order. Check the order status and private wallet page for delivered details; a pending status does not confirm delivery.
  • Orders are paid from available wallet balance. If it can't cover the order you get insufficient_balance — top up and retry.
  • Stock is live; sold-out items return an error rather than overselling.

Errors

401 / -32001Missing or invalid agent token. Send a valid Authorization: Bearer aat_… header.
insufficient_balanceWallet can’t cover the order. Top up at the store, then retry.
price_changedThe total changed since you last checked (a deal rotated). Re-read the price and retry.
coupon_invalidThe promo code no longer applies to this cart.

Security

Your agent token authorises purchases from your wallet — treat it like a password. It can only spend your available balance (never more), is scoped to BM Store alone, and is generated only from your signed-in wallet, with any required authenticator check. Tokens expire after 30 days. Generate a replacement or choose Disconnect agent access in your wallet to invalidate the current token for this store. Already placed orders remain active. Legacy tokens must be replaced once.

Generate your agent token →
👛Wallet