
How to add Alpaca MCP Server to Cursor
Alpaca's official trading server for stocks, ETFs, options, and crypto in plain English. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 15, 2026 · 820★ · stdio · apikey · official
Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Alpaca MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Alpaca MCP Server's tools to confirm it's connected.
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 Cursor
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 + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Alpaca MCP Server config there under the "mcpServers" key and restart the client.
Is Alpaca MCP Server safe to use with Cursor?
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.