PlugWiki
Alpaca logo

Alpaca MCP Server: Trade and Get Market Data from Claude and Cursor

OfficialLocal
GetPyPIalpaca-mcp-serveralpacahq/alpaca-mcp-serverDocs

Lets Claude and Cursor read Alpaca market data and your account, and place stock, crypto and options orders.

This is Alpaca's own server for its trading and market data APIs. It runs on your computer and signs in with an Alpaca API key and secret. It starts in paper trading mode, so orders use pretend money until you switch it to live. Once live, the assistant can place and cancel real orders, so limit what it can reach before you do.

Good for

  • Traders who want quotes, charts and account checks in plain English
  • Developers testing trading ideas on a free paper account
  • Options traders who want chains, Greeks and spread orders drafted

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install Alpaca MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the Alpaca MCP server to Claude Code. Run this command:
    
    claude mcp add alpaca -e ALPACA_API_KEY=<ALPACA_API_KEY> -e ALPACA_SECRET_KEY=<ALPACA_SECRET_KEY> -- uvx alpaca-mcp-server
    
    Ask me for ALPACA_API_KEY, ALPACA_SECRET_KEY and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python).

Built from the package data we hold. Not yet tested by us.

Tools

  • Shows balance, buying power and account status

    Returns your Alpaca account snapshot: cash, equity, margin and whether trading is blocked.

    Try: “What's my buying power on Alpaca?”

    Network · get_account_info

  • Shows account trading settings

    Reads account settings such as margin rules, pattern day trader checks and trade confirmations.

    Try: “Show my Alpaca account trading restrictions.”

    Network · get_account_config

  • Changes account trading settings

    Sends a change to your account configuration, for example the margin or day-trade check settings.

    Try: “Turn off fractional trading on my account.”

    Write · update_account_config

  • Charts account value over time

    Returns equity and profit and loss over a period you choose.

    Try: “Show my portfolio value for the last month.”

    Network · get_portfolio_history

  • Lists fills, dividends and transfers

    Lists account activity such as order fills, dividends and transfers across all types.

    Try: “List my account activity this week.”

    Network · get_account_activities

  • Lists one kind of account activity

    Same as account activities but limited to one activity type, such as dividends.

    Try: “Show all dividends I received this year.”

    Network · get_account_activities_by_type

  • Lists your orders with filters

    Returns orders filtered by status, symbol, side or date range.

    Try: “Show my open orders from this week.”

    Network · get_orders

  • Looks up one order

    Fetches a single order by the ID Alpaca assigned.

    Try: “What happened to order abc123?”

    Network · get_order_by_id

  • Looks up an order by your own ID

    Fetches an order using the client order ID that was set when it was placed.

    Try: “Find the order with client ID my-order-7.”

    Network · get_order_by_client_id

  • Changes an open order

    Replaces an open order with new quantity, price or time-in-force values.

    Try: “Change my open TSLA limit order price to $310.”

    Write · replace_order_by_id

  • Cancels one open order

    Cancels a specific open order.

    Try: “Cancel order abc123.”

    Delete · cancel_order_by_id

  • Cancels every open order

    Cancels all open orders on the account in one call.

    Try: “Cancel all my open orders.”

    Delete · cancel_all_orders

Read from the source code

Permissions

high risk · 5 things to watch

High risk

With the default settings the assistant can read your account, place and cancel orders, and close positions, though on a paper account. Before you switch to live trading, set ALPACA_TOOLSETS to the data toolsets so it cannot trade.

What it can do

Watch out for

  • It can place real orders once you go live

    The order tools (place_stock_order, place_crypto_order, place_option_order) send orders. They use paper money unless ALPACA_PAPER_TRADE is set to false (the server code defaults it to true), so start there. Our advice: do not give an unattended or scheduled agent live keys. Order, cancel and close calls act on a real brokerage account. github.com

  • It can cancel orders and sell your whole portfolio

    cancel_all_orders and close_all_positions act on everything in the account at once. Our advice: keep the trading toolset off unless you need it. github.com

  • It can change account settings and exercise options

    update_account_config, exercise_options_position and do_not_exercise_options_position change the account itself. Leave out the account and trading toolsets to remove them. github.com

  • Tool results are wrapped as untrusted data

    The server wraps every result in a note telling the model to treat it as data, with a stronger warning for news and docs text. This lowers prompt-injection risk but is not a guarantee. github.com

  • The five docs tools call Alpaca's hosted docs service

    They are always on, whichever toolsets you choose, and send your search text to Alpaca's documentation service. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlySet ALPACA_TOOLSETS to data-only toolsets such as stock-data,crypto-data,options-data,news,corporate-actions,fixed-income-data. The five documentation tools stay on.
Talks toAlpaca trading and market data APIs. Alpaca's hosted docs service (for the five documentation tools)
Sign-in and keysThe key and secret sit in your client's config env block. No files are written to disk by the server.
Scopes
  • Alpaca API key and secret for your account (paper by default)

Questions

Is the Alpaca MCP server official?

Yes. It is published by Alpaca, in the alpacahq GitHub organization, for its own trading and market data APIs.

Does it trade real money?

Not by default. It uses a paper trading account unless you set ALPACA_PAPER_TRADE to false and use live keys. Our advice: keep live keys out of any agent that runs without you watching, because the order tools place, cancel and close real positions.

What do I need to sign in?

An Alpaca API key and secret. A free paper trading account is enough to start.

Can I run it read-only?

Yes, in effect. Set ALPACA_TOOLSETS to stock-data, crypto-data, options-data, news, corporate-actions and fixed-income-data, and no order tools load. The five documentation tools stay on.

Which clients does it work in?

Clients that can start a local program, including Claude Desktop, Claude Code, Cursor, VS Code and PyCharm. The README says ChatGPT and Claude mobile need a remote server, which this package does not provide.

Do I need Python?

Yes. It needs Python 3.10 or newer and uv, which runs it for you. See the install box.

Do my old v1 setups still work?

No. Version 2 is a rewrite and none of the v1 tools carry over. Update your client config and start a fresh chat, or pin the last v1 release.

Is real-time data free?

The README says the latest 15-minute data needs the Algo Trader Plus plan. Short-sale locate tools do not work on paper accounts.

Information

updated Nov 2, 2026

Publisher
Official
Package
alpaca-mcp-server
Registry
PyPI
Transport
stdio
Auth
API key
Version
2.4.0
License
MIT
Last commit
Oct 27, 2026
Open issues
24

WebsiteDocsGitHubPyPIChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 6
  1. github.com · github.com
  2. github.com · github.com
  3. pypi.org · pypi.org
  4. github.com · github.com
  5. github.com · github.com
  6. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.