invariantlabs-ai/invariant
A security layer that sits between AI agent applications and their MCP servers or LLM providers, enforcing rule-based guardrails on tool calls.

Invariant Guardrails is a Python-based security framework for AI agent systems. It deploys as a proxy between applications and LLM providers or MCP servers, using simple Python-inspired rule matching to detect and prevent malicious or unwanted agent behavior. Rules can identify dangerous tool call patterns, such as email exfiltration attacks, and automatically intercept flagged operations. The system integrates transparently without requiring invasive code changes to the host application.