Trading Guide

Connect Claude to Alpaca: Free Paper Trading Setup

You can connect Claude directly to a free Alpaca paper trading account and have it check balances, pull live market data, and help screen premarket candidates — all in plain English, with no coding required once it's running. This guide walks a brand-new user through the entire setup, start to finish.

Time required: about 30–45 minutes the first time.  Cost: free (paper trading and the connector are both free).  Platform: written for Windows, with Mac notes where steps differ.

What You're Building

Alpaca is a brokerage that offers a free "paper" (simulated) trading account and a full market-data API. The connector — built on the Model Context Protocol (MCP) — lets Claude Desktop talk to that account directly. There are four stages:

Stage 1 — Alpaca Account and API Keys

Security first: Never paste your API keys into a chat window, an email, or a screenshot. They belong in one local configuration file and nowhere else. If they're ever exposed, regenerate them — on a paper account there's no real harm, just regenerate and move on.

Stage 2 — Install the Prerequisites

Two one-time installs are needed on your machine:

Install uv from PowerShell (Windows):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

On Mac or Linux, use:

curl -LsSf https://astral.sh/uv/install.sh | sh

Close and reopen your terminal, then confirm both installed correctly:

python --version
uvx --version

Both should print a version number. If either says "not recognized," it didn't land on your PATH — fix that before continuing. There are no virtual environments, repositories, or Docker to deal with.

Stage 3 — Wire the Connector Into Claude Desktop

You'll add a small block to one configuration file. The most reliable way to open it, regardless of how Claude Desktop was installed, is through Settings → Developer → Edit Config. (Microsoft Store installs are sandboxed at a non-standard path, so always use the Edit Config button rather than hunting for the file manually.)

Paste in the Alpaca server block, filling in your two keys. Use the official server and skip third-party forks:

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "PKxxxxxxxxxxxxxxx",
        "ALPACA_SECRET_KEY": "your-secret-key-here",
        "ALPACA_PAPER_TRADE": "true"
      }
    }
  }
}

If the file already contains other servers, merge this alpaca entry into the existing mcpServers object rather than overwriting it.

Windows PATH gotcha: Claude Desktop's background processes don't always inherit your PATH, so a bare "command": "uvx" can fail to launch. If it does, use the full path with doubled backslashes:

"command": "C:\\Users\\YOURNAME\\.local\\bin\\uvx.exe",

Save the file, then fully restart Claude Desktop. A normal close often leaves background processes running, so on Windows force-quit first:

taskkill /F /IM claude.exe /T

On Mac, quit from the menu bar or run killall Claude, then relaunch.

Stage 4 — Verify the Connection

A healthy fresh paper account reports roughly $100,000 equity, $100,000 cash, $200,000 buying power (Reg-T 2x), no open positions, and zero day trades.

Everyday Use After Setup

Once it's running you never touch the configuration again. You can simply ask things like:

Data-feed tip: A free Alpaca account streams the IEX feed by default, which is thin on low-float premarket names and can show stale or missing prices on exactly the gappers you're scanning. If a price looks off, ask Claude to use the delayed SIP feed — full-market coverage, 15-minute delay, still free. Live real-time SIP requires a paid Alpaca data plan.

Finding the Names in the First Place

A data connection like this reads a stock once it's already on your radar — it won't go hunting across the market for you. That discovery step belongs to a scanner. For premarket gappers and relative-strength movers I use ZenBot Scanner to surface names, then bring the ticker here for Claude to pull data and screen against my rules.

Which Claude Plan Do You Need?

The local setup above works on any plan, including Free — but only in the Claude Desktop app, since the configuration-file method isn't available in the browser. The real constraint on the Free plan is usage limits: a data-heavy premarket workflow will hit message caps quickly, which makes a paid plan the practical floor for daily use.

Works With Other AI Tools?

This isn't Claude-only. It rides on the Model Context Protocol (MCP), an open standard now supported across major AI assistants. Any MCP-capable client can connect to the same Alpaca server; only the connection method differs:

Troubleshooting

Final Thoughts

Connecting Claude to a free Alpaca paper account turns a chat window into a hands-free way to check your account and pull market data — a low-risk way to build the workflow before any real capital is involved. Set it up once, keep it on paper, and let it do the fetching while you focus on the read.


Prefer a printable version?

Download the full step-by-step guide as a PDF, or explore the indicators that pair with it.

Download PDF →   Explore Indicators →