Skip to main content
Glama
AgentGuard
by bfedorg
README.md
# AgentGuard — DeFi & Wallet Security Suite (MCP + x402)

**Autonomous pre-trade token security, honeypot scanner, counterparty KYW wallet intelligence, and DEX allowance firewall for AI trading agents on Base and Solana — monetized natively via the `x402` HTTP 402 USDC protocol.**

No API keys, no SaaS accounts, no KYC friction. Agents call `quick_token_ping` or `quick_wallet_ping` for free to test connectivity and upgrade seamlessly to paid security audits via `x402` (`Base EIP-3009` or `Solana SPL USDC`).

## Why Trading Agents Use AgentGuard
- **Module 1 — DeFi Guard (`Base` & `Solana`)**: On-chain bytecode selector analysis (`mint`, `blacklist`, `pause`, `setFee`), EIP-1967/EIP-1167 proxy detection, ownership renouncement check, honeypot/tax simulation, AMM price impact, mint/freeze authority inspection, holder concentration, and `maxSafeTradeUsd` sizing.
- **Module 2 — WalletGuard (`Base` & `Solana`)**: Counterparty & whale wallet profiling (`SHRIMP`..`WHALE` tiering), ETH/SOL & USDC balance verification, GoPlus sanctions/phishing/drainer checks, plus unlimited ERC-20 DEX allowance scanning (`Uniswap Permit2`, `Universal Router`, `Aerodrome`, `1inch`, `0x`, SPL delegates).
- **Dual Transport**:
  - **Streamable HTTP MCP**: `POST /mcp` (for autonomous agents, LangGraph, ElizaOS, AgentKit).
  - **Direct x402 REST**: `/v1/defi-guard/*` and `/v1/wallet-guard/*` (`OpenAPI 3.1.0` at `/openapi.json`).
  - **Local `npx` Stdio Bridge**: `npx agentguard-x402-mcp` (for Cursor & Claude Desktop with optional local `EIP-3009` auto-signing).

## Pricing (x402 v2)
| Tool / Endpoint | Price | Purpose |
| --- | --- | --- |
| `quick_token_ping` (`GET /v1/defi-guard/ping`) | **Free** (5/day per IP) | Token metadata, DEX liquidity USD, price & OK/CAUTION/DANGER pre-check |
| `deep_pretrade_audit` (`POST /v1/defi-guard/audit`) | **$0.015 USDC** | Full contract/authority audit, honeypot/tax check, holder concentration & `maxSafeTradeUsd` |
| `batch_pool_scan` (`POST /v1/defi-guard/batch-scan`) | **$0.050 USDC** | Parallel audit of up to 10 Base/Solana tokens in one atomic x402 call |
| `quick_wallet_ping` (`GET /v1/wallet-guard/ping`) | **Free** (5/day per IP) | Wallet ETH/SOL & USDC balances, portfolio USD & whale tier pre-check |
| `counterparty_wallet_profile` (`POST /v1/wallet-guard/profile`) | **$0.010 USDC** | Counterparty KYW intelligence, GoPlus sanctions/phishing checks & risk verdict |
| `wallet_approvals_audit` (`POST /v1/wallet-guard/approvals-audit`) | **$0.020 USDC** | Full counterparty profile + unlimited DEX allowance & SPL delegate audit |

## Quick Start for Cursor / Claude Desktop
```json
{
  "mcpServers": {
    "agentguard": {
      "command": "npx",
      "args": ["-y", "agentguard-x402-mcp"],
      "env": {
        "AGENTGUARD_URL": "https://agentguard-x402-mcp.onrender.com",
        "X402_CLIENT_PRIVATE_KEY": "0x_optional_key_with_small_base_usdc_balance",
        "X402_MAX_USDC_PER_CALL": "0.05"
      }
    }
  }
}
```

## Discovery Manifest
- `GET /.well-known/x402` — x402 v2 resource pricing & self-hosted facilitator metadata
- `GET /health` — Service health & supported networks

## License
MIT

TDQS

B3.4/5.0

Scored across 6 tools

Disambiguation4/5

The set splits cleanly into token tools (quick_token_ping free, deep_pretrade_audit paid, batch_pool_scan paid) and wallet tools (quick_wallet_ping free, counterparty_wallet_profile, wallet_approvals_audit), with free/paid and quick/deep distinctions made explicit. Minor overlap remains between quick_wallet_ping and wallet_approvals_audit, since both return wallet risk context, and 'pool_scan' vs 'batch audit of tokens' is a slightly fuzzy boundary.

Naming Consistency4/5

All names are snake_case and largely follow a modifier_subject_action shape (quick_/deep_/batch_ prefixes), which is easy to scan. However, three tools lead with a qualifier and three lead with a noun (counterparty_wallet_profile, wallet_approvals_audit), and batch_pool_scan names a 'pool' while describing a token batch, so the pattern is not perfectly uniform.

Tool Count5/5

Six tools is tightly scoped for a pre-trade security guard: one free and one paid variant for each of the two domains plus a batch and a counterparty check. Every tool has a distinct role and nothing feels redundant or padded.

Completeness4/5

The surface covers the core lifecycle of check-before-you-trade: quick screening, deep token audit, batch scanning, wallet balance/whale tier, counterparty sanctions, and allowance/delegate exposure. Gaps are minor but real — there is no remediation path (e.g. revoking flagged approvals), no retrieval of past audit results, and no transaction-level simulation tool.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues