
Alpaca MCP Server
OfficialAlpaca's official trading server for stocks, ETFs, options, and crypto in plain English.
Add to your client
Copy the config for your MCP client and paste it into its config file.
uvx alpaca-mcp-serverPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"alpaca-mcp-server": {
"command": "uvx",
"args": [
"alpaca-mcp-server"
],
"env": {
"ALPACA_API_KEY": "<your-alpaca-api-key>",
"ALPACA_SECRET_KEY": "<your-alpaca-secret-key>",
"ALPACA_PAPER_TRADE": "true"
}
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Python 3.10 or later
- The `uv` package manager (provides `uvx`)
- An Alpaca account with API key and secret — create a free paper-trading account at alpaca.markets and generate keys from the dashboard
- An MCP-compatible client (Claude Desktop, Cursor, VS Code, PyCharm, etc.)
About Alpaca MCP Server
The Alpaca MCP Server is the official Model Context Protocol server from Alpaca, letting AI assistants like Claude, Cursor, and VS Code trade and pull market data through Alpaca's Trading and Market Data APIs using plain English. It covers stocks, ETFs, options, and crypto.
It exposes a broad surface: account and portfolio management, order placement and management (including multi-leg options strategies), positions, watchlists, and rich real-time/historical market data for stocks, crypto, and options (bars, quotes, trades, snapshots, and option chains with Greeks).
Because it defaults to Alpaca's free paper-trading environment, you can experiment with order flow and strategy logic without risking real money, then switch to a live account when ready.
Tools & capabilities (12)
get_account_infoRetrieve account balances, buying power, and status
place_stock_orderSubmit a stock/ETF order (market, limit, stop, etc.)
place_option_orderPlace single- or multi-leg options orders
place_crypto_orderPlace a crypto order with GTC/IOC time-in-force
get_ordersList orders by status and filters
cancel_all_ordersCancel all open orders
get_all_positionsList current open positions
close_positionLiquidate a specific position
get_stock_snapshotGet latest bar/quote/trade snapshot for a stock
get_option_chainFetch the option chain with Greeks for an underlying
get_market_moversGet top market movers
get_newsRetrieve market news articles
When to use it
- You want to place and manage stock, ETF, options, or crypto orders from a chat interface
- You're prototyping a trading strategy against Alpaca's free paper-trading account before going live
- You need real-time or historical bars, quotes, and trades for analysis inside an LLM workflow
- You want to build and evaluate multi-leg options strategies with Greeks
- You need to check account balances, portfolio history, and open positions conversationally
- You want to manage watchlists or monitor market status, calendar, and corporate actions
Quick setup
- 1Install `uv` so the `uvx` command is available
- 2Create a free Alpaca paper-trading account and generate an API key and secret
- 3Add the server to your MCP client config with command `uvx` and args `["alpaca-mcp-server"]`
- 4Set `ALPACA_API_KEY` and `ALPACA_SECRET_KEY` in the server's env block
- 5Restart your MCP client and confirm the Alpaca tools appear
- 6Verify by asking for your account info or a stock snapshot
Security notes
This server can place live trades and move money once ALPACA_PAPER_TRADE is false; keep it true while testing and use paper-trading keys first. Treat the API/secret keys as account credentials and scope carefully.
Alpaca MCP Server FAQ
Does it trade with real money by default?
No. It defaults to Alpaca's paper-trading environment using your paper API keys, so you can test order flow safely. You switch to live trading by using live API credentials.
Is this an official Alpaca product?
Yes, it is maintained by Alpaca (alpacahq) and uses the official Alpaca Trading and Market Data APIs.
What does it cost?
The server is free and open source (MIT). A paper-trading Alpaca account is free; live trading and certain real-time data feeds follow Alpaca's standard account and data-subscription terms.
Which asset classes are supported?
Stocks and ETFs, options (including multi-leg strategies and Greeks), and crypto, plus market data tools for each.
What runtime does it need?
Python 3.10+ and the `uv` package manager; it runs locally over stdio and is launched by your MCP client.
Alternatives to Alpaca MCP Server
Compare all alternatives →Official Stripe server for payments, customers, subscriptions, invoices, and billing via natural language.
Coinbase's AgentKit MCP extension for onchain actions: transfers, swaps, and contract calls.
Interact with 60+ EVM chains: balances, transfers, contracts, ENS, and ABI fetching.
Compare Alpaca MCP Server with: