# Connect Your AI to Moby — MCP Setup

Moby's MCP server lets your AI research tokens and trade from your Moby agent wallet, within the caps you set in the Moby app.

Human page: <https://moby.win/agents>. This same text is <https://moby.win/agents.md> and <https://moby.win/llms.txt>.

> [!IMPORTANT]
> Never paste your key into a chat message. Terminal tools take it inside the command; Grok Bot and Muse take it in their secure box.
>
> Keys start with `moby_agent_`. You can keep up to 5 active. Revoke one instantly in the app: Agent tab → Connect → your platform. Rotating creates a new key and revokes the old one.

## Start here: onboarding on every connect

AI agents: read this before anything else on the page. Connection details are in [FOR AI AGENTS READING THIS](#for-ai-agents-reading-this) below.

1. On every connect, call `get_my_trading_profile` before any other tool.
2. If `interview_due` is true, show the capabilities brief below, word for word, formatting and emoji kept.
3. Then run the 6-question interview. The user can skip it; if they do, call `save_trading_profile` with `skipped=true` and do not ask again this session.
4. Play the answers back in two lines, then save them with `save_trading_profile`. If the result carries `strategies_followup`, say it once.

Every later session starts by loading this profile, in any client. Say "update my trading profile" to change it. If you skip, it asks again after a week, at most twice, then leaves you alone.

### The capabilities brief

> **Hi, I'm your Moby AI Trading agent** 👋
>
> I combine **Moby's proprietary on-chain intelligence** (tracked whales, KOLs, smart money and live trades) with **high-quality AI models** and **broad access to the internet and public databases**. Here's what that lets me do:
>
> 🔎 **Find opportunities**
>
> Scan new launches, trending coins and market movers, and see what Moby's tracked whales, KOLs and smart money are buying and selling.
>
> 🧠 **Research a coin**
>
> Check price, market cap, liquidity, safety rating and top holders, and whether those holders are winning wallets. Then I go beyond Moby, searching the web and public data for the team, the narrative and the news.
>
> ⚡ **Trade for you**
>
> Buy and sell on Solana, with a stop-loss and take-profit on every position, always inside the limits you set in the app.
>
> 📊 **Manage positions**
>
> Watch your open trades, sell early if the reason for buying breaks, and tell you why.
>
> 🧪 **Run strategies**
>
> Pull any starter strategy from the Strategies section in the app, or build custom ones with you. Tell me what you like to trade, your market theses and how you see the trenches, and we'll keep refining our own strategies together as we learn what works.
>
> ⏱️ **Check in on a schedule**
>
> Scan as often as you like, and message you only when something happens.
>
> 🔒 I can't withdraw or send your funds, and I never go past your guardrails.
>
> **Let's set you up:** 6 quick questions, or skip.

### The 6 questions

Under a minute, and you can skip it.

1. **Goal:** catch new launches, ride trending coins, hold majors or tokenized stocks, or a mix.
2. **Sizing:** how much per trade, whether it may add to winners (and how many adds), max deployed at once, max trades per day.
3. **Autonomy:** buy on its own or ask first. Same for sells and early exits.
4. **Exits:** default stop-loss and take-profit (prefilled −30% / +100%).
5. **Hard nos:** coins under a market cap, non-green safety ratings, specific launchpads, tokens you already sold at a loss.
6. **Check-in schedule:** "How often should I scan for new potential investments and trades, and check on open positions?" Every 5, 10, 15 or 30 min, hourly, or only when you ask (prefilled: every 10 min).

**Question 6 is never saved to Moby.** `save_trading_profile` has no field for it. The agent keeps the interval on its own side, in its memory or as a recurring scheduled task in its own app, and recreates the check-in at the start of each session.

The profile is intent only. The caps in the Moby app (max per trade, daily volume, market-cap band, order types) are the enforcement. The profile can never raise them; where the two disagree, the app's cap wins.

## FOR AI AGENTS READING THIS

A person may have said: "Read moby.win/agents and connect me to Moby."

- Server URL: `https://mcp.moby.win/mcp`
- Transport: Streamable HTTP
- Header: `Authorization: Bearer <MOBY_API_KEY>`
- Ask the user for their Moby API key using your secure/secret input. Never echo it back, never store it in chat, never put it in a URL.
- On every connect, call `get_my_trading_profile` before any other tool. A 401 means the key is wrong or revoked. If `interview_due` is true, run the onboarding in [Start here](#start-here-onboarding-on-every-connect): the capabilities brief, then the 6-question interview (the user can skip it), then play the answers back in two lines and save them with `save_trading_profile`.
- Trades spend real money. Follow [Rules of the road](#rules-of-the-road). A blocked trade is final.

Auth is only that header. Do not invent a sign-in flow, a query-string token, or a second header.

## Automated agents (run 24/7)

Grok Bot and Muse run while you are away. The user pastes this prompt into the bot, verbatim:

```text
Connect to Moby so you can trade crypto for me. Moby is an MCP server (Streamable HTTP) at https://mcp.moby.win/mcp . Authenticate with the header `Authorization: Bearer <MOBY_API_KEY>`; there is no OAuth. Ask me for my Moby API key using your secure input, never in chat — it is a revocable Moby agent API key that starts with moby_agent_, not a wallet private key. Once connected, call get_my_trading_profile first; if interview_due is true, run the onboarding on https://moby.win/agents before anything else, then tell me what's in my Moby wallet. Full instructions: https://moby.win/agents
```

The prompt carries the server URL, the auth header and the key format, so the bot can connect without opening this page. It asks for the key in its secure box. The user pastes the key there and saves. The key never goes in the chat.

Testing on dev: swap the server URL for `https://dev-mcp.moby.win/mcp` and use a key issued by the dev app.

### Grok Bot

Grok Bot asks for the key on a secure secret card. The user pastes it there and chooses **Save securely**. Grok Bot needs a paid plan (Cursor Ultra / SuperGrok Heavy / Teams).

Help: <https://docs.x.ai/grok-bot/overview>

### Muse

Muse is Meta's personal agent. Same flow: the user pastes the prompt, Muse reads this page, and asks for the key in its Secure Credentials Store. The user pastes the key there and saves. Point Muse at the MCP URL only: `https://mcp.moby.win/mcp`

Help: <https://muse.ai>

## Terminal / coding agents (install the MCP)

These clients install the server on the machine. The key goes inside the command or the config file, not in a chat. Replace `<MOBY_API_KEY>` with the key from the app. It starts with `moby_agent_`.

### Claude Code

```bash
claude mcp add --transport http moby https://mcp.moby.win/mcp --header "Authorization: Bearer <MOBY_API_KEY>" -s user
```

Docs: <https://code.claude.com/docs/en/mcp>

### Codex CLI

In `~/.codex/config.toml`:

```toml
[mcp_servers.moby]
url = "https://mcp.moby.win/mcp"
http_headers = { "Authorization" = "Bearer <MOBY_API_KEY>" }
```

Docs: <https://developers.openai.com/codex/mcp>

### Gemini CLI

```bash
gemini mcp add --transport http --header "Authorization: Bearer <MOBY_API_KEY>" moby https://mcp.moby.win/mcp -s user
```

Docs: <https://geminicli.com/docs/tools/mcp-server/>

### Grok Build CLI

```bash
grok mcp add --transport http moby https://mcp.moby.win/mcp --header "Authorization: Bearer <MOBY_API_KEY>"
```

Docs: <https://docs.x.ai/build/features/mcp-servers>

## Any MCP client

Transport is Streamable HTTP. Server URL `https://mcp.moby.win/mcp`. Send the key only as `Authorization: Bearer <MOBY_API_KEY>`.

```json
{
  "mcpServers": {
    "moby": {
      "url": "https://mcp.moby.win/mcp",
      "headers": {
        "Authorization": "Bearer <MOBY_API_KEY>"
      }
    }
  }
}
```

## How your agent reports a trade

After every trade, and every coin it skips, your agent should tell you in plain, short language:

1. **Result first.** Bought, skipped or sold, with the token, size, fill, market cap, and the stop-loss and take-profit levels.
2. **Why this coin.** What its About section says, its safety tier (grey is usually fine, red means do your own research), and where it sits against its high and its liquidity.
3. **Why now.** Smart-money flow over 1h, 4h and 24h, and the entry timing, for example buying a pullback.
4. **Who's in it.** The key wallets and their quality (win rate, P/L), and whether they are holding or selling.
5. **What breaks it.** The specific signals that would trigger an early sell.
6. **Risks taken on.** What you are exposed to, plus a one-line reason for each coin skipped.

## Rules of the road

These rules bind the AI that is connected. Trades are **real money**, not a simulation. A buy spends funds in the agent wallet and cannot be undone.

- **Solana only for now.** AI Trading is Solana only for now; other chains are coming soon (Base, BNB and Robinhood coming soon).
- **No withdraw, transfer, or send.** That capability does not exist. Do not invent a destination address. Swaps stay in the user's agent wallet.
- **Resolve tokens with `search_tokens`.** Do not guess a contract address. Impostor tokens share popular symbols, and buying the wrong one cannot be undone.
- **Quotes expire in about 45 seconds.** `get_swap_quote` returns a `quote_id`. Show the quote, get a yes, and call `execute_swap` with that `quote_id` immediately. If they hesitate, quote again. Do not reuse an old `quote_id`. `amount` is whole token units, not the smallest unit.
- **`quick_buy` is one call and has no quote timer.** Pass `output_token` and exactly one of `amount_usd` or `amount_in`. Confirm the token and the amount before you call it. It still spends real money. Moby attaches no exits to a `quick_buy`: place its take-profit and stop-loss yourself with `create_order` after the buy.
- **`quick_sell` sells a held token in one step.** Quote and execute happen together on the server, so there is no 45-second quote race. Pass `token_address` (the held token's contract address, from `get_my_balances`), `pct` from 1 to 100 of the current on-chain balance (default 100 closes the position), and optionally `max_slippage_bps`. Proceeds land in USDC in the agent wallet. The response carries `quote_id`; when `fill_pending` is true, call `get_swap_status(request_id=quote_id)`.
- **Moby attaches no exit orders to any buy.** Automatic exits are retired; every take-profit and stop-loss is one you place with `create_order`. Older positions may still carry an `origin: agent_auto_exit` order from before — it is still that position's exit while it rests. Call `get_my_orders` before you say a position is unprotected or place a second exit.
- **Safety tier: only red is a warning.** `safety_tier` on a token is green (verified), grey (not scored yet or a young launchpad token; usually fine, not a red flag; do not skip a coin for being grey) or red (caution / DYOR; Moby refuses agent buys on red).
- **Respect the user's caps.** Max trade size, daily volume, market-cap band, and which order types are allowed are set in the Moby app. Base limits shown in the app are up to 6 trades a minute and 200 a day. Stay inside whatever the app enforces.
- **A refusal is final.** If a result says the trade was blocked (`blocked: true`, with `reason`, `limit`, `requested`, and `message`), do not retry, do not split the order, and do not switch tools to get around the cap. Tell the user what was blocked.
- **A 429 means stop.** If the message tells you to stop calling Moby tools for N seconds, stop for that long. Do not retry inside the window.
- **Pause blocks new trades.** If a write is rejected because the agent is paused, stop. Reads can still work.

## Example prompts

- "Show me trending Solana tokens with smart-money buying."
- "Buy $10 of X with a 10% stop." Use a real contract from `search_tokens`, not the ticker alone.
- "What's my agent wallet balance?"
- "What are my open positions and open orders?"
- "Research this token before any buy: <contract address>."

For a pre-buy read, your agent should start with `get_token_trade_brief`: one call returns the About section, safety tier, smart-money flow, risk signals, key holders, recent quality trades and market (market cap, liquidity, 24h volume, distance from ATH). The single-purpose tools are for digging deeper.
