
Alpaca Guard
Let agents call Alpaca trading APIs with paper trading by default and a hard daily USD spend cap before live trading is opt-in.
Overview
alpaca-guard is an MCP server for the Ship phase that connects agents to Alpaca with paper trading by default, live trading opt-in, and a hard daily USD cap guard.
What is this MCP server?
- Alpaca Markets API bridge exposed as MCP tools
- Hard daily USD cap guard on trading-related spend or exposure
- Paper trading default when Alpaca API keys are unset
- Live trading requires explicit opt-in and ALPACA_API_KEY plus ALPACA_SECRET_KEY
- npm package alpaca-guard-mcp v0.1.1 with stdio transport
- Package version 0.1.1
- Hard daily USD cap guard per server description
- Two secret env vars: ALPACA_API_KEY and ALPACA_SECRET_KEY
Community signal: 2 GitHub stars.
What problem does it solve?
An agent with full Alpaca access can rack up unintended orders or daily loss without a simple MCP-level spending guard.
Who is it for?
Solo builders testing agent-driven Alpaca workflows who want paper-first behavior and a hard daily dollar guardrail.
Skip if: Casual users who only need read-only quotes with no trading, or teams that require institution-grade compliance tooling beyond a cap guard.
What do I get? / Deliverables
Your agent trades through Alpaca with paper as the default path, optional live keys, and a enforced daily USD cap before orders go through.
- Agent-callable Alpaca trading with paper default
- Hard daily USD cap enforcement layer on MCP tool path
- Explicit live-trading opt-in via secret API credentials
Recommended MCP Servers
Journey fit
Guarded brokerage access belongs in ship when you harden agent actions that can move real money, applying caps and safe defaults before you scale automated strategies in grow. Security subphase under ship covers risk limits and safe defaults for production-adjacent agent tooling—including financial blast-radius controls.
How it compares
Risk-capped Alpaca MCP connector, not a prediction-market or USDC billing server.
Common Questions / FAQ
Who is alpaca-guard for?
alpaca-guard is for developers wiring trading agents to Alpaca who want paper-by-default execution and a hard daily USD limit when going live.
When should I use alpaca-guard?
Use it in ship after your strategy logic exists, when you are ready to expose trading tools to an agent but need caps and paper trading before real money.
How do I add alpaca-guard to my agent?
Install npm package alpaca-guard-mcp, configure stdio in your MCP client, leave keys unset for paper mode or set ALPACA_API_KEY and ALPACA_SECRET_KEY for live opt-in per repository docs.