Back to Home
alpacahq icon

alpaca-mcp-server

Verified Safe

by alpacahq

Overview

Enables natural language trading operations for Alpaca's Trading API via AI assistants, supporting stocks, options, crypto, portfolio management, and real-time market data.

Installation

Run Command
uvx alpaca-mcp-server serve

Environment Variables

  • ALPACA_API_KEY
  • ALPACA_SECRET_KEY
  • ALPACA_PAPER_TRADE
  • TRADE_API_URL
  • TRADE_API_WSS
  • DATA_API_URL
  • STREAM_DATA_WSS
  • DEBUG
  • HOST
  • PORT
  • ALLOWED_HOSTS
  • MCP_CLIENT

Security Notes

Uses environment variables and `.env` files for sensitive API keys, with explicit warnings against command-line arguments in `cli.py`. Implements DNS rebinding protection for HTTP transport with configurable `allowed-hosts`. `.env` file permissions are set restrictively (0o600) on non-Windows systems. Kubernetes secrets are leveraged in Helm chart deployments for credentials. The primary inherent risk is financial loss from actual trading, which is clearly disclosed to the user.

Similar Servers

Stats

Interest Score97
Security Score9
Cost ClassMedium
Avg Tokens1000
Stars405
Forks119
Last Update2025-12-15

Tags

alpacatradingfinancestocksoptionscryptoportfoliomarket dataai assistantmcp server