Building an autonomous AI trading agent on Robinhood is now possible without writing a single line of code. With Claude Code and the Robinhood MCP (Model Context Protocol), you can set up an AI agent that scans your watchlist, evaluates setups against your rules, and executes trades automatically — all from a plain text configuration file you control.
This guide covers the full setup from scratch: connecting the broker, writing your strategy rules, logging trades, and automating scheduled scans throughout the trading day.
What You Need to Get Started
- A Robinhood account with Agentic API access enabled (Account → Settings → Enable Agentic Access)
- Claude Code installed on your computer — download at claude.ai/code (Anthropic’s CLI, not the web chatbot)
- A dedicated folder on your machine for your trading files
How to Build an AI Trading Agent on Robinhood: Step-by-Step
Connect Robinhood to Claude Code via MCP
The Robinhood MCP is what turns Claude from a chatbot into an agent that can actually execute trades. Run this single command inside Claude Code from your trading folder:
Once connected, Claude can check your positions, pull live quotes, place equity orders, set stop-losses, and cancel orders — all through natural language. Verify the connection by typing “what’s my account balance?” in a new session.
Build Your Watchlist Around Sectors You Know
The agent doesn’t scan the entire market — you define which tickers it watches. Pick two or three sectors you have conviction in and curate the list yourself. The AI executes your thesis; it doesn’t replace it.
Think about adjacent exposure too. If you’re watching semiconductors, consider what moves alongside them. That logic belongs in your configuration, not left to the agent to figure out on its own.
Write Your Trading Rules in CLAUDE.md
Create a file called CLAUDE.md in your trading folder. Claude loads this automatically at the start of every session. At minimum, define:
- Position sizing (dollar amount per entry)
- Entry criteria (what qualifies as a valid setup)
- Stop-loss percentage
- Profit targets and how you scale out
- A no-chase rule (skip any ticker up more than X% from trigger)
- An explicit autonomy grant — without this, the agent will ask permission before every trade
Set Up a Daily Trading Log
Create a logs/ folder in your trading directory. Claude writes a dated log file during every scan and reads it at the start of each new one. This prevents the agent from re-evaluating tickers it already rejected earlier in the day — a key efficiency gain in multi-scan setups.
Run Manual Sessions Before Automating
Before scheduling anything, run at least a week of manual sessions. Open Claude Code and give it a natural language prompt: “screen my watchlist for setups, check my positions, execute anything that qualifies.” Watch what it does. When it makes a bad call, fix the rule — don’t override mid-trade. Automate only once you trust the ruleset.
Schedule Automated Scans Throughout the Day
Claude Code includes a built-in scheduled tasks system. Once your rules are solid, create scan agents that fire at key windows: pre-market, market open, mid-morning, midday, power hour, and close. Each scan runs your full ruleset against live Robinhood data and acts autonomously within the parameters you set.
Build a Persistent Memory System
Claude Code has a persistent memory layer at ~/.claude/projects/[your-dir]/memory/. Use it to store rule refinements after bad trades, known account limitations, and lessons learned from live sessions. Every future scan loads these files automatically — the system compounds its own knowledge over time.