logo
icon

Alpaca MCP Server

Remote Model Context Protocol server for Alpaca's Trading API — trade stocks, options, and crypto from Claude, ChatGPT, or any MCP-compatible AI client over HTTPS.

template cover
Deployed1 times
PublisherzeaburZeabur
Created2026-05-07
Tags
AIDeveloper Tool

Alpaca MCP Server on Zeabur

A remote Model Context Protocol server for Alpaca's Trading API. Once deployed, you can add this server as a custom connector in Claude (web/desktop/mobile) or ChatGPT to trade stocks, options, and crypto and run market analysis through plain-English chat.

Original project: github.com/alpacahq/alpaca-mcp-server — MIT License.

1. Get your Alpaca API keys

  1. Sign up at alpaca.markets
  2. Open the Paper Trading dashboard (recommended for testing)
  3. Generate an API key pair under API KeysGenerate New Key
  4. Copy the API Key ID into ALPACA_API_KEY and the Secret Key into ALPACA_SECRET_KEY when deploying this template

To trade with real money, switch the dashboard to Live, generate live keys, and set ALPACA_PAPER_TRADE=false after deployment.

2. Deploy

Click Deploy and fill in ALPACA_API_KEY and ALPACA_SECRET_KEY. Pick a public domain — Zeabur gives you a free .zeabur.app subdomain or you can bind your own.

3. Connect your AI client

Your MCP endpoint is https://<your-domain>/mcp.

Claude (web, desktop, mobile):

  1. Settings → Connectors → Add custom connector
  2. Name: Alpaca, URL: https://<your-domain>/mcp
  3. Save and toggle the connector on in any chat

ChatGPT:

  1. Settings → Connectors → New connector
  2. URL: https://<your-domain>/mcp, transport: Streamable HTTP

Configuration

VariableDefaultPurpose
ALPACA_API_KEYRequired. Alpaca API key ID
ALPACA_SECRET_KEYRequired. Alpaca API secret
ALPACA_PAPER_TRADEtrueSet to false to enable live (real-money) trading

Advanced: you can also set ALPACA_TOOLSETS post-deploy under Variables — a comma-separated list (e.g. account,positions,orders) that restricts which tool families the MCP server exposes to the AI client.

Security warning

This deployment exposes your Alpaca trading credentials behind an HTTPS endpoint with no built-in auth — anyone with the URL can issue trades on your account. For production use:

  • Keep ALPACA_PAPER_TRADE=true until you've verified the setup
  • Treat the public URL as a secret; do not share it
  • Consider putting the service behind an authenticating proxy

License & attribution

The Alpaca MCP Server is licensed under the MIT License by Alpaca Securities LLC. This Zeabur template repackages the upstream Docker build and is not an official Alpaca product.