SuperAPIAI Directory

mcp-guardian

github.com · AI developer platforms

Security and governance proxy for MCP with YAML policies (blocklists, rate limits, token budgets), token cost tracking, health monitoring and RBAC.

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

About this tool

MCP Guardian is a security layer between AI assistants and the tools they invoke, used to govern MCP (Model Context Protocol) connections. AI assistants (such as Claude, Cursor, Cline, etc.) invoke tools such as file read/write, command execution, and database queries through MCP, and Guardian makes every tool request pass through itself first, then decides whether to forward it to the real tool.

Main capabilities:

  • Policy proxy: use YAML rules to allow or deny specified tools, limit invocation frequency, set token budgets, and match by parameter patterns (such as blocking paths containing ../), with hot reload support.
  • Attack interception: built-in hundreds of checks that identify hidden shell commands, path traversal, SQL injection, secret leakage, suspicious URLs, Unicode hidden text, etc. in parameters.
  • Cost tracking: estimate the tokens and cost of each invocation, with support for displaying budgets and consumption rates.
  • Health monitoring: track the success rate and latency of each MCP server, and circuit-break when there are too many failures.
  • Auditing: every allow or block is written to local SQLite (default ~/.mcp-guardian/history.db), and the dashboard reads the same database to display tables and charts.
  • Package scanning: detect CVEs and typo-squatted package names (typo-squat) in installed or configured MCP packages.
  • Adversarial testing: run pnpm harness to replay 800+ attack samples offline and report requests that are blocked or allowed through.
  • Optional capabilities (Agentic AI): threat exchange, authentication, cross-agent attack chain detection, capability graph, agent reputation, dynamic sandbox, protocol fuzzing, policy simulation, incident playbooks and AI investigation, compliance evidence, SPIFFE/mTLS identity, etc.

Usage: after installation, mcp-guardian onboard can be used to automatically wrap existing MCP servers and adjust client configuration; mcp-guardian start starts both the proxy and the dashboard (default port 4000); mcp-guardian setup is used for one-time installation after git clone (pnpm install, build, dashboard SPA). Policy changes require manual approval by default and will not silently modify rules.

Applicable scenarios: personal or enterprise environments that need security, cost, and observability governance for AI tool invocations.

Limitations: the materials do not provide specific billing standards or pricing information; enterprise deployments canchoose Redis (rate limiting, DPoP, circuit-breaker synchronization) and PostgreSQL to replace SQLite, but the specific configuration documentation is not elaborated in the materials; if the IDE bypasses Guardian and connects directly to the MCP server (common with raw SSE URLs), invocations will not be tracked, and the logs will show sse_untracked.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools