← Back to MCP list
🦙

Alpaca Trading MCP

v2.0.0
Model DeductionLocal

alpacahq/alpaca-mcp-server via uvx. Alpaca paper account and API are free; full SIP market data requires Algo Trader Plus ($99/mo). Defaults to ALPACA_PAPER_TRADE=true.

§ Quickstart

Add the following to your MCP client configuration (Cursor, Claude Desktop, etc.):

Replace YOUR_API_KEY / YOUR_SECRET_KEY. For live trading set ALPACA_PAPER_TRADE to false with live keys.

⚠️

Orders are sent to Alpaca API (simulated fills in paper mode). Verify on Alpaca Dashboard.

MCP Client Configuration

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": [
        "alpaca-mcp-server"
      ],
      "env": {
        "ALPACA_API_KEY": "YOUR_API_KEY",
        "ALPACA_SECRET_KEY": "YOUR_SECRET_KEY",
        "ALPACA_PAPER_TRADE": "true"
      }
    }
  }
}

Config file locations

  • Cursor: Settings → MCP, or edit ~/.cursor/mcp.json
  • Claude Desktop: edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\)
View full setup guide →

§ Tools Reference

4 tools

get_stock_snapshot

Comprehensive snapshot (quote, trade, bars)

ParameterTypeRequiredDescription
symbolstringe.g. AAPL

get_stock_bars

Historical OHLCV bars

ParameterTypeRequiredDescription
symbolstringSymbol

get_positions

Get current positions

place_stock_order

Place stock order

ParameterTypeRequiredDescription
symbolstringSymbol
qtynumberQuantity

§ Examples

Once configured, you can ask the AI directly:

Paper buy

Paper-buy 10 shares of AAPL and show positions

Default paper trading mode