Skip to main content
Glama
agentguard

agentguard

Official

@agentguard-run/mcp

AgentGuard® as an MCP server: local spend caps and Ed25519-signed provenance receipts for AI agent actions, usable from any Model Context Protocol host (Claude Desktop, Claude Code, Cursor, Cline, or your own agent runtime).

Zero data plane. Tools accept metadata only: model names, token counts, endpoint URLs. Prompts and completions never pass through this server, and their content stays on your machine. Receipts are content-free.

A configured license uses the license and seat service. Optional activation telemetry requires consent and can be disabled with AGENTGUARD_NO_BEACON=1. Neither path sends prompts, tool content or receipts.

Install

{
  "mcpServers": {
    "agentguard": {
      "command": "npx",
      "args": ["-y", "@agentguard-run/mcp"]
    }
  }
}

Optional environment variables:

Variable

Default

Meaning

AGENTGUARD_MCP_DAILY_CAP_CENTS

500

Hard per-day spend cap (block on exceed)

AGENTGUARD_MCP_PER_CALL_CAP_CENTS

100

Hard per-call spend cap (block on exceed)

AGENTGUARD_MCP_TENANT

mcp-local

Tenant scope stamped into receipts

AGENTGUARD_HOME

~/.agentguard

Signing key and decision-ledger directory

AGENTGUARD_MCP_LEDGER

ndjson

Persist signed decisions; memory restores process-only storage

AGENTGUARD_MCP_DISABLE_COST_OVERRIDE

unset

1 discards and prevents pricing overrides

AGENTGUARD_ACTOR_DIGEST

unset

1 stores SHA-256 digests of actor IDs; provider stays readable

A signing keypair is generated on first run and persisted to <AGENTGUARD_HOME>/mcp-signing.json (0600). Signed decisions are appended to <AGENTGUARD_HOME>/<tenant>/decisions.ndjson, including the public verification key. Exports include prior process runs and new decisions extend the existing chain. Tenant directory names use the spend store's filename normalization. Spend counters remain process-local, as in earlier versions.

All tools accept optional agent_id, task_id, and workflow_id identifier parameters. spend_decide passes these to the call context, signing them as actor.agentId, actor.taskId, and actor.workflowId; the configured tenant becomes actor.tenantId. Other tools accept these metadata fields without recording a spend decision. Prompts, arbitrary content, credentials, and filesystem paths are rejected as IDs. Existing calls without these parameters keep working.

Related MCP server: mneme-ai

Tools

  • spend_decide: gate a model call before it runs. Returns allow/block plus a signed, hash-chained receipt recording model identity, weights origin country (China-origin families such as GLM, DeepSeek, Qwen, and Kimi are flagged automatically), hosting jurisdiction, and retention posture. Unrecognized endpoints (vLLM, Ollama, TGI, your own cluster) route as self-hosted: zero retention, your jurisdiction.

  • verify_receipt: independently verify any receipt. Change one signed byte and verification fails.

  • export_receipts: export the tenant decision ledger as a verified hash chain, including earlier process runs. Memory mode exports only the current process.

  • set_model_cost: register pricing for self-hosted models (AgentGuard fails closed on unknown costs).

  • provenance_preview: see what would be attested for a model/endpoint without spending.

  • spend_status: active caps, tenant, decision count, signer fingerprint.

Why

When agents move from hosted APIs to self-hosted models, the provider's spend dashboard, rate limits, and audit logs disappear with the provider. AgentGuard puts them back, locally, and adds something hosted providers never gave you: a cryptographic receipt an outsider can verify without trusting you or us.

More: https://agentguard.run/sovereign/ and https://agentguard.run/sovereign/guide/

Verify independently

Any receipt can be checked off-platform at https://agentguard.run/verify or with verify_receipt and the signer public key from spend_status.

Local release verification

Requires Node.js 20.19 or later. Run npm ci, npm test, and npm run scan:release from this package or its public mirror. The lockfile uses the published spend 0.19.0 package; no private sibling checkout is required.

Release checklist: keep package.json, the server version in src/index.ts, and both versions in server.json aligned; run the tests and release scan; publish npm first, publish with mcp-publisher, then verify the registry's active entry. See the registry release guide for exact commands and the public mirror allowlist.

The official registry name is io.github.MerchantGuard/agentguard. Its package entry runs @agentguard-run/mcp locally through npx and stdio.

AgentGuard® is a registered trademark of Dunecrest Ventures Inc. US patent filings pending. This package is governance software, not legal or compliance advice.

Available Tools

6 tools
export_receiptsA

Export the tenant decision ledger, including earlier process runs, as a hash-chained array of signed receipts with a chain verification result. Memory mode exports this process only. Optional agent_id, task_id and workflow_id accept identifiers only; spend_decide binds them into the signed actor. Read-only and cost-configuration tools accept these fields without recording a spend decision.

Inputs: task_id, agent_id, workflow_id.

provenance_previewA

Preview the provenance AgentGuard would attest for a model and endpoint WITHOUT spending: model identity, weights origin country (China-origin families flagged), hosting jurisdiction, retention posture. Optional agent_id, task_id and workflow_id accept identifiers only; spend_decide binds them into the signed actor. Read-only and cost-configuration tools accept these fields without recording a spend decision.

Inputs: model (required), task_id, agent_id, workflow_id, +1 more.

set_model_costA

Register a cost for a model with no built-in pricing (required for self-hosted models: AgentGuard fails closed on unknown costs). Cents per 1,000 tokens. Optional agent_id, task_id and workflow_id accept identifiers only; spend_decide binds them into the signed actor. Read-only and cost-configuration tools accept these fields without recording a spend decision.

Inputs: model (required), input_cents_per_ktok (required), output_cents_per_ktok (required), task_id, +2 more.

spend_decideA

Gate a model call BEFORE it runs. Pass metadata only (model, token counts, endpoint URL), never prompt content. Returns allow/block plus an Ed25519-signed, content-free receipt with model and hosting provenance (weights origin, jurisdiction, retention). Unknown self-hosted models need set_model_cost first (fail-closed). Optional agent_id, task_id and workflow_id accept identifiers only; spend_decide binds them into the signed actor. Read-only and cost-configuration tools accept these fields without recording a spend decision.

Inputs: model (required), input_tokens (required), output_tokens (required), task_id, +3 more.

spend_statusA

Show the active policy: caps, tenant, enforcement mode, decisions so far this session, and the signer identity. Optional agent_id, task_id and workflow_id accept identifiers only; spend_decide binds them into the signed actor. Read-only and cost-configuration tools accept these fields without recording a spend decision.

Inputs: task_id, agent_id, workflow_id.

verify_receiptA

Independently verify an AgentGuard signed receipt. Returns valid true/false. Tampering with any signed field makes verification fail. Optional agent_id, task_id and workflow_id accept identifiers only; spend_decide binds them into the signed actor. Read-only and cost-configuration tools accept these fields without recording a spend decision.

Inputs: receipt_json (required), task_id, agent_id, workflow_id, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool has a distinct function: preview, status, export, set cost, decide, and verify. The repeated optional identifier language adds some textual similarity, but the core purposes are clearly separate, with only mild potential overlap between preview and status.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (provenance_preview, spend_status, export_receipts, set_model_cost, spend_decide, verify_receipt). The verbs are descriptive and the nouns align with the API's domain, making the naming pattern highly predictable.

    Tool Count5/5

    With 6 tools, the server is well-scoped. Each tool serves a distinct role in the spend-gating and receipt lifecycle, and none feel redundant or missing a critical counterpart. This is an appropriate count for a focused security/attestation service.

    Completeness4/5

    The tool set covers the core workflow: previewing provenance, checking status, setting model costs, making decisions, exporting receipts, and verifying them. Missing is a tool to modify policy (caps, enforcement mode), which is only exposed read-only via spend_status. This is a minor gap that an agent could work around if policies are managed externally.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to operate through a local, signed boundary that blocks prompt injection and secret leakage, verifies outputs, preserves cross-session memory, and provides offline-verifiable receipts. It also exposes 900+ MCP tools for discoverable agent actions.
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to govern downstream tool servers by enforcing default-deny authority and attestation on every tool call, with live monitoring, approval, and mid-session revocation.
      3
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Owner-signed authorization before agent actions. Hosted Vizier v0.5.13 MCP: https://vizier.agendamcp.dpdns.org/mcp. ALLOW/BLOCK/REVIEW; anonymous calls never ALLOW. Your integration enforces the decision. SDK v0.5.13: https://www.npmjs.com/package/@agenda-intelligence/vizier-sdk. Grants are signed; legacy receipts are unsigned. Python stdio is a separate catalog.
      3
      MIT