Skip to content

How to create a crypto trading bot with Claude

2 min read

By Petra M., User Onboarding

Build a crypto trading bot with Claude Code: connect an MCP server, let Claude read and quote with free tools, get an API key with a wallet signature, and keep every swap signed by your own wallet.

How do you create a crypto trading bot with Claude? Connect Claude Code to an MCP server that can check tokens, quote and build swaps, then ask Claude to write the loop: what to watch, when to buy, when to sell. Keep the private key out of the chat: the tools should return transactions for your wallet to sign.

trnch trades on Robinhood Chain and Elysium today; Solana, Base, Ethereum and the other chains are places you pay from, not places trnch trades. The trnch MCP server gives Claude both.

Rules for any AI trading bot

  • Never paste a private key or a seed phrase into Claude. Use tools that return unsigned transactions.
  • Start with read-only tools: checks, quotes and stats.
  • Run in dry run first: the bot logs what it would do and signs nothing.
  • When it signs for real, use a dedicated wallet with a small balance, and cap the spend.
  1. 1. Add the MCP server

    One line in Claude Code (below). Claude then sees the trnch tools.

  2. 2. Ask with the free tools

    trnch_check, trnch_scan_wallet, trnch_top_24h, trnch_stats and trnch_quote need no key and no wallet.

  3. 3. Get an API key

    trnch_register_message returns a message, your wallet signs it (personal_sign), trnch_register returns the key. The signature moves no funds.

  4. 4. Let Claude write the loop

    Point it at trnch.fun/skill.md and the ready-made strategy at /api/bot/v1/strategy (TypeScript or Python), and ask for the rules you want.

  5. 5. Dry run, then live

    The strategy signs nothing until DRY_RUN=0; then it signs on your machine with a dedicated wallet key that is never sent.

claude mcp add --transport http trnch https://trnch.fun/api/mcp

# Elysium
claude mcp add --transport http trnch-elysium https://trnch.fun/elysium/api/mcp

curl -s "https://trnch.fun/api/bot/v1/strategy?lang=py" -o agent.py

On Robinhood Chain the check gives the trnch scan verdict, and the API refuses to buy tokens trnch keeps out (selling one stays possible). On Elysium the check gives facts read on chain, not a verdict. The strategy script targets Robinhood Chain.

FAQ

Does Claude need my private key?

No. trnch returns unsigned transactions; your wallet signs them. A script that signs for you does it locally with a dedicated wallet.

Is there a Claude skill for trnch?

Yes: trnch.fun/skill.md describes the tools, the key by wallet signature and the strategy.

Is the bot profitable?

Nobody can promise that. The strategy is an example rule set, not a recommendation. Prices can fall to zero.