
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
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the Alpaca MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 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_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
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.