# MCP Guard > MCP Guard checks an AI agent's tool call before it runs and returns a verdict (allow / ask / block) plus calibrated scores for nine questions (safe, violation, severity, destructive, exfiltration, injected, approval_policy, blast_radius, args_grounded), from one forward pass of a small model. It fits in an agent loop (pre-tool-call hook), an MCP client or gateway, or the tool proxy of a code-mode sandbox. It reduces risk; it does not guarantee safety. ## API - Base URL: https://api.mcp-guard.ai (also https://mcp-guard.ai/v1/…) - Auth: Authorization: Bearer mcpg_live_… (keys from the dashboard) - POST /v1/guard — { action: "db.drop_table(users)" | {tool, args}, intent?, user_message?, trigger?: user_request|tool_result|correction|user_override, constraints?: string[], context?, conversation?: [{role, content}] } → { id, verdict, p_unsafe, reasons[], scores{nine heads}, model, latency_ms } - POST /v1/guard/batch — { checks: [ … up to 64 … ] } → { id, results: [ … ] } - GET /v1/usage — credit balance, free requests left, 30-day usage - GET /v1/openapi — OpenAPI 3.1: https://mcp-guard.ai/v1/openapi - Default verdict: block if p_unsafe ≥ 0.8 or approval_policy says reject; ask if p_unsafe ≥ 0.3, approval_policy says require_human, or args_grounded < 0.5; else allow. Apply your own thresholds to the scores if you prefer. - Response headers: x-request-id, x-credits-charged, x-free-runs-remaining - Errors: 400 invalid_request / invalid_json / too_many_checks, 401, 402 insufficient_credits, 413 payload_too_large, 429 rate_limited, 503 retry (nothing charged). Retry only 429/503/504. ## MCP server - Endpoint: https://api.mcp-guard.ai/mcp (Streamable HTTP, JSON responses), header Authorization: Bearer mcpg_live_… - Tools: guard_check, guard_batch, usage - Claude Code: claude mcp add --transport http mcp-guard https://api.mcp-guard.ai/mcp --header "Authorization: Bearer mcpg_live_…" ## Pricing - 1 credit = 1 check, $0.20 per 1,000 checks; 1,000 free requests per workspace (a batch counts once); failed calls are free - Packs: $5 = 25,000, $25 = 125,000, $100 = 500,000 checks - Plans: Starter $19/mo = 99,750, Pro $99/mo = 544,500, Scale $399/mo = 2,294,250 checks ## Measured facts - Latency: ~15 ms per check on an RTX 4090 (p95 ~23 ms), batch 1; ~120 ms on a CPU (8 threads); add the network round trip (~100 ms typical from Europe) - Accuracy: AUROC 0.855 on R-Judge (held-out test half, 304 trajectories) vs 0.824 for saroku-guard; the difference is not yet statistically significant - Model: DeBERTa-v3-base (184M parameters) fine-tuned on ~31k labelled agent actions - Hosting: inference on GPUs in Switzerland; API edge on Cloudflare; request payloads are not stored; request metadata kept 30 days ## Docs - Quickstart: https://mcp-guard.ai/docs - Scores & verdicts: https://mcp-guard.ai/docs/scores - Integrations (agent loop, Claude Code hook, code-mode sandbox): https://mcp-guard.ai/docs/integrations - MCP server: https://mcp-guard.ai/docs/mcp - Errors, limits & retries: https://mcp-guard.ai/docs/errors - Hosting & data: https://mcp-guard.ai/docs/hosting - API reference: https://mcp-guard.ai/docs/api - Pricing: https://mcp-guard.ai/pricing - For agents: https://mcp-guard.ai/agents.md