Let an AI Agent Place Trades in Webull
Connect Claude to Webull's local MCP server and let an AI trading agent place live trades for you. Full step-by-step setup guide.
Imagine typing a plain-English request and watching an AI agent execute a real stock trade inside your brokerage account seconds later. That is exactly what an AI trading agent for Webull can do once you connect Claude to Webull's local MCP server — and in this TC Trading guide, you'll set it up from scratch.
In a previous walkthrough, we connected AI to Webull using the cloud MCP server. It could read positions, build watchlists, and see almost everything — but it could not touch your money or place trades. Today, we're giving it the keys.
By the end of this tutorial, you'll have Claude (both the desktop app and Claude Code) placing live trades directly inside your Webull account. This is a more advanced setup than the cloud method — there's an API key, a configuration file, and a few terminal commands — but nothing you can't copy and follow along with. Stick with it, because once it works, it's genuinely powerful.
Table of Contents
- Cloud vs. Local MCP Server: The Key Difference
- Prerequisites / What You'll Need
- Step-by-Step Guide
- Tips & Best Practices
- Common Mistakes to Avoid
- Troubleshooting
- Advanced Variations: Rules and Safeguards
- Frequently Asked Questions
- Conclusion
Key Takeaways
- The Webull local MCP server is what lets an AI agent actually place trades — unlike the cloud server, which is read-only for your money.
- You'll need Webull API keys (app key + secret key), which are often approved in seconds but can take a couple of days.
- Setup requires Python 3.10+, UVX, a configuration file, and terminal authentication — all copy-and-paste friendly.
- Keep your AI assistant open beside you: screenshot each step and feed it to Claude or ChatGPT to be coached through in real time.
- Once connected, you can build automated trading strategies and workflows — with optional safeguards like ticker whitelists and order limits.
- You need at least $100 in a live Webull account, or you can test everything on the paper/sandbox environment first.
Cloud vs. Local MCP Server: The Key Difference
Webull offers two ways to connect AI through the Model Context Protocol (MCP). Understanding the difference is the whole point of this guide.
| Feature | Cloud MCP Server | Local MCP Server |
|---|---|---|
| Hosted by | Webull (fully managed) | You (runs on your machine) |
| Setup difficulty | Simple — log in and connect | Advanced — API keys + terminal |
| Reads positions & data | Yes | Yes |
| Creates watchlists | Yes | Yes |
| Places live trades | No | Yes |
The cloud server is perfect if you only want AI to observe your account. But to let AI place trades on your behalf, you need the local MCP server. That's what we're setting up today.
Prerequisites / What You'll Need
Before you open the terminal, gather the following:
- A Webull account with at least $100 for live trading (or use the paper/sandbox environment to test for free).
- WeBull API keys — an app key and a secret key (you'll apply for these in Step 1).
- Python 3.10 or newer installed on your computer.
- UVX installed (the guide below shows the one-line install).
- The Claude Desktop app (and optionally Claude Code for a smoother trading experience).
- A second AI chat open (Claude or ChatGPT) to coach you through each step.
- Skill level: intermediate — you'll copy-paste terminal commands, but no coding knowledge is required.
- Time estimate: roughly 15–30 minutes, plus API approval wait time.
A note before you start: if a terminal window makes you nervous, don't click away. Every command here is copy-and-paste. A year ago, the TC Trading approach to this was total unfamiliarity too — if it can be figured out once, you can follow along and do it now.
Step-by-Step Guide
Here's the game plan: apply for keys, install the tools, configure the AI client, authenticate, run a couple of tests, then place a real trade. Follow along in order.
Step 1: Apply for WeBull API Keys
- Go to the official Webull website and log into your account from the top right, exactly as you normally would.
- Once inside, you'll see your accounts and balances. Click the top-right menu and go to Developer Tools.
- On the developer page, apply for API keys. As an individual user, follow the individual application guide (institutional users have a separate path).
- Approval is often instantaneous, but WeBull notes it can take a couple of days in a worst-case scenario.
- When approved, you'll receive an app key and a secret key. Save both somewhere safe — you'll need them shortly, and you don't want to be hunting for them mid-setup.
Pro tip: Copy the link to the Webull local MCP server documentation page, open a fresh Claude chat, paste that link in, and let it help guide you through each phase alongside this article. Click here for a link to the Webull local MCP server documentation page!
Step 2: Install Python and UVX
You need Python 3.10 or better and UVX installed before anything else works.
- Open your terminal (on Mac, search "terminal" in your apps and launch it).
- Screenshot the install step from the Webull local MCP page, paste it into Claude, and ask it to walk you through Phase 1. It will hand you the exact install command for your system.
- Copy that command, paste it into your terminal, and press Enter. You'll see it download and confirm everything is installed.
- When it says to add the tool to your path, either restart your shell or run the follow-up line it provides. Copy that line, paste it, and run it.
Feeding the steps into AI as you go gives you an always up-to-date process — if WeBull changes anything on their end, your AI assistant adapts the instructions on the fly.
Step 3: Configure the AI Client
This is the heart of the setup: telling Claude how to reach Webull.
- Screenshot Step 2 of the Webull guide (everything before Step 3) and ask Claude to walk you through it.
- Locate your configuration file. You can open it through your file system or straight from the terminal. Copy the command Claude gives you and paste it in — on a Mac, it typically opens in the TextEdit app.
- Copy the MCP server configuration block (from either Claude or the WeBull page) and paste it into the config file. If you already have an
mcpServerssection, the block goes inside that section — don't create a duplicate. - Before saving, screenshot the file and ask Claude, "Is this formatting correct?" This double-check catches formatting errors that would otherwise cause confusion later. Expect it to suggest at least one small fix — apply it.
- Claude will likely tell you to run
which uvxin your terminal and paste the returned path into the configuration's command line. Do that, then update the command line in your config. - Finally, add your app key and secret key between the quotes in the config file, then save it (Command + S on Mac).
Once saved, fully close and reopen the Claude Desktop app so it picks up the new configuration.
Step 4: Authenticate With Two-Factor
Now you'll link the connection to your phone.
- In the Claude Desktop app, go to Settings → Developer Settings. You should see Webull listed with a "running" status. If it's not there, make sure you closed and reopened the app.
- Run the authentication command from the Webull guide in your terminal. This triggers a two-factor notification to your phone.
- Heads up — this can take a while. In some cases the standard method takes 15 to 30 minutes to push the notification.
- The faster route: press Control + C to stop the slow command, then run the alternate authentication line from the guide. If it prompts for keys, paste the line it returns and provide your app key and secret key manually (right after each equals sign, no spaces).
- When the Webull authentication notification hits your phone, approve it. The terminal will react, and you're connected.
Step 5: Verify the Connection
Time to confirm everything works before touching a trade.
- Go back to Settings → Developer Settings and confirm Webull shows with a blue "running" indicator.
- Open Connectors, click into the WeBull local connector, and review the available tools. You can set each to "always allow" or "needs approval." For this test, allow the read-only tools.
- Ask Claude to get your account list and pull up your balances and positions.
- It should correctly find your account — for example, about $100 and one share of Ford stock — including market value and the current price.
If Claude returns your real positions accurately, the connection is verified.
Step 6: Place Your First Trade
This is the moment of truth.
- Ask Claude to sell one share of your test stock with a market order (in the example, one share of Ford).
- If it says it can't grab the quote or place the order, go to Settings → Connectors → Webull and make sure place order (and cancel order) permissions are enabled. Approve the trading tools you want.
- Close and reopen Claude, re-check the connector settings, and confirm everything is toggled on.
- Ask again. When it executes, you'll get a fill notification on your phone — the trade is done.
For an even smoother experience, switch to Claude Code. Ask it to pull up your Webull account, report your balance and holdings, then sell the share at market price. It locates the correct margin account, confirms the position, and executes the fill — all from plain-language requests.
Congratulations — you now have an AI agent placing live trades in Webull. From here, it's completely up to you.
Tips & Best Practices
- Keep an AI assistant open as your co-pilot. Paste the Webull docs and this article into a fresh chat and let it guide you step by step.
- Screenshot before you save. Confirming your config formatting with Claude before saving prevents cascading errors.
- Test with a small position first. A single share of a low-priced stock (like the Ford example) is a perfect, low-risk way to confirm live execution.
- Use the manual-key authentication route if the standard two-factor push is dragging on for 15–30 minutes.
- Review your connector permissions deliberately. "Allow all" is fine for testing, but revisit it and enable only what you actually want.
- Try Claude Code once the desktop app works — it tends to make account queries and order placement feel more seamless.
Common Mistakes to Avoid
- Not reopening Claude after editing the config. If you leave the app running while changing the terminal setup, WeBull may not appear in Developer Settings. Always close and reopen.
- Duplicating the
mcpServerssection. If one already exists, nest the new block inside it instead of pasting a second one. - Losing your API keys. Save your app key and secret key the moment you get them. If you lose them, you'll have to find or regenerate them.
- Skipping the formatting double-check. A tiny JSON error can send you down a long troubleshooting rabbit hole.
- Forgetting permissions. If trades won't execute, it's usually because the place order tool isn't enabled in the connector settings.
Troubleshooting
The single most valuable troubleshooting habit: screenshot the error and feed it back to your AI.
- Terminal error or error code? Screenshot it, paste it into Claude or ChatGPT, and have it walk you through the fix.
- Webull not showing in Developer Settings? Close and fully reopen the Claude Desktop app.
- Connection says "failed"? You may need to re-edit your configuration file — a small formatting or key error is the usual culprit. Correct it, save, and reopen Claude.
- "Can't grab the quote" when trading? Check the Webull connector permissions and make sure order-placement tools are enabled.
- Authentication taking forever? Cancel with Control + C and use the manual-key authentication method instead.
Minor roadblocks are normal — even a clean setup can hit a couple of snags. Using AI to interpret the errors is what gets you unstuck.
Advanced Variations: Rules and Safeguards
Your configuration file isn't just for connecting — it's where you can add guardrails. This matters, because an AI agent with trading access is powerful and can be dangerous without limits.
Inside the config, you can add rules such as:
- Ticker whitelists — restrict the agent to only certain symbols.
- Asset-type limits — allow stocks only, and block options, futures, or other instruments.
- Order limits — cap the size or type of trades the agent can place.
- Environment selection — set the Webull environment to prod for live trading, or UAT for a paper/sandbox account to test safely.
This file will likely come back into play as you grow — you can layer in safeguards over time. Once the agent can reliably trade, you can build automations and workflows: strategies that run daily, weekly, or monthly, executing predefined actions when your conditions are met.
Frequently Asked Questions
What's the difference between the Webull cloud and local MCP server?
The cloud MCP server is fully managed by Webull and can read your positions and data but cannot place trades. The local MCP server runs on your machine and can place live trades on your behalf.
Do I need coding experience to set this up?
No. Every terminal command is copy-and-paste. Keeping an AI assistant open to coach you through each step means you never have to write code yourself.
How much money do I need in my Webull account?
You need at least $100 in a live WeBull account to trade this way. Alternatively, you can test everything for free using the paper/sandbox (UAT) environment.
How long does Webull API key approval take?
Approval is often instantaneous, but Webull says it can take up to a couple of days in a worst-case scenario.
Why isn't Webull showing up in Claude's Developer Settings?
The most common cause is not restarting the app. Fully close and reopen Claude Desktop after editing your configuration or terminal setup.
Why is the two-factor authentication taking so long?
The standard method can take 15–30 minutes to push the notification. Cancel it with Control + C and use the manual-key authentication route for a much faster connection.
Can I limit what the AI agent is allowed to trade?
Yes. In your configuration file, you can add rules like ticker whitelists, stock-only restrictions, and order limits to keep the agent within safe boundaries.
Is it safe to give an AI agent trading access?
It's powerful and can be risky, which is exactly why safeguards matter. Start with small test trades, set permissions deliberately, and use configuration rules to constrain what the agent can do.
Conclusion
You've now built a fully functional AI trading agent for Webull — from applying for API keys and installing the tools to configuring Claude, authenticating, and placing a real trade. The local MCP server is what unlocks it, turning AI from a passive observer into an agent that can execute on your behalf with a simple request.
From here, the direction is yours. You can build automated strategies, schedule recurring workflows, and layer in safeguards to keep everything controlled. Just remember: this capability is as powerful as it is risky, so start small, set clear permissions, and test as you go.
Watch the full YouTube video below to see it all step by step: