MCP Directory

How to add Alpaca Trading MCP Server to Windsurf

Manage your Alpaca stock and crypto portfolio, place trades, and access market data via MCP. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 32 · stdio · apikey

Windsurf config for Alpaca Trading MCP Server

pip install -e .
{
  "mcpServers": {
    "alpaca-trading-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/alpaca-mcp-server",
        "run",
        "src/server.py"
      ]
    }
  }
}

Setup steps

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

Before you start

  • Python with the project installed via 'pip install -e .' or 'uv pip install -e .'
  • uv (used in the Claude Desktop config to run the server)
  • An Alpaca account with Paper Trading API key and secret (ALPACA_PAPER_API_KEY, ALPACA_PAPER_API_SECRET)

What Alpaca Trading MCP Server can do in Windsurf

get_account_info_tool

Get current account information.

place_market_order

Place a market order to buy or sell a stock.

place_limit_order

Place a limit order to buy or sell a stock at a specified price.

place_stop_order

Place a stop order to buy or sell a stock when it reaches a specified price.

place_stop_limit_order

Place a stop-limit order combining stop and limit order features.

cancel_order

Cancel an open order by its ID.

close_position

Close an open position for a specific symbol.

get_portfolio_summary

Get a comprehensive summary of the portfolio.

Security

Requires Alpaca API credentials (ALPACA_PAPER_API_KEY and ALPACA_PAPER_API_SECRET) stored in a local .env file. The README configures the server against Alpaca's Paper Trading API. The server can place and cancel live orders and close positions, so credentials grant trade-execution capability on the connected account.

Alpaca Trading MCP Server + Windsurf FAQ

Where is the Windsurf config file?

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

Is Alpaca Trading MCP Server safe to use with Windsurf?

Requires Alpaca API credentials (ALPACA_PAPER_API_KEY and ALPACA_PAPER_API_SECRET) stored in a local .env file. The README configures the server against Alpaca's Paper Trading API. The server can place and cancel live orders and close positions, so credentials grant trade-execution capability on the connected account.

How do I install it for Claude Desktop?

You can install it automatically via Smithery with 'npx -y @smithery/cli install @laukikk/alpaca-mcp --client claude', or manually clone the repo, run 'pip install -e .', and add the mcpServers config block pointing 'uv' at the cloned alpaca-mcp-server directory.

What credentials are required?

Alpaca Paper Trading API credentials. Copy .env.example to .env and set ALPACA_PAPER_API_KEY and ALPACA_PAPER_API_SECRET, which you can obtain by creating an account at Alpaca.

What resources does the server expose?

It exposes resources including account://info, positions://all, positions://{symbol}, orders://recent/{limit}, market://{symbol}/quote, market://{symbol}/bars/{timeframe}, assets://list, and assets://{symbol}.

View repo Full Alpaca Trading MCP Server page