MCP Directory

How to add Alpaca Trading MCP Server to Cursor

Manage your Alpaca stock and crypto portfolio, place trades, and access market data via MCP. Paste the config into ~/.cursor/mcp.json and restart Cursor.

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

Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Alpaca Trading MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Alpaca Trading MCP Server's tools to confirm it's connected.

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 Cursor

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

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.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 Cursor?

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