MCP Directory

How to add Alpaca MCP Server to Windsurf

Alpaca's official trading server for stocks, ETFs, options, and crypto in plain English. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 15, 2026 · 820 · stdio · apikey · official

Windsurf config for Alpaca MCP Server

uvx alpaca-mcp-server
{
  "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.

Setup steps

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Alpaca MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Alpaca MCP Server's tools become available to Cascade.

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.)

What Alpaca MCP Server can do in Windsurf

get_account_info

Retrieve account balances, buying power, and status

place_stock_order

Submit a stock/ETF order (market, limit, stop, etc.)

place_option_order

Place single- or multi-leg options orders

place_crypto_order

Place a crypto order with GTC/IOC time-in-force

get_orders

List orders by status and filters

cancel_all_orders

Cancel all open orders

get_all_positions

List current open positions

close_position

Liquidate a specific position

Security

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Alpaca MCP Server config there under the "mcpServers" key and restart the client.

Is Alpaca MCP Server safe to use with Windsurf?

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.

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.

View repo Full Alpaca MCP Server page