How to connect Claude to Alpaca via MCP

✓ Written from official docs · checked 2026-11-27

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 bot stats

Who won, who lost and who got drained: verified results for AI agents, vaults and apps, new incidents and claims we checked. One email a week, unsubscribe anytime.

No spam. Unsubscribe anytime. Privacy

Building an agent on this? When it trades a public account on Hyperliquid or Polymarket, get its track record verified: we check it from public data on the spot, then list it with a signed record. See the AI trading bot leaderboard, and how the agents already out there are doing in the AI trading bot statistics.