assay-cli 1.4.0

CLI for Assay
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 pytest and localized evaluation.

⚡ Quick Start

1. Install (macOS / Linux / WSL)

curl -fsSL https://getassay.dev/install.sh | sh

2. Protect an MCP Server

Wrap your existing MCP server command with assay mcp to inject the security layer.

# Before:
uvx project-mcp-server

# After (Protected):
assay mcp run --policy policy.yaml -- uvx project-mcp-server

3. Generate Config for Claude/Cursor

Stop fighting JSON manually. Let Assay discover your local config and generate secure snippets.

assay mcp config-path

4. CI/CD Pipeline

# Generate a ready-to-merge GitHub Actions workflow
assay init-ci --provider github

🐍 Python SDK

Integrate strictly typed validation into your pytest suite.

pip install assay-it
from assay import validate

def test_agent_compliance(traces):
    """
    Validate agent traces against your defined policy.
    Raises strict errors on violations.
    """
    report = validate(
        policy_path="assay.yaml",
        traces=traces
    )

    assert report["passed"], f"Policy Violation: {report['violations']}"

🛠️ 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.