Skip to content
MCP server

AgentGuard

Let an agent pay on NEAR through a vault whose rules a smart contract enforces

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI
Runs
Locally
Version
0.1.1
Listing updated
3 days ago

About AgentGuard

AgentGuard is an open-source MCP server for finance and payments. It runs locally on your machine and is started by your AI client.

AgentGuard moves spending rules out of the prompt and into a NEAR contract. The agent holds only a function-call key that can call request_payment, so it can ask to pay but cannot pay. The vault answers paid, pending (waits for the human owner) or blocked, with a reason and a transaction link.

The contract applies per-payment and daily caps, an allowlist, a hold on repeated payments and a lookup in a shared scam registry. If the registry does not answer, the payment is blocked. The owner can call lock_rules(), which is one-way: afterwards nobody can loosen the rules or withdraw. Without a key the MCP server runs read-only.

The documented setup targets NEAR testnet by default, with mainnet selectable through NEAR_NETWORK. It runs locally over stdio from the npm package, and the README walks through creating a vault in about two minutes.

Install

Run in a terminal

claude mcp add agentguard-mcp --env AGENTGUARD_VAULT='<AGENTGUARD_VAULT>' --env AGENTGUARD_AGENT_KEY='<AGENTGUARD_AGENT_KEY>' -- npx -y @zaxcoraider/agentguard-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "agentguard-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zaxcoraider/agentguard-mcp"
      ],
      "env": {
        "AGENTGUARD_VAULT": "<AGENTGUARD_VAULT>",
        "AGENTGUARD_AGENT_KEY": "<AGENTGUARD_AGENT_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "agentguard-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zaxcoraider/agentguard-mcp"
      ],
      "env": {
        "AGENTGUARD_VAULT": "<AGENTGUARD_VAULT>",
        "AGENTGUARD_AGENT_KEY": "<AGENTGUARD_AGENT_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "agentguard-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@zaxcoraider/agentguard-mcp"
      ],
      "env": {
        "AGENTGUARD_VAULT": "<AGENTGUARD_VAULT>",
        "AGENTGUARD_AGENT_KEY": "<AGENTGUARD_AGENT_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "agentguard-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zaxcoraider/agentguard-mcp"
      ],
      "env": {
        "AGENTGUARD_VAULT": "<AGENTGUARD_VAULT>",
        "AGENTGUARD_AGENT_KEY": "<AGENTGUARD_AGENT_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "agentguard-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zaxcoraider/agentguard-mcp"
      ],
      "env": {
        "AGENTGUARD_VAULT": "<AGENTGUARD_VAULT>",
        "AGENTGUARD_AGENT_KEY": "<AGENTGUARD_AGENT_KEY>"
      }
    }
  }
}

Configuration

  • AGENTGUARD_VAULTYour AgentGuard vault account, e.g. my-agent.agentguard.testnetRequired
  • NEAR_NETWORKtestnet (default) or mainnet
  • AGENTGUARD_AGENT_KEYThe agent's ed25519 function-call key; without it the server is read-only
  • AGENTGUARD_KEY_FILEPath to a key file to read instead of AGENTGUARD_AGENT_KEY
  • NEAR_RPC_URLOverride the NEAR RPC endpoint
  • SENTINEL_URLWhere to buy Sentinel's paid check

Tools this server provides (7)

Taken from the project documentation; the running server may differ.

agentguard_pay
Asks the vault to pay a recipient an amount in NEAR and returns paid, pending or blocked with the reason.
agentguard_check_address
Checks whether an address is safe to pay and returns allow, warn or block.
agentguard_balance
Shows balance, available funds, 24-hour spend and payment counts.
agentguard_policy
Shows caps, approval threshold, allowlist, registry and lock state.
agentguard_payment_status
Looks up one payment by id.
agentguard_history
Lists recent payment requests, including blocked ones.
agentguard_sentinel_check
Buys Sentinel's paid check over HTTP 402 through your vault.

What it does

Contract-enforced limits
Caps, allowlist and repeat-payment holds are enforced on chain, not by the agent.
Address safety check
Checks the scam registry, lookalike names and prompt-injection text before paying.
Owner approval path
Held payments wait for the human owner to approve or deny.
Read-only mode
Without an agent key the server only reads balances, policy and history.
Paid checks over HTTP 402
Buys Sentinel's paid check through your vault, capped by max_price_near.

Good for

  • Let an agent pay small invoices with hard spending caps
  • Screen a recipient address before sending funds
  • Hold suspicious payment requests for owner review
  • Audit recent paid, held and blocked payments

Pricing

Open source

Open source; NEAR network fees and vault funding apply

Prices change. Check agentguard.app before you buy.

AgentGuard FAQ

Which network does it use?

Testnet by default; set NEAR_NETWORK to mainnet to change it.

Can the agent drain the vault?

The README says the agent's key can call only request_payment, and vaults are created with no full-access key.

How do I install it?

Run claude mcp add agentguard -e AGENTGUARD_VAULT=<vault> -- npx -y @zaxcoraider/agentguard-mcp.

What variables are required?

AGENTGUARD_VAULT is required; AGENTGUARD_AGENT_KEY enables payments.

Is AgentGuard free?

Yes. AgentGuard is open source, so you can use and self-host it for free.

How do I add AgentGuard to Claude Code?

Run this command in your terminal: claude mcp add agentguard-mcp --env AGENTGUARD_VAULT='<AGENTGUARD_VAULT>' --env AGENTGUARD_AGENT_KEY='<AGENTGUARD_AGENT_KEY>' -- npx -y @zaxcoraider/agentguard-mcp

What are the best alternatives to AgentGuard?

The closest alternatives to AgentGuard are REA, Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Agent Roast and Midplane.

Alternatives to AgentGuard

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Remote MCP server exposing the Vybe Solana API to AI clients and code editors

    • 44 tools
    • Remote
    • 2.8K GitHub stars
    • Finance and payments
  3. Indian NSE and BSE stock market data for AI assistants through 48 MCP tools

    • 17 tools
    • Remote
    • Freemium
    • 150 GitHub stars
    • Finance and payments
  4. Agent Roast

    MCP server

    Offline review that flags agent changes which weaken tests, assertions or CI

    Runs locally
    • Open source
    • 4 Hacker News points
    • Developer tools
  5. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  6. Budget Tracker

    MCP server

    Local MCP expense ledger that logs receipts and mileage, splits VAT and prepares rebilling

    • 14 tools
    • Remote
    • Freemium
    • 2 GitHub stars
    • Finance and payments