# alpaca-guard-mcp

MCP server that wraps the Alpaca trading API with a hard daily USD cap. Paper trading by default. Live trading blocked unless explicit opt-in.

- **Type:** MCP server
- **Trust:** 60/100 (B), scored on the package rubric
- **Verification:** community-indexed — nobody has claimed this listing
- **Version:** 0.1.3
- **Author:** Unknown
- **License:** MIT
- **npm:** alpaca-guard-mcp
- **Source:** https://github.com/evidai/lemon-cake
- **Compatible clients:** claude-code, cursor, copilot, gemini (basis: transport)

## Trust

60/100 (B), scored on the package rubric
- Publisher verified: no
- Install scripts: nothing suspicious found
- Prompt-injection scan: not run
- Obfuscation scan: not run
- Evidence age: 3 days

## Security scan

- **Status:** clean
- **Scanned:** 2026-08-30T23:27:36.051Z
- **Version scanned:** 0.1.3
- **CVEs:** none found by OSV at scan time

## Tools

8 declared. Statically extracted from the shipped source — a floor on the surface, not a census.
- `setup` — Show alpaca-guard-mcp setup status: env vars, paper/live mode, current daily cap, and ledger file location. Read-only.
- `guard_status` — Return today's spend ledger: daily limit, used so far, remaining, lifetime order count, and recent 10 orders. Read-only.
- `guard_set_limit` — Set the daily USD cap. The agent cannot raise its own cap silently — calling this tool is logged in the ledger. Typical use: human operator runs this once to se
- `get_account` — Alpaca account snapshot (buying power, cash, equity, portfolio value, PDT flag). Read-only.
- `get_positions` — Current open positions on Alpaca (symbol, qty, avg entry price, current price, unrealized P&L). Read-only.
- `get_latest_quote` — Latest bid/ask/mid quote for a given symbol from Alpaca's market-data API. Read-only.
- `guarded_place_order`
- `guarded_close_position` — Close a position on Alpaca. Pre-flighted against the daily cap: if closing requires re-opening exposure (short close → re-buy) that exceeds the cap, refuses.

## Install

**Verdict: review** — Installable, but 1 thing to check first: No publisher has proved control of this listing; it is indexed, not vouched for.
**Cautions** (coverage gaps and advisories — never blocking)
- No publisher has proved control of this listing; it is indexed, not vouched for.
**Config** (claude-code):
```json
"{\n  \"mcpServers\": {\n    \"alpaca-guard\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"alpaca-guard-mcp\"\n      ],\n      \"env\": {\n        \"ALPACA_API_KEY\": \"<YOUR_ALPACA_API_KEY>\",\n        \"ALPACA_SECRET_KEY\": \"<YOUR_ALPACA_SECRET_KEY>\"\n      }\n    }\n  }\n}"
```
**Credentials it will ask for** (names only — Forge never holds a value):
- `ALPACA_API_KEY` — Alpaca API Key (optional)
- `ALPACA_SECRET_KEY` — Alpaca Secret Key (optional)
Placeholders only. Forge never holds, brokers, or transmits a credential value — replace each <YOUR_NAME> in your own config file. Do not send a value back to Forge; no Forge endpoint accepts one.
- This entry needs 2 credentials (0 required). The generated config carries placeholders, so it will fail in the editor rather than at runtime if they are left unset.

## Blast radius

Moderate blast radius — holds an api key; runs on your machine.
- Floor 25, ceiling 25 (tier: moderate)
- This is impact, not likelihood. A high radius is not a defect: a filesystem server is supposed to write files. It is never part of the trust score.

## Machine-readable views of this entry

- Signed JSON: https://forgeregistry.com/api/v1/packages/alpaca-guard-mcp
- Install plan: https://forgeregistry.com/api/v1/packages/alpaca-guard-mcp/install-plan
- Alternatives: https://forgeregistry.com/api/v1/alternatives/alpaca-guard-mcp
- HTML page: https://forgeregistry.com/registry/alpaca-guard-mcp
- MCP: POST https://forgeregistry.com/api/mcp → `forge_get_package` / `forge_install_plan`

## About this document

Generated by Forge (https://forgeregistry.com) — a compact rendering of the same record served, signed, at the JSON URL above. Trust and scan facts are the registry's own measurements; anything Forge did not measure is named as unmeasured rather than omitted.
