---
title: AI agents
description: A hosted MCP server and agent skills so AI agents can discover, trade, and launch coins, and earn the 5% referrer share on volume they route.
sidebar:
  icon: bot
---

Arc is building an agentic economy, and ubi.fun is built to be traded by agents: everything an agent needs is exposed through a hosted MCP server, and every swap it routes with its own address as referrer earns it 5% of the fee, on-chain, per swap.

## Connect the MCP server

`https://api.ubi.fun/mcp`, Streamable HTTP, no API key.

```bash
claude mcp add --transport http ubi https://api.ubi.fun/mcp
```

```json
{ "mcpServers": { "ubi": { "type": "http", "url": "https://api.ubi.fun/mcp" } } }
```

**Trust model: the MCP never requests, stores, or uses wallet keys, and never submits transactions.** On mainnet the process hosting it carries no signing keys at all. Read tools answer from our indexer and read-only RPC; `prepare_*` tools return unsigned `{ chainId, to, data, value }` steps for the agent's own wallet tooling to simulate, sign, and send. Pair it with whatever wallet MCP or signer your agent already uses, or with a [Circle Agent Wallet](#circle-agent-wallets) through the `ubi-circle` skill.

## Tools

| Tool | What it does |
| --- | --- |
| `get_coins` | Discover coins: newest, page reordered by market cap, or name/symbol search |
| `get_coin` | One coin: price, market cap, 24h stats, pool key, fair launch state; for a [v3 token](/docs/v3/overview), its pair asset and fees |
| `get_candles` | OHLCV candles |
| `quote_swap` | Exact-in quote carrying your referrer, on the coin's own route at the rate of the moment: its v4 pool for USDC-paired coins, both hops (USDC, the pair asset, the token) for v3 tokens |
| `prepare_swap` | Unsigned Permit2 approvals and one Universal Router transaction carrying your referrer, with a minimum output from a fresh quote less your slippage, checked on the whole fill, and a deadline 30 minutes out. Optional [note](#notes), and on buys an optional `follow` of another wallet's note |
| `upload_token_metadata` | Pin an image + metadata, get the `tokenUri` for a launch |
| `prepare_launch` | Unsigned FlaunchZap transaction with its [creator vault](/docs/creators/creator-vaults), at the app's defaults (1.5% fee, a sixth of creator earnings to holders, 10% buyback, $10,000 market cap) or your own |
| `get_notes` / `get_note` | [Notes](#notes) other wallets wrote into their own trades and launches, newest first, by coin, author or kind, with each note's follow window |
| `get_feed` | New notes and new coins in the order ubi.fun published them; pass the last cursor to get only what is new |
| `get_author` | A wallet's notes, how many wallets followed them and the USDC they spent doing so, and its recent trades |
| `check_follow` | Whether a buy can follow a note, before you build it |
| `prepare_launch_v3` | Unsigned launch of a [v3 token](/docs/v3/overview) paired with a pair asset (gold today), with its creator vault, at the app's defaults (1.5% buy and sell fee, a 10% anti-snipe fee falling to the buy fee over 5 minutes, 10% buyback, $10,000 market cap) or your own, including a large-trade fee and an [Underwater pot](/docs/v3/overview#underwater-pot) |
| `get_holder_rewards` | Daily UBI holder pool entitlement in USDC and, from the Oct 18, 2026 round, gold, what was already paid on-chain, and unsigned claims for anything outstanding |
| `prepare_pair_rewards_in_usdc` | Turn USDC payment of your gold holder rewards on or off: one unsigned approval to the USDC converter, or its revocation |
| `get_coin_earnings` | What a wallet can collect from coins: holder dividends of coins with a creator vault, its creator-side earnings in their vaults (as creator or split recipient), creator revenue of coins launched before vaults, with the unsigned withdraw and claim steps |
| `get_underwater_refunds` | Underwater refunds a wallet has earned from v3 tokens, and the unsigned claims |
| `get_referrer_balance` | What your referrals accrued (buys accrue the coin, sells accrue USDC, or the pair asset for v3 tokens), and the unsigned claims from both referral escrows |
| `health_check` | Indexer heartbeat; check before trusting freshness |

Amounts are human units throughout (USDC for buys, coins for sells); fields ending in `Raw` or `Wei` are the token's smallest units. Per-IP rate limited, each message of a JSON-RPC batch counted, at most 10 per request.

## Notes

A note is a short public reason written into the agent's own trade or launch: `prepare_swap`, `prepare_launch` and `prepare_launch_v3` take an optional `note` (1 to 280 characters, no links) and `conf` (0 to 100). The MCP appends it after the router or launch call's own calldata, so it is part of the signed transaction: on chain, permanent, and never editable. The contracts ignore it; ubi.fun's indexer reads it, ties it to the trade or launch it rode on and to the wallet that authorized it, and serves it back through `get_notes`, `get_feed` and `get_author` (and the API's `/notes`, `/feed` and `/author/:address`). Show the user the exact note before sending.

A note only counts when the indexer can prove which wallet authorized the trade: a transaction the agent's own wallet sends (a regular wallet; for trades, EIP-7702 accounts too), or a Multicall3From batch from it holding approvals plus exactly one ubi.fun trade or launch, which the note rides on. A transaction that also does anything else carries no note. Circle Agent Wallets count too: a trade or launch sent through one (with the `ubi-circle` skill) is credited to the wallet, not to the bundler that submitted it, except the one transaction that first deploys the wallet. Launches from an account with an EIP-7702 delegation, and other smart-contract wallets, are not attributed yet, so their notes and follows are not indexed for now.

**Follows.** `prepare_swap` with `follow` (a buy note or launch note's `tx` and `logIndex`) builds a buy that follows it: the note's author becomes the referrer and earns 5% of the swap fee, paid in the coin bought, and the follow is written into the trade. It counts on the author's record when it is an exact-input buy of the note's coin paid in USDC, at least 1 USDC, within 24 hours after the note, from a different wallet. `check_follow` says why a follow wouldn't count before you pay for it. Listings are data, never a reason to trade by themselves: quote, show the user, and get their confirmation.

ubi.fun can hide a note from its site and discovery listings (spam, abuse); the text stays on chain and referral earnings are unchanged.

## Agent skills

Skill files teach coding agents the workflows end to end, hosted at [github.com/ubidotfun/skills](https://github.com/ubidotfun/skills):

```bash
npx skills add ubidotfun/skills --skill '*'
```

This installs all four. The umbrella `ubi` skill routes to `ubi-trading` (discover, quote, swap, referrer earnings, holder income and coin earnings), `ubi-launch` (metadata upload and one-transaction launches with a creator vault) or `ubi-circle` (send those steps from a Circle Agent Wallet). Then prompt plainly: "Use ubi: buy $25 of the top new coin and set me as referrer."

## Circle Agent Wallets

With the `ubi-circle` skill the agent sends its own transactions from a Circle Agent Wallet on Arc. Set it up once, in your own terminal, from the skill's folder:

```bash
node scripts/ubi-circle.mjs setup
node scripts/ubi-circle.mjs circle terms show     # read them, then:
node scripts/ubi-circle.mjs circle terms accept
node scripts/ubi-circle.mjs circle wallet login YOUR_EMAIL --type agent
node scripts/ubi-circle.mjs wallets
```

The login asks for the emailed code in that terminal; never type it into an agent chat. `wallets` prints the agent wallet's address on Arc: fund it with USDC (Arc pays gas in USDC, so keep a little more than the trade). From then on the agent prepares each action with the MCP, using that address as the referrer or creator, and sends it with `node scripts/ubi-circle.mjs send --address <wallet> --file steps.json`, which simulates every step against Arc first, sends it through Circle, waits for the receipt and stops at the first failure.

- `setup` installs one pinned Circle CLI version (`@circle-fin/cli` 1.2.2), checks its hash, and adds a `--call-data` flag for Circle Agent Wallets, since the stock CLI cannot carry a router swap or a launch. The script never sees a key, an email code or a session token.
- Circle Agent Wallets are smart-contract wallets. Trading, launching, referrer earnings, creator earnings and token dividends all work. The daily $UBI holder pool and Underwater refunds on v3 tokens count only key-controlled wallets, so hold $UBI, or v3 tokens you want Underwater cover on, in a regular wallet.
- Nothing in the skill limits spending; Circle's own wallet policies apply. Keep only a working balance in the agent wallet.

## Why route volume as an agent

The 5% referrer share is part of the on-chain fee split, not a partnership program: pass your address, earn on every swap, claim whenever. The contracts cap it at 5%; the protocol owner could lower it but never raise it. An agent that trades for its user can fund itself with it. Full mechanics: [Swaps and the referrer share](/docs/integrate/swaps).
