Agents and MCP
ANYONE speaks MCP (Model Context Protocol), the standard AI agents use to talk to services. There are two ways to use it:
- Connect an agent to your account. Claude, ChatGPT, Grok, Cursor or any agent that speaks MCP acts on your normal ANYONE account. It reads the live markets, quotes, and lines up positions, claims and new races; you confirm each one with a tap in Wallet. Or, when you connect it, you let it act on its own up to a limit per action and per day: then it places them right away. The agent never sees a key.
- An agent with its own wallet. A bot or an autonomous strategy brings its own wallet, registers by signing a challenge, and signs and sends its own transactions. No human in the loop. See Agents with their own wallet.
| MCP server | https://beta.anyone.market/api/mcp |
| Transport | Streamable HTTP (JSON-RPC over POST) |
| Authentication | Person's account: OAuth 2.1, handled by your agent (dynamic client registration and PKCE, no key to copy; you approve once on the "Connect … to ANYONE?" screen). Own wallet: a Bearer token obtained by signing a challenge |
| Account | Person's account: your normal ANYONE account and balance. Own wallet: the agent's own address and balance |
| Help page in the app | beta.anyone.market/agents |
In the beta
The MCP server runs on the beta: markets on Base Sepolia, testnet tokens (bANYONE) with no monetary value. The address above is the only one that exists today. See ANYONE Beta.
Quickstart: connect an agent to your account (5 minutes)
- Have an ANYONE account. Sign in once at beta.anyone.market and get testnet tokens from the faucet.
- Add the server to your agent. Paste
https://beta.anyone.market/api/mcpwhere your agent takes MCP servers (see the client list below). - Approve the connection. Your agent opens ANYONE. Log in and you will see "Connect … to ANYONE?". Pick how it acts: Ask me first (the default) or Let it act on its own, with a limit per action and per day. Approve once. If it acts on its own, your wallet signs once more to give it a key (see Acting on its own). You can change this or disconnect it from Wallet at any time.
- Ask for anything. "What races are open?", "If I put 50 on SOL in SOL vs XRP, what do I get if it wins?", "Put 50 on SOL".
- Confirm in Wallet. In Ask me first, every position, claim or new race the agent lines up waits in Wallet → From your agent until you tap Confirm. Your wallet signs and the action goes on-chain. In Act on its own, it goes on-chain right away when it fits your limits, and waits in Wallet when it does not.
Acting on its own
When you pick Let it act on its own, ANYONE makes a key for that one connection and your wallet adds it as an extra signer (one signature, gas paid by ANYONE). From then on the agent can take positions, sell, claim and create races from your account by itself:
- Within your limits it happens right away.
my_accountsayssigning: "auto"and showslimits(max_per_action,max_per_day,spent_today). A write answersexecuted: truewith the transaction. - Over a limit it waits for you. The action stays in Wallet like in Ask me first and the answer says
needs_confirmation: trueand why. A position counts its amount; a race counts its fee plus its seed; sales and claims count nothing (they bring tokens in). The day resets at 00:00 UTC. - The key stays with ANYONE. The agent never sees it, and it only ever signs ANYONE positions, sales, claims and races. The limits are kept by ANYONE's servers, not by the chain.
- Change it any time. Wallet → From your agent → the connection: Ask me first switches it back (the key stays unused), Disconnect stops it and removes the key from your wallet.
Set up your client
| Client | How |
|---|---|
| Claude (web and desktop) | Settings → Connectors → Add custom connector → paste the server address |
| Claude Code | claude mcp add --transport http anyone https://beta.anyone.market/api/mcp, then /mcp, pick anyone and authenticate |
| ChatGPT | Settings → Connectors → add an MCP server with the address |
| Grok | Add an MCP server with the address where your Grok client takes tools or connectors |
| Cursor | Add the server to .cursor/mcp.json (below), then approve the connection when Cursor asks |
Cursor:
{
"mcpServers": {
"anyone": {
"url": "https://beta.anyone.market/api/mcp"
}
}
}Any other client that supports remote MCP servers with OAuth works the same way: give it the address, approve once.
What the agent can do
Reads are live, from the backend and the chain. On a person's account, writes line up an action: nothing is placed until you confirm it in Wallet, unless you let the agent act on its own and it fits your limits. With its own wallet, the agent receives unsigned transactions and sends them itself (see below).
| Tool | What it does |
|---|---|
list_races | The races running now (for example BTC vs ETH, or a many-coin race): opens_at, betting_closes_at, betting_open, window_closes_at, the market's chance_pct for each coin, its volume, its link and the market_id to use when taking a position. include_upcoming: true adds the races in presale |
race_status | How a race is going right now: each coin's % change since the race opened (Coinbase prices), who is ahead and by how much, betting_closes_at and betting_time_left, window_closes_at and time_left. Indicative only: the official result is settled after the close |
list_markets | Every market taking positions right now (races and the rest): question, outcomes in order, chance_pct for each, betting_closes_at, window_closes_at, volume, link and the market_id. include_upcoming: true adds the markets in presale |
quote_bet | What a position would pay if its side wins, priced against the live on-chain pool: fee, payout, return %, the chance before and after, betting_closes_at, and warnings (negative_return: even a win pays back less than it costs; closing_soon). Nothing is placed |
place_bet | Person's account: lines up a position for you to confirm in Wallet and returns the link where you confirm; when it acts on its own, places it right away within your limits. Own wallet: returns the unsigned transactions to sign and send. Refused under 2 minutes before betting_closes_at (betting_closing_soon) |
sell_position | Sells a position to the market-maker vault before the close. Person's account: lined up for you to confirm, or sold right away when it acts on its own. Own wallet: unsigned transactions |
claim_winnings | Claims a resolved market you won. Person's account: lined up for you to confirm in Wallet, or claimed right away when it acts on its own. Own wallet: unsigned transactions |
create_race | A new race (which of two coins gains more over the window), only coins from the race catalog. Person's account: lined up for you to finish in the app, or created right away when it acts on its own and fee + seed fit your limits. Own wallet: unsigned transactions; report the create_market hash with report_tx to publish it. Creating costs tokens: a fee by length plus the seed |
my_account | Who the connection acts for: name, wallet, token balance and what the connection is allowed to do. For an agent with its own wallet, username and smart_wallet_address are always null: it has no profile and no smart wallet, wallet_address is the account |
my_positions | Your positions, from the chain: market, side, stake, whether each is open, won, lost or already claimed, and claimable for wins waiting to be collected. Positions you sold are not listed |
my_history | Your settled positions, with the payout and the profit or loss of each |
report_tx | Own wallet only: the one step after sending a write's transactions. Reports the hash, so the action shows as confirmed |
funding_info | Own wallet only, in the beta: gets the wallet test ETH when the gas drip is on (gas_drip), or says where to get it, with the calldata to mint test tokens on-chain |
my_pending_actions | The actions the connection lined up and what happened to them: pending, confirmed (with the transaction), rejected, expired or failed |
A market_id is the market's slug from list_markets or list_races. For a two-coin race, the tickers also work ("SOL vs XRP").
What the answers mean
When positions stop. Every market answers with betting_closes_at, in list_markets, list_races, race_status, quote_bet and place_bet: the last moment to take a position, the deadline the market has on-chain. A race goes on after it: window_closes_at is when the race ends and the result is taken (a daily race stops taking positions an hour before its 24 hours end). place_bet refuses when under 2 minutes remain (betting_closing_soon) and after the close (market_closed), and the answer says betting_closes_at and seconds_left.
Errors have a code. A failed tool has isError: true and answers JSON, as text and as structuredContent:
{ "error": "betting_closing_soon", "error_description": "Positions on this market close at …", "betting_closes_at": "2026-11-01T23:00:00.000Z", "seconds_left": 30, "min_seconds": 120 }Branch on error, show error_description. Codes include market_closed, betting_closing_soon, market_not_found, race_not_found, invalid_side, invalid_amount, insufficient_scope, too_many_pending.
Names. Fields are snake_case. Some older camelCase names stay as deprecated aliases so connected agents keep working, and they will go away:
| Deprecated | Use | Where |
|---|---|---|
marketId | market_id | list_races, race_status |
opensAt | opens_at | list_races, race_status |
closesAt | window_closes_at, or betting_closes_at for when positions stop | list_races, race_status |
chancePct | chance_pct | list_races, race_status |
timeLeft | time_left | race_status |
gapPct | gap_pct | race_status |
openPrice, changePct | open_price, change_pct | race_status coins |
closes_at | betting_closes_at (same value) | list_markets |
list_races keeps a race that has stopped taking positions until it ends, with betting_open: false. list_markets drops it at betting_closes_at.
Chance of a many-coin race. chance_pct is each coin's share of the pool on-chain.
Return can be negative. A position pays its share of the whole pool, so a large one on a small pool can pay back less than it cost even if it wins. quote_bet warns with negative_return: try a smaller amount.
Is predicting working right now?
GET https://beta.anyone.market/api/status/predictions, public and read-only, refreshed once a minute:
{
"status": "working",
"predicting_works": true,
"last_prediction_at": "2026-11-01T03:31:50.000Z",
"hours_since_last": 1.2,
"tx_hash": "0x…",
"window_hours": 6,
"chain_id": 84532,
"checked_at": "2026-11-01T04:43:00.000Z",
"basis": "…"
}It looks at the newest predictions ANYONE recorded and reads each transaction on-chain until one really emitted the market's Bought event.
status | predicting_works | Means |
|---|---|---|
working | true | A prediction landed within window_hours (6) |
no_recent_prediction | null | None did. It may just be quiet: this does not prove predicting is down |
unknown | null | The check could not read the chain or the records |
It does not tell whose prediction it was: it may be the team's. And it says a prediction went through, not that every path works: signing in with Google and with your own wallet pay gas differently.
Example prompts
- "Which races close in the next two hours, and who is ahead in each?"
- "Quote 50 on SOL in SOL vs XRP. If the return is above 60%, line it up."
- "Create a BONK vs PEPE race for one day with a seed of 100."
Agents with their own wallet
For bots and autonomous strategies that should run without a person tapping confirm. The agent brings its own wallet, signs and sends its own transactions and pays its own gas. Use "connect to a person's account" instead when a person wants their own balance played and wants the last word on each action.
The four steps
- Create a wallet. Any EOA on Base Sepolia (a fresh private key is enough).
- Register by signing a challenge.
POST https://beta.anyone.market/api/agent/register/challengewith{ "wallet_address": "0x…" }returnsmessageandchallenge_token.- Sign
messagewith the wallet (EIP-191,personal_sign). POST https://beta.anyone.market/api/agent/registerwith{ "wallet_address", "name", "challenge_token", "signature" }returnsaccess_tokenandmcp_url.
- Use the token. Send
Authorization: Bearer <access_token>on every request to the MCP server atmcp_url. - Fund the wallet. Call
funding_info. If the wallet is low on Base Sepolia ETH and the beta's gas drip is on, it sends a small amount (gas_drip.status: "sent", withtx_hash; one per wallet per day). If it answersofforlimited, use a public faucet. Then sign and send themintit returns. The contract's mint is open and has no cap;funding_infobuilds up to 1,000,000 tokens per call, so call it again for more.
How writes work in this mode
place_bet, claim_winnings and sell_position return unsigned transactions. The agent signs and sends them in order (for example approve, then buy), then calls report_tx with the hash so the action shows as confirmed in my_pending_actions. That is the one report step. POST /v2/agent/intents/{id}/report, what report_tx calls underneath, keeps working for agents that use it directly.
create_race returns the race's transactions, each with a step: approve (only when needed), create_market, then the creation fee (fee, burn). Send them in order and call report_tx with the hash of the create_market step: ANYONE reads the new market from it, publishes the race, and answers with next_transactions when the seed is above the contract's own (one equal buy per side). Those do not need to be reported.
Buying the real token
An agent that wants $ANYONE on Base: see Buy $ANYONE with your agent.
What it cannot do yet
- Finer rules. Acting on its own has two limits (per action and per day). There are no rules per market, coin or hour yet. With its own wallet the agent is limited only by its balance.
- Provide liquidity. Market maker pools exist in the app, not in the MCP server.
- Push events. No webhooks or streaming. The agent asks when it wants to know (is predicting working? can be polled).
- Mainnet. The server runs on the beta (Base Sepolia) only.
Limits
| Access token | Person's account: expires after 15 minutes, the agent refreshes it on its own. Own wallet: the token from registration |
| Pending actions | Person's account: at most 20 actions waiting for confirmation at a time, all kinds together (positions, sales, claims, races); expired ones do not count. Own wallet: no cap. Pending actions expire at the market's close (or after 24 hours) |
| Position size | 1 to 1,000,000 tokens per position (decimals allowed) |
| Requests | 120 per minute per connection on the MCP server (a batch counts each message); the answer carries X-RateLimit-Limit and X-RateLimit-Remaining, and a 429 says when to retry. Registration is limited per IP address: 10 new agents per day |
| Scopes | profile:read, offchain:create, onchain:trade |
Disconnecting
Person's account: Wallet → From your agent → Disconnect. The permission is revoked at once and the agent's pending actions expire. If it acted on its own, its key is removed from your wallet too. Own wallet: stop using the token; the wallet and its positions stay yours.