SuperAPIAI Directory

canaryguard-402

github.com · AI security

CanaryGuard 402 is a deterministic prompt injection firewall and security audit API for autonomous AI agents. It provides 28 REST endpoints and 26 remote MCP tools for performing machine-verifiable pre-execution checks. The service supports gasless USDC pay-per-use via x402 V2 on Base Mainnet and Solana Mainnet (priced $0.010 - $0.100), while also offering a free public evaluation endpoint (POST /v1/sanitize/preview) and an Apify pay-per-event option ($0.003/event). The project also provides integration packages such as an ElizaOS plugin, a Coinbase AgentKit Action Provider, and a TypeScript SDK.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

CanaryGuard 402 is a deterministic prompt injection firewall and security audit API for autonomous AI agents, designed to provide AI agents with machine-verifiable pre-execution security checks.

Key capabilities:

  • Provides 28 REST endpoints and 26 remote MCP tools for detecting and neutralizing prompt injection threats.
  • Core functions include: sanitizing input content, returning status (clean, sanitized, or blocked), risk score, whether injection was detected, number of neutralized threats, sanitized content, security receipt, extracted crypto addresses, and check limitation notes.
  • Supports strict mode (strict_mode, enabled by default): when role/instruction override or wallet transfer commands are detected, the returned text is emptied; in non-strict mode, matching instruction lines are removed. Both modes perform HTML/Unicode sanitization.
  • Can extract EVM addresses from text context and score them, but scoring does not verify ownership, on-chain reputation, or contract security.

Usage:

  • Free evaluation: try it via POST /v1/sanitize/preview without a wallet or API key.
  • Paid calls: all 28 HTTP endpoints and 26 MCP tools accept gasless USDC payments based on x402 V2, supporting Base Mainnet (eip155:8453) and Solana Mainnet. The standard payment flow is: unpaid request → HTTP 402 challenge → client signs authorization → retry with PAYMENT-SIGNATURE → facilitator verification and settlement → HTTP 200 and PAYMENT-RESPONSE.
  • Remote MCP endpoint:https://canaryguard-402.onrender.com/mcp,工具名为 canary_sanitize, you need to set the request header Accept: application/json, text/event-stream. Standard desktop MCP hosts (such as Claude Desktop, Cursor) currently need to handle payment challenges through an x402 transport proxy.
  • Self-hosting: You can import the repository into a Node 20+ environment or container (Render, Docker, etc.) for deployment.
  • Integration packages: Provides @kurox_real/plugin-canaryguard (ElizaOS plugin), @kurox_real/agent-canaryguard-402 (Coinbase AgentKit Action Provider), @kurox_real/canaryguard-client (TypeScript SDK, automatically handles x402 payments).

Use cases:

  • Autonomous AI agents perform prompt injection detection and sanitization on inputs before execution.
  • AI agent workflows that require machine-verifiable security audits.
  • Add security tools to desktop AI agents via the MCP protocol.

Limitations and notes:

  • The input must be an object containing content (1–50,000 characters), with an optional boolean field strict_mode; no other fields are allowed; the JSON transport limit is 256 KiB.
  • The service limits requests to 120 per minute per client IP (except /health).
  • Error codes: missing or invalid payment returns 402; malformed or invalid input returns 400; request body too large returns 413; cached payment already used but content changed returns 409; capacity/rate limit returns 429; facilitator failure returns 503.
  • HTTP receipts are keyed by the normalized payment payload hash and bound to the JSON request body. Retries with the same payment/request body return the original response and settlement receipt (Idempotency-Replayed: true). The cache is retained for up to ten minutes. MCP has a separate small bounded retry cache.
  • Both caches are in-memory local caches, limited to the current process.
  • Address scoring does not verify ownership, on-chain reputation, or contract security.
  • Standard desktop MCP hosts currently cannot natively handle the HTTP 402 payment flow and require an x402 transport proxy or autonomous agentorchestrator. Other information:
  • Online Web playground available: canaryguard-402.onrender.com
  • Apify Store Actor: apify.com/kuroxreal/canaryguard-402 ($0.003/run)
  • Agent discovery: canaryguard-402.onrender.com/llms.txt
  • License: MIT
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools