AgentGuard

v0.3.1
io.github.MerchantGuard/agentguard Checked 1 day ago Published 2 months ago

Local spend caps, kill-switch blocking and Ed25519-signed receipts for AI agent tool calls.

Values you need

VariableWhat it is
AGENTGUARD_MCP_DAILY_CAP_CENTSoptional Local daily spend cap in cents. A nonnegative integer. Default: 500
AGENTGUARD_MCP_PER_CALL_CAP_CENTSoptional Local per-call spend cap in cents. A nonnegative integer. Default: 100
AGENTGUARD_MCP_TENANToptional Tenant identifier stamped into local receipts. Default: mcp-local
AGENTGUARD_HOMEoptional Local signing-key, configuration and ledger directory. Defaults to .agentguard in the operating system home directory.
AGENTGUARD_MCP_LEDGERoptional Local decision storage. ndjson persists receipts across restarts; memory retains this process only. Default: ndjson
AGENTGUARD_MCP_DISABLE_COST_OVERRIDEoptional Set to 1 to discard and prevent model pricing overrides for this server. Default: 0
AGENTGUARD_LOCK_COST_OVERRIDESoptional Spend SDK startup lock. Set to 1 to prevent model pricing overrides. Default: 0
AGENTGUARD_ACTOR_DIGESToptional Set to 1 to hash actor identifiers before they enter local receipts. Default: 0
AGENTGUARD_LICENSE_KEYoptional secret Optional AgentGuard license key for license validation and seat registration. Otherwise read from local configuration.
AGENTGUARD_LICENSE_ENDPOINToptional License and seat service base URL. No prompts, tool content or receipts are sent. Default: https://agentguard.run
AGENTGUARD_NO_BEACONoptional Set to 1 to disable optional activation telemetry regardless of saved consent. Default: 0
AGENTGUARD_TELEMETRYoptional Set to 1 to opt in to content-free activation telemetry. Otherwise saved consent applies, default off. Default: 0
AGENTGUARD_INSTALL_IDoptional Optional identifier used only by opted-in activation telemetry when no saved install identifier exists.
AGENTGUARD_ANONYMOUS_INSTALL_IDoptional Legacy fallback for AGENTGUARD_INSTALL_ID in opted-in activation telemetry.
CIoptional Existing runtime marker. A nonempty value marks opted-in activation telemetry as CI; it does not enable telemetry.
GITHUB_ACTIONSoptional Existing runtime marker. A nonempty value marks opted-in activation telemetry as CI; it does not enable telemetry.
GITLAB_CIoptional Existing runtime marker. A nonempty value marks opted-in activation telemetry as CI; it does not enable telemetry.
CIRCLECIoptional Existing runtime marker. A nonempty value marks opted-in activation telemetry as CI; it does not enable telemetry.
BUILDKITEoptional Existing runtime marker. A nonempty value marks opted-in activation telemetry as CI; it does not enable telemetry.
VERCELoptional Existing runtime marker. A nonempty value marks opted-in activation telemetry as CI; it does not enable telemetry.
NETLIFYoptional Existing runtime marker. A nonempty value marks opted-in activation telemetry as CI; it does not enable telemetry.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add agentguard -- npx -y --package=@agentguard-run/mcp@0.3.1 agentguard-mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "agentguard": {
      "args": [
        "-y",
        "--package=@agentguard-run/mcp@0.3.1",
        "agentguard-mcp"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "agentguard": {
      "args": [
        "-y",
        "--package=@agentguard-run/mcp@0.3.1",
        "agentguard-mcp"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "agentguard": {
      "args": [
        "-y",
        "--package=@agentguard-run/mcp@0.3.1",
        "agentguard-mcp"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.agentguard]
command = "npx"
args = ["-y", "--package=@agentguard-run/mcp@0.3.1", "agentguard-mcp"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: spend_decide, verify_receipt, export_receipts, set_model_cost, provenance_preview, spend_status.
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json