
Alpaca MCP Server: Trade and Get Market Data from Claude and Cursor
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.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
The README says ChatGPT needs a remote server, which this package does not provide. GitHub
Local-only server; n8n cannot reach it.
Install Alpaca MCP
Claude Code
- 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
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_infoShows 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_configChanges 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_configCharts 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_historyLists 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_activitiesLists 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_typeLists your orders with filters
Returns orders filtered by status, symbol, side or date range.
Try: “Show my open orders from this week.”
Network ·
get_ordersLooks up one order
Fetches a single order by the ID Alpaca assigned.
Try: “What happened to order abc123?”
Network ·
get_order_by_idLooks 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_idChanges 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_idCancels one open order
Cancels a specific open order.
Try: “Cancel order abc123.”
Delete ·
cancel_order_by_idCancels every open order
Cancels all open orders on the account in one call.
Try: “Cancel all my open orders.”
Delete ·
cancel_all_ordersBuys or sells stocks and ETFs
Submits a stock or ETF order. Market, limit, stop, stop-limit, trailing-stop and bracket orders are supported. This is marked as a destructive action by the server.
Try: “Buy 5 shares of AAPL at market.”
Write ·
place_stock_orderBuys or sells crypto
Submits a crypto order by quantity or dollar amount, as market, limit or stop-limit.
Try: “Buy 0.01 ETH/USD at market.”
Write ·
place_crypto_orderBuys or sells options
Submits a single-leg or multi-leg options order, such as a spread.
Try: “Place a bull call spread on AAPL with 190 and 200 strikes.”
Write ·
place_option_orderLists everything you hold
Returns every open position with quantity, cost and current value.
Try: “Show my current positions.”
Network ·
get_all_positionsShows one position
Returns details for the position in a single symbol.
Try: “How is my NVDA position doing?”
Network ·
get_open_positionSells out of one position
Closes a position in one symbol, fully or by a quantity or percentage you give.
Try: “Close 10% of my NVDA position.”
Delete ·
close_positionSells your whole portfolio
Liquidates all open positions at once.
Try: “Liquidate my entire portfolio.”
Delete ·
close_all_positionsExercises an option you hold
Sends an exercise request for an option contract in your account.
Try: “Exercise my NVDA call contract.”
Write ·
exercise_options_positionTells Alpaca not to exercise an option
Submits a do-not-exercise instruction for a held option contract.
Try: “Do not exercise my AAPL call that expires today.”
Write ·
do_not_exercise_options_positionCreates a watchlist
Creates a named watchlist with the symbols you list.
Try: “Create a watchlist called Tech Stocks with AAPL, MSFT and NVDA.”
Write ·
create_watchlistLists your watchlists
Returns all your trading watchlists.
Try: “List my watchlists.”
Network ·
get_watchlistsShows one watchlist
Returns a watchlist and its assets by ID.
Try: “What is in my Dividend Picks watchlist?”
Network ·
get_watchlist_by_idRenames or edits a watchlist
Updates the name or the symbol list of a watchlist.
Try: “Update my Tech Stocks watchlist to include TSLA.”
Write ·
update_watchlist_by_idDeletes a watchlist
Removes a watchlist by ID.
Try: “Delete my Growth Portfolio watchlist.”
Delete ·
delete_watchlist_by_idAdds a symbol to a watchlist
Adds one asset to an existing watchlist.
Try: “Add AMZN to my Tech Stocks watchlist.”
Write ·
add_asset_to_watchlist_by_idRemoves a symbol from a watchlist
Takes one asset out of a watchlist.
Try: “Remove META from my Growth Portfolio watchlist.”
Delete ·
remove_asset_from_watchlist_by_idSearches tradable assets
Lists assets, filtered by status, class or exchange.
Try: “List active NASDAQ equities that are tradable.”
Network ·
get_all_assetsShows one asset's details
Returns whether an asset is tradable, shortable or fractionable, and its exchange.
Try: “Is AAPL fractionable on Alpaca?”
Network ·
get_assetFinds option contracts
Lists option contracts for one or more underlying symbols, filtered by expiry, strike and type.
Try: “Show AAPL option contracts expiring next month.”
Network ·
get_option_contractsShows one option contract
Returns one option contract by symbol or ID.
Try: “Show details for AAPL250613C00200000.”
Network ·
get_option_contractShows market days and hours
Returns the market calendar for a date range.
Try: “Show the market calendar for next week.”
Network ·
get_calendarSays if the market is open
Returns whether the market is open now and when it next opens or closes.
Try: “Is the US market open right now?”
Network ·
get_clockLists corporate action announcements
Returns announcements such as dividends, splits and mergers, with filters.
Try: “Show AAPL dividends and splits from the last 3 months.”
Network ·
get_corporate_action_announcementsShows one corporate action
Returns a single corporate action announcement by ID.
Try: “Show corporate action announcement abc123.”
Network ·
get_corporate_action_announcementGets historical stock price bars
Returns open, high, low, close and volume bars for stocks over a timeframe you choose.
Try: “Show 5-minute bars for TSLA from last Tuesday to Friday.”
Network ·
get_stock_barsGets historical stock bid and ask quotes
Returns past bid and ask quotes for stock symbols.
Try: “Show recent quotes for MSFT.”
Network ·
get_stock_quotesGets historical stock trades
Returns past individual trades for stock symbols.
Try: “Retrieve the last 100 trades for AMD.”
Network ·
get_stock_tradesGets the newest stock minute bar
Returns the most recent minute bar per symbol.
Try: “Get the latest bar for GOOGL.”
Network ·
get_stock_latest_barGets the newest stock quote
Returns the latest bid and ask for symbols.
Try: “Show the most recent quote for MSFT.”
Network ·
get_stock_latest_quoteGets the newest stock trade
Returns the last trade price and size per symbol.
Try: “What was the latest trade price for NVDA?”
Network ·
get_stock_latest_tradeGets a stock overview in one call
Combines latest quote, trade, minute bar, daily bar and previous daily bar per symbol.
Try: “Give me a market snapshot for AAPL.”
Network ·
get_stock_snapshotLists the busiest stocks
Returns the most active stocks by volume or trade count.
Try: “Which stocks are most active today?”
Network ·
get_most_active_stocksLists top gainers and losers
Returns the biggest movers of the day.
Try: “Who are today's top market gainers and losers?”
Network ·
get_market_moversGets historical crypto price bars
Returns OHLCV bars for crypto pairs over a timeframe.
Try: “Show hourly BTC/USD bars for the last day.”
Network ·
get_crypto_barsGets historical crypto quotes
Returns past bid and ask quotes for crypto pairs.
Try: “Show recent ETH/USD quotes.”
Network ·
get_crypto_quotesGets historical crypto trades
Returns past trades for crypto pairs.
Try: “Show the last trades for BTC/USD.”
Network ·
get_crypto_tradesGets the newest crypto minute bar
Returns the latest minute bar per crypto pair.
Try: “Get the latest ETH/USD bar.”
Network ·
get_crypto_latest_barGets the newest crypto quote
Returns the latest bid and ask per crypto pair.
Try: “What is the BTC/USD quote now?”
Network ·
get_crypto_latest_quoteGets the newest crypto trade
Returns the last trade per crypto pair.
Try: “What was the last BTC/USD trade?”
Network ·
get_crypto_latest_tradeGets a crypto overview in one call
Combines latest quote, trade and bars per crypto pair.
Try: “Snapshot of BTC/USD and ETH/USD.”
Network ·
get_crypto_snapshotShows the crypto order book
Returns the latest order book for crypto pairs.
Try: “Show the BTC/USD order book.”
Network ·
get_crypto_latest_orderbookGets historical option price bars
Returns OHLCV bars for option contracts.
Try: “Show daily bars for AAPL250613C00200000.”
Network ·
get_option_barsGets historical option trades
Returns past trades for option contracts.
Try: “Show recent trades for SPY250627P00400000.”
Network ·
get_option_tradesGets the newest option trade
Returns the last trade for option contracts.
Try: “What was the last trade on that AAPL call?”
Network ·
get_option_latest_tradeGets the newest option quote
Returns the latest bid, ask and exchange for option contracts.
Try: “Get the latest quote for AAPL250613C00200000.”
Network ·
get_option_latest_quoteGets an option overview with Greeks
Returns latest quote and trade plus Greeks and implied volatility.
Try: “What are the Greeks for TSLA250620P00500000?”
Network ·
get_option_snapshotShows the option chain for a stock
Returns the option chain for an underlying symbol.
Try: “Show the SPY option chain near the current price.”
Network ·
get_option_chainDecodes option exchange codes
Maps exchange codes in option data to exchange names.
Try: “What exchange is code C for options?”
Network ·
get_option_exchange_codesGets corporate actions from market data
Returns corporate actions such as splits and dividends from the market data API.
Try: “Show corporate actions for SPY in the past year.”
Network ·
get_corporate_actionsGets news for stocks and crypto
Returns news articles filtered by symbol and date range.
Try: “Show news about NVDA from this week.”
Network ·
get_newsGets bond and treasury quotes
Returns the latest quotes for fixed income securities by ISIN.
Try: “Get the latest quote for this treasury ISIN.”
Network ·
get_fixed_income_latest_quotesLists short-sale locate requests
Lists locate requests filtered by status, symbol or date. Not available on paper trading.
Try: “List my locate requests this week.”
Network ·
get_locatesRequests a short-sale locate
Submits a request to locate shares to borrow for a short sale.
Try: “Request a locate for 100 shares of GME.”
Write ·
create_locateShows one locate request
Returns one locate request by ID.
Try: “Show locate request abc123.”
Network ·
get_locateShows locate availability and price
Returns availability and pricing for borrowing shares of symbols.
Try: “How much does it cost to locate GME shares?”
Network ·
get_locate_quotesSearches Alpaca's guides
Searches Alpaca documentation pages for product and account questions, using Alpaca's hosted docs service.
Try: “How does Alpaca handle pattern day trader rules?”
Network ·
search_alpaca_docsOpens one Alpaca doc page
Fetches a documentation page by its page ID.
Try: “Open that Alpaca docs page.”
Network ·
fetch_alpaca_docSearches Alpaca's API reference
Looks up API endpoints by topic, path, parameter or schema term.
Try: “Which Alpaca endpoint lists positions?”
Network ·
search_alpaca_api_specsLists API endpoints for one spec
Lists the endpoints of one allowed Alpaca API spec.
Try: “List the Trading API endpoints.”
Network ·
list_alpaca_api_endpointsShows docs for one API endpoint
Fetches reference docs for an exact method and path.
Try: “Show docs for GET /v2/positions.”
Network ·
get_alpaca_endpoint_docs
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
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
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-only | Set 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 to | Alpaca trading and market data APIs. Alpaca's hosted docs service (for the five documentation tools) |
| Sign-in and keys | The key and secret sit in your client's config env block. No files are written to disk by the server. |
| Scopes |
|
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
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 6Hide
- github.com · github.com
- github.com · github.com
- pypi.org · pypi.org
- github.com · github.com
- github.com · github.com
- github.com · github.com