assay-cli-1.4.0 is not a library.
Assay is a high-performance policy engine for AI Agents. It sits between your LLM and your MCP servers, enforcing strict Policy-as-Code to prevent unauthorized tool access, argument injection, and hallucinations.
For Engineers: Rust-powered, sub-millisecond latency, strictly typed. For Agents: Deterministic environment, actionable error messages, self-healing config.
🚀 Features
- MCP Firewall: Wraps any MCP server to enforce allowlists, argument regex, and rate limits.
- Policy-as-Code: Define security rules in simple, version-controlled YAML.
- The Doctor: Self-repairing CLI (
assay doctor) that fixes drift and config errors automatically. - CI-Native: Generates GitHub/GitLab workflows instantly (
assay init-ci). - Python SDK: Stateless validation for
pytestand localized evaluation.
⚡ Quick Start
1. Install (macOS / Linux / WSL)
|
2. Protect an MCP Server
Wrap your existing MCP server command with assay mcp to inject the security layer.
# Before:
# After (Protected):
3. Generate Config for Claude/Cursor
Stop fighting JSON manually. Let Assay discover your local config and generate secure snippets.
4. CI/CD Pipeline
# Generate a ready-to-merge GitHub Actions workflow
🐍 Python SDK
Integrate strictly typed validation into your pytest suite.
"""
Validate agent traces against your defined policy.
Raises strict errors on violations.
"""
=
assert , f
🛠️ Components
| Crate | Description |
|---|---|
assay-core |
The policy engine kernel. Zero dependencies, pure Rust. |
assay-cli |
The developer experience. Logic, Doctor, and Init workflows. |
assay-mcp-server |
The MITM proxy that secures MCP connections. |
assay-metrics |
Telemetry and structured logging events. |
assay-python-sdk |
PyO3 bindings for Python integrations. |
📚 Documentation
Detailed guides and references are available in the docs/ directory or on GitHub.
License
MIT.