LogoSTMCP
Download
alpaca-mcp-server

Alpaca MCP Server

Alpaca MCP Server enables LLMs to interact with Alpaca's trading API through natural language, supporting stock/options trading, portfolio management, market data, and watchlists for Claude Desktop, Cursor, and VS Code.

Tools

1. get_account_info

View balance, margin, and account status.

2. get_positions

List all held assets.

3. get_open_position

Detailed info on a specific position.

4. close_position

Close part or all of a position.

5. close_all_positions

Liquidate entire portfolio.

6. get_stock_quote

Real-time bid/ask quote.

7. get_stock_bars

OHLCV historical bars with flexible timeframes (1Min, 5Min, 1Hour, 1Day, etc.).

8. get_stock_latest_trade

Latest market trade price.

9. get_stock_latest_bar

Most recent OHLC bar.

10. get_stock_snapshot

Comprehensive snapshot with latest quote, trade, minute bar, daily bar, and previous daily bar.

11. get_stock_trades

Trade-level history.

12. get_orders

Retrieve all or filtered orders.

13. place_stock_order

Place a stock order of any type (market, limit, stop, stop_limit, trailing_stop).

14. cancel_order_by_id

Cancel a specific order.

15. cancel_all_orders

Cancel all open orders.

16. place_crypto_order

Place a crypto order supporting market, limit, and stop_limit types with GTC/IOC time in force.

17. get_option_contracts

Get option contracts with flexible filtering.

18. get_option_latest_quote

Latest bid/ask on contract.

19. get_option_snapshot

Get Greeks and underlying.

20. place_option_market_order

Execute option strategy.

21. exercise_options_position

Exercise a held option contract, converting it into the underlying asset.

22. get_market_clock

Market open/close schedule.

23. get_market_calendar

Holidays and trading days.

24. get_corporate_announcements

Historical and future corporate actions (e.g., earnings, dividends, splits).

25. create_watchlist

Create a new list.

26. update_watchlist

Modify an existing list.

27. get_watchlists

Retrieve all saved watchlists.

28. get_asset_info

Search asset metadata.

29. get_all_assets

List all tradable instruments with filtering options.

Open Graph image for Alpaca MCP Server

JSON Config

{
  "mcpServers": {
    "alpaca": {
      "command": "/path/to/your/alpaca-mcp-server/venv/bin/python",
      "args": [
        "/path/to/your/alpaca-mcp-server/alpaca_mcp_server.py"
      ],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

Information