MCP Directory

How to add Alpaca Trading MCP Server to Claude Desktop

Manage your Alpaca stock and crypto portfolio, place trades, and access market data via MCP. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 32โ˜… ยท stdio ยท apikey

Claude Desktop 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 Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Alpaca Trading MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Alpaca Trading MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

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 Claude Desktop

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 + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_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 Claude Desktop?

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