← Back to directory
A

Alpaca MCP Server

Official
Alpaca's official MCP server for trading stocks, ETFs, crypto, and options via natural language.
GitHub source repository ↗
★ 926 Stars Category · Dev Tools Very popular Source revision 872abbf28dab
62FMRS · C
Reliability
10/20
Security and permissions
12/20
Maintenance
10/20
Documentation
16/20
Setup experience
14/20

The Alpaca MCP server is an official, feature-rich server covering multiple asset classes and trading operations, but requires careful use due to real trading risks.

Read the FMRS scoring method →

Alpaca's official MCP server, built with FastMCP and OpenAPI specs, provides 60+ tools covering account management, trading, positions, market data, news, and more. Supports stocks, options, crypto, fixed income, indices, and other asset classes. Users can execute trades, fetch real-time and historical market data, and manage portfolios through natural language instructions in AI assistants like Claude, Cursor, and VS Code.

Tools

get_account_info
Get account balance, margin, and status
get_account_config
View trading restrictions, margin settings, PDT checks
update_account_config
Update account configuration settings
get_portfolio_history
Get equity and P/L over time
get_account_activities
Get fills, dividends, transfers
get_account_activities_by_type
Get activities filtered by type
get_orders
Retrieve orders with filters
get_order_by_id
Get a single order by ID
get_order_by_client_id
Get a single order by client order ID
replace_order_by_id
Replace an existing open order
cancel_order_by_id
Cancel a specific order
cancel_all_orders
Cancel all open orders
place_stock_order
Place stock/ETF orders (market, limit, stop, etc.)
place_crypto_order
Place crypto orders (market, limit, stop-limit)
place_option_order
Place option orders (single-leg or multi-leg)
get_all_positions
Get all current positions
get_open_position
Get details for a specific position
close_position
Close a specific position
close_all_positions
Liquidate entire portfolio
exercise_options_position
Exercise a held option contract
do_not_exercise_options_position
Send do-not-exercise instruction
create_watchlist
Create a new watchlist
get_watchlists
List all watchlists
get_watchlist_by_id
Get a specific watchlist
update_watchlist_by_id
Update a watchlist
delete_watchlist_by_id
Delete a watchlist
add_asset_to_watchlist_by_id
Add an asset to a watchlist
remove_asset_from_watchlist_by_id
Remove an asset from a watchlist
get_all_assets
List assets with optional filtering
get_asset
Get detailed info for a specific asset
get_option_contracts
Get option contracts for underlying symbol(s)
get_option_contract
Get a single option contract by symbol or ID
get_calendar
Get market calendar for a date range
get_clock
Get current market status and next open/close
get_corporate_action_announcements
Get corporate action announcements
get_corporate_action_announcement
Get a single announcement by ID
get_stock_bars
Get historical OHLCV bars
get_stock_quotes
Get historical bid/ask quotes
get_stock_trades
Get historical trades
get_stock_latest_bar
Get latest minute bar
get_stock_latest_quote
Get latest quote
get_stock_latest_trade
Get latest trade
get_stock_snapshot
Get comprehensive snapshot (quote, trade, minute bar, etc.)
get_most_active_stocks
Get most active stocks by volume or trade count
get_market_movers
Get top gainers and losers
get_crypto_bars
Get historical OHLCV bars for crypto
get_crypto_quotes
Get historical quotes for crypto
get_crypto_trades
Get historical trades for crypto
get_crypto_latest_bar
Get latest minute bar for crypto
get_crypto_latest_quote
Get latest quote for crypto
get_crypto_latest_trade
Get latest trade for crypto
get_crypto_snapshot
Get comprehensive snapshot for crypto
get_crypto_latest_orderbook
Get latest orderbook for crypto
get_option_bars
Get historical OHLCV bars for options
get_option_trades
Get historical trades for options
get_option_latest_trade
Get latest trade for options
get_option_latest_quote
Get latest quote with bid/ask and exchange info
get_option_snapshot
Get snapshot with Greeks and IV
get_option_chain
Get full option chain for an underlying
get_option_exchange_codes
Get exchange code to name mapping
get_corporate_actions
Get corporate action announcements from market data
get_news
Get news articles for stocks and crypto
get_fixed_income_latest_quotes
Get latest quotes for fixed income securities by ISIN
get_index_latest_values
Get latest values for market indices
get_index_values
Get historical values for market indices
get_locates
List locate requests filtered by status, symbol, or date range
create_locate
Create a locate request for a short sale
get_locate
Get a single locate request by ID
get_locate_quotes
Get locate availability and pricing for symbols
search_alpaca_docs
Search Alpaca documentation pages and guides
fetch_alpaca_doc
Fetch one Alpaca ReadMe documentation page by page ID
search_alpaca_api_specs
Search Alpaca API reference endpoints by topic, path, parameter, or schema term
list_alpaca_api_endpoints
List endpoints for one allowed Alpaca OpenAPI spec
get_alpaca_endpoint_docs
Fetch reference docs for one exact Alpaca API endpoint by method and path

Setup

  1. Ensure Python 3.10+ and uv are installed. 2. Create a free paper trading account at the Alpaca Dashboard and generate API keys. 3. Edit your MCP client config (e.g., Claude Desktop, Cursor, VS Code) to add the above mcpServers configuration with your API keys. 4. Restart the client.
claude_desktop_config.json
{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

Fit and risk

Best for

  • Developers who want to automate trading
  • Users who want to use AI assistants for investment research and trade execution
  • Traders familiar with Alpaca brokerage services

Not for

  • Users who need a hosted remote MCP server (Alpaca does not provide hosted service)
  • Users who want to trade mutual funds or futures (not supported)
  • Users who need to view Broker API docs (server excludes Broker API endpoints)

Required permissions

  • Access Alpaca account information (balances, positions, orders)
  • Place orders on behalf of the user (buy, sell, cancel)
  • Read market data and news
  • Read Alpaca documentation

Risks and side effects

  • The server can execute real trades, potentially leading to financial loss
  • API keys are sensitive credentials and should be handled securely
  • Options and crypto trading carry high risk and are not suitable for all investors
  • Algorithmic outputs are based on historical data and may not predict future markets

Troubleshooting

  1. If uvx is not found, install uv and restart your terminal
  2. Ensure ALPACA_API_KEY and ALPACA_SECRET_KEY are set in the client's config
  3. Restart the client after config changes
  4. If using HTTP transport, check for port conflicts

Use cases

Check account balance and buying power
View current positions and order status
Place stock, crypto, and option orders via natural language
Fetch real-time and historical market data (bars, quotes, trades)
Manage watchlists and corporate action announcements

Supported clients

Claude DesktopFull support
CursorFull support
VS CodeFull support
Claude CodeFull support
PyCharmFull support
Antigravity CLIFull support
ChatGPTPartial support
Claude MobilePartial support