Home › Guides

How to connect Claude to Alpaca via MCP

✓ Written from official docs · checked 2026-10-16

Alpaca's official MCP server runs locally and exposes 65 tools across the Trading and Market Data APIs. These steps come from Alpaca's MCP docs.

Prerequisites

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

Claude Code (CLI)

claude mcp add alpaca --scope user --transport stdio uvx alpaca-mcp-server \
  --env ALPACA_API_KEY=your_alpaca_api_key \
  --env ALPACA_SECRET_KEY=your_alpaca_secret_key

Verify

Restart the client and ask: "What is my Alpaca account balance and buying power?" If account details come back, it is connected.

Safety settings

Source: https://docs.alpaca.markets/us/docs/trading-api-mcp. Not financial advice.

Related

Get the weekly AI-trading stack update

New MCP servers, broker and data API changes, and safety notes. One email a week, unsubscribe anytime.