Use Moby with Claude Code
Your agent runs in Claude Code, and you manage it from your phone.
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 Claude Code setup is the Claude Code piece of agentic trading on Moby. Claude Code runs the agent. The Moby app is where you set limits and revoke a key.
Other clients: Codex and Grok.
Add the Claude Code MCP server
-
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 Claude Code 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.
-
Store the key in an environment variable
Export MOBY_API_KEY in the environment that starts Claude Code. 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 a chat.
Placeholder only. The .mcp.json below reads this variable.
export MOBY_API_KEY="moby_agent_..." -
Add Moby's HTTP server
Run the command in the first block. It is claude mcp add --transport http, the name moby, and the URL https://mcp.moby.win/mcp. The header value is Authorization: Bearer moby_agent_... and the scope flag is --scope user. -s user is the short form of --scope user in the same guide. User scope writes the server into ~/.claude.json and loads it in every project. Local scope is the default when you omit the flag, and it loads only in the current project. Replace the placeholder on your machine before you run the command. The command stores that header value.
User scope. Placeholder only. Docs: claude mcp add --transport http, then --header for a bearer token.
claude mcp add --transport http moby https://mcp.moby.win/mcp --header "Authorization: Bearer moby_agent_..." --scope userPrefer a project .mcp.json when the key should stay in the environment. Claude Code expands ${MOBY_API_KEY} in the headers of that file. The type field is http. An entry with a url and no type is skipped. streamable-http is a documented alias for http. Use a variable name of your own. The guide says some credential names, including ANTHROPIC_API_KEY, are read as empty in a remote header. Claude Code asks you to approve a project server the first time you run claude in that folder.
Project .mcp.json. The key stays in MOBY_API_KEY. This is the header form from the Claude Code MCP guide.
{ "mcpServers": { "moby": { "type": "http", "url": "https://mcp.moby.win/mcp", "headers": { "Authorization": "Bearer ${MOBY_API_KEY}" } } } } -
Confirm Claude Code sees the server
Run claude mcp list, or claude mcp get moby. In Claude Code, type /mcp. A project server from .mcp.json stays pending until you approve it in that interactive session.
Claude Code documents this in the MCP guide. The Anthropic docs URL redirects there. Skills are in the skills guide. Plugins are in the plugins guide.
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 Claude Code to your Moby account. On first connect, Claude Code 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 Claude Code cannot raise the app limits.
Install Claude Code skills
Claude Code skills are folders with a SKILL.md file. The file starts with YAML frontmatter. The folder name, or the frontmatter name when you set one, becomes the command. The description tells Claude Code when to load the skill. Personal skills live at ~/.claude/skills/<name>/SKILL.md. Project skills live at .claude/skills/<name>/SKILL.md. Invoke one with /moby-knowledge, or open /skills. A new folder is picked up in the session. If you create the skills directory during the session, run /reload-skills. Docs: Extend Claude with skills.
Moby Knowledge is Moby's reference for how the agent works. Tell Claude Code: Read https://moby.win/agents.md and use it as your reference for Moby. To keep that as a skill, save this folder as ~/.claude/skills/moby-knowledge/SKILL.md.
Personal skill folder, which is how the Claude Code skills guide says to create a skill yourself.
---
name: moby-knowledge
description: Use when researching or trading Solana tokens with Moby in Claude Code. 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.A plugin can ship skills too. The plugins guide says a plugin skill runs as /plugin-name:skill-name. This page uses the personal folder above.
Moby Starter Strategies ship with the Moby MCP connector. They are not a separate skill folder. After the server is connected, ask Claude Code to list Moby's starter strategies and recommend one. Pick a card, or say what to change, before it runs one.
Before a buy, use the rug-check skill. 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
How do I add an MCP server to Claude Code?
Run claude mcp add --transport http with the server URL and a header, or add an mcpServers entry in .mcp.json with type set to http. For Moby, the URL is https://mcp.moby.win/mcp and the header is Authorization: Bearer followed by your moby_agent_ key. Then run claude mcp list, or type /mcp in Claude Code.
What are Claude Code skills?
Claude Code skills are folders with a SKILL.md file. The folder name, or the name in the frontmatter, is the command. Personal skills live in ~/.claude/skills and project skills live in .claude/skills. Type / and the skill name, or run /skills. Claude Code can also load a skill when the task matches its description.
Is it safe to let Claude Code 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 Claude Code. All download options.
More on Moby: agentic trading, all agents, Codex, Grok, the Agent Marketplace, the Moby MCP listing, and the rug-check skill.