# io.github.evidai/alpaca-guard (npm · alpaca-guard-mcp)

Alpaca trading API with hard daily USD cap guard. Paper trading default; live opt-in.

- Trust score: 62/100 (medium)
- Change this week: +17
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `alpaca-guard-mcp`: 62/100 (this document), [markdown](https://verifymcp.io/servers/evidai-alpaca-guard/alpaca-guard-mcp.md), [page](https://verifymcp.io/servers/evidai-alpaca-guard/alpaca-guard-mcp)

## Channel facts

- Registry: `npm`
- Package: `alpaca-guard-mcp`
- Version: `0.1.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 86/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 73 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 66/100
  - AI-judged instruction clarity (good).
  - Tool/resource definitions use about 627 tokens (~78/item across 8 items; 8 tools + 0 resources), lean.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 0/100
  - Stability not yet verified: not enough scan history yet (needs a 30-day window).
- **Tool Coverage**: 90/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 70% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

**Unverified: 1 category.** A category scored 0 because we could not verify it: a data source with nothing on this package, evidence we could not reach, or a check we could not run. We only credit what we can confirm.

## Install

### Claude

```bash
claude mcp add evidai-alpaca-guard -- npx -y alpaca-guard-mcp
```

### Codex

```bash
codex mcp add evidai-alpaca-guard -- npx -y alpaca-guard-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "evidai-alpaca-guard": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "alpaca-guard-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add evidai-alpaca-guard --command npx --arg -y --arg alpaca-guard-mcp
```

### Hermes

```yaml
mcp_servers:
  evidai-alpaca-guard:
    command: "npx"
    args: ["-y", "alpaca-guard-mcp"]
```

### Other

```json
{
  "mcpServers": {
    "evidai-alpaca-guard": {
      "command": "npx",
      "args": [
        "-y",
        "alpaca-guard-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-02 (score 62, +42)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] License: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Schema quality: unverified → good
- [functional] Licence: MIT

### 2026-07-31 (score 20, −7)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 27, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-27 (score 45)

First indexed and scored.

## MCP tools (8)

### `setup` (~36 tokens)

Show alpaca-guard-mcp setup status: env vars, paper/live mode, current daily cap, and ledger file location. Read-only.

### `guard_status` (~35 tokens)

Return today's spend ledger: daily limit, used so far, remaining, lifetime order count, and recent 10 orders. Read-only.

### `guard_set_limit` (~78 tokens)

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 set the daily limit (default $10) before letting the agent loose.

Input parameters:

- `dailyLimitUsd` (number, required): Non-negative USD value. Set 0 to disable trading entirely.

### `get_account` (~30 tokens)

Alpaca account snapshot (buying power, cash, equity, portfolio value, PDT flag). Read-only.

### `get_positions` (~35 tokens)

Current open positions on Alpaca (symbol, qty, avg entry price, current price, unrealized P&L). Read-only.

### `get_latest_quote` (~46 tokens)

Latest bid/ask/mid quote for a given symbol from Alpaca's market-data API. Read-only.

Input parameters:

- `symbol` (string, required): e.g. AAPL, TSLA

### `guarded_place_order` (~162 tokens)

Place an order on Alpaca, but ONLY if the trade's notional USD value fits within today's remaining cap.
Pre-flight is mandatory: agent cannot override. If notional > remaining, returns BUDGET_EXCEEDED with a structured hint.
On success the charge is recorded to the local ledger so the cap survives MCP restarts.

Returns: { allowed, status, tradeNotionalUsd, remainingUsd, limitUsd, alpacaOrder?, x402Receipt? }

Input parameters:

- `limitPrice` (number): Required if type=limit
- `qty` (number, required): Quantity in shares
- `side` (string, required)
- `symbol` (string, required): Ticker e.g. AAPL
- `tif` (string)
- `type` (string)

### `guarded_close_position` (~77 tokens)

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.

Input parameters:

- `qty` (number): Optional — partial close. If omitted, closes the full position.
- `symbol` (string, required): Ticker of the position to close

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/evidai-alpaca-guard/alpaca-guard-mcp#diagnostics

## Score history

- 2026-08-03: 62
- 2026-08-02: 62
- 2026-08-01: 20
- 2026-07-31: 20
- 2026-07-30: 27
- 2026-07-28: 45
- 2026-07-27: 45

## Links

- npm package: https://www.npmjs.com/package/alpaca-guard-mcp
- Socket report: https://socket.dev/npm/package/alpaca-guard-mcp
- Repository: https://github.com/evidai/agent-payment-mcp
- Changelog RSS feed: https://verifymcp.io/servers/evidai-alpaca-guard/alpaca-guard-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/evidai-alpaca-guard/alpaca-guard-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/evidai-alpaca-guard/alpaca-guard-mcp
