Get the App

Moby · Agents · Codex

Use Moby with Codex

Your agent runs in Codex, and you manage it from your phone.

App Store Google Play

Your AI agent trades Solana tokens, including memes, majors and tokenized stocks (xStocks on Solana, like TSLAx), with your USDC, inside the limits you set.

Availability of tokenized stocks (xStocks on Solana, like TSLAx) can vary by region.

AI Trading on Base, BNB Chain and Robinhood Chain is coming soon.

This Codex MCP setup is the Codex piece of agentic trading on Moby. Codex runs the agent. The Moby app is where you set limits and revoke a key.

Add the Codex MCP server

  1. Create a key in the Moby app

    Download Moby. Open the Agent tab, tap Connect, and create a key. The key starts with moby_agent_. It links Codex to your Moby account. It is an agent API key, not a wallet private key. Do not paste it into chat. You can revoke it in the app.

  2. Store the key in an environment variable

    Export MOBY_API_KEY in the environment that starts Codex. Set it to the key itself, not the word Bearer. The block uses a placeholder. Replace the placeholder on your machine. Do not write the key into config.toml or into a chat.

    Placeholder only. Codex reads this variable and sends it as Authorization: Bearer.

    export MOBY_API_KEY="moby_agent_..."
  3. Add Moby's streamable HTTP server

    Run codex mcp add moby --url https://mcp.moby.win/mcp --bearer-token-env-var MOBY_API_KEY. That writes ~/.codex/config.toml. The table is mcp_servers.moby. url is https://mcp.moby.win/mcp. bearer_token_env_var is MOBY_API_KEY. Codex sends the header Authorization: Bearer moby_agent_... using the key from that variable.

    Copy this into ~/.codex/config.toml. This is the streamable HTTP form from the Codex config docs.

    [mcp_servers.moby]
    url = "https://mcp.moby.win/mcp"
    bearer_token_env_var = "MOBY_API_KEY"

    Or let the CLI write that table. The key stays in the environment, not in the command.

    codex mcp add moby --url https://mcp.moby.win/mcp --bearer-token-env-var MOBY_API_KEY

    A static Authorization header is also in the Codex docs. Prefer the environment variable so the key is not stored in the file. If you use the static header, keep the placeholder. Do not paste a real key.

    Static header. Placeholder only.

    [mcp_servers.moby]
    url = "https://mcp.moby.win/mcp"
    http_headers = { "Authorization" = "Bearer moby_agent_..." }
  4. Confirm Codex sees the server

    Run codex mcp list. In the Codex terminal UI, type /mcp. The Codex CLI, the IDE extension, and the ChatGPT desktop app read the same ~/.codex/config.toml. You can also add the server under Settings, then MCP servers, and restart.

Codex documents this in the MCP guide, the config reference, the sample config, and the CLI reference. The --url and --bearer-token-env-var flags are the streamable HTTP add command in the Codex CLI source.

Link your account and set limits

You set your agent's limits on max per trade, daily buy volume and market-cap range from the Moby app, and Moby checks them server-side on every buy. The agent trades Solana only, funded with USDC. There are no withdrawals through MCP.

The key from the Agent tab, Connect, is what links Codex to your Moby account. On first connect, Codex should call get_my_trading_profile and follow the onboarding on the agents page. Revoke the key there to turn it off. A profile saved by Codex cannot raise the app limits.

Install Codex skills

Codex skills are folders with a SKILL.md file. The file starts with a name and a description. Codex loads them from a repo (.agents/skills, from the current directory up to the repo root), from your user folder ($HOME/.agents/skills), from /etc/codex/skills, and from skills bundled with Codex. Mention one with $ in the CLI or IDE, or run /skills. Codex can also choose a skill when the task matches its description. A new folder is picked up on its own; restart Codex if it does not appear. Curated skills install with the built-in $skill-installer, for example $skill-installer linear. Moby's listings are not in that curated set. Docs: Build skills.

Moby Knowledge is Moby's reference for how the agent works. Tell Codex: Read https://moby.win/agents.md and use it as your reference for Moby. To keep that as a Codex skill, save this folder as $HOME/.agents/skills/moby-knowledge/SKILL.md.

Manual skill folder, which is how Codex docs say to create a skill yourself.

---
name: moby-knowledge
description: Use when researching or trading Solana tokens with Moby. Follow the Moby agent docs and the limits set in the app.
---

Read https://moby.win/agents.md and https://moby.win/marketplace/moby-knowledge/ and follow them. Trade Solana only, funded with USDC, inside the limits set in the Moby app. There are no withdrawals through MCP.

Moby Starter Strategies ship with the Moby MCP connector. They are not a separate skill folder. After the server is connected, ask Codex to list Moby's starter strategies and recommend one. Pick a card, or say what to change, before it runs one.

A rug-check skill is not in the marketplace yet, so there is no listing to link. Ask Codex to check a Solana token's risk with Moby before any buy. get_token_trade_brief is the one-call pre-buy read.

Example prompts

These prompts stay on Solana. A buy spends USDC only after you say yes. Nothing here promises a result.

Check risk before a buy

Check the risk of this Solana token before I buy it with USDC. Tell me if I should skip it.

Scan smart money

Scan Solana smart-money flows. List tokens tracked wallets are buying. Do not buy anything.

Guarded buy

If this Solana token fits my limits, prepare a buy of 10 USDC. Name the token, the contract, and the amount, and wait for my yes.

FAQ

What are Codex skills?

Codex skills are reusable folders. Each one contains a SKILL.md file with a name and a description. Codex reads them from .agents/skills in a repo, from $HOME/.agents/skills, from /etc/codex/skills, and from skills that ship with Codex. Type $ to mention a skill, or run /skills. Codex can also select a skill when your task matches its description.

How do I add an MCP server to Codex?

Add an mcp_servers table to ~/.codex/config.toml, or run codex mcp add with --url for a streamable HTTP server. For Moby, the url is https://mcp.moby.win/mcp and bearer_token_env_var is the environment variable that holds your moby_agent_ key. Codex sends that value as the header Authorization: Bearer. Then run codex mcp list, or type /mcp in the terminal UI.

Is it safe to let Codex trade?

Limits are set in the Moby app and enforced server-side on every buy. There are no withdrawals through MCP. Crypto is risky. The agent trades Solana only, funded with USDC, and a buy spends real funds.

Manage it from your phone

Set the limits in the Moby app, then come back to Codex. All download options.

More on Moby: agentic trading, all agents, the Agent Marketplace, and the Moby MCP listing.

App Store Google Play