Assay
Check MCP tool calls against a policy and review the decisions offline.
Put Assay between your MCP client and a local stdio server. In enforcement mode, Assay checks each routed tools/call request before forwarding it. Its open evidence profile records decisions and, when available, observations of what happened next.
Quickstart ·
How it works ·
See it work ·
MCP example ·
OWASP MCP Top 10 ·
Discussions
Try the MCP quickstart to see the decision for a read request sent to a local mock. The decision records permission to forward the call. A real file read would require separate evidence from the server or operating system.
One golden path: the release-pinned agent journey records the nine driven CLI/MCP steps and their exit/stdout contracts. Its protected-action fixture lives in examples/privileged-action-gate/.
Enforcement and evidence
- Enforce. In enforcement mode, the gate decides
tools/call requests routed through it before forwarding, with the precise reason for each allow or deny. Separate controls on supported Linux hosts include cgroup eBPF IPv4/TCP connect filtering (whose hook error path allows connections) and Landlock TCP-connect port allowlisting. assay sandbox --enforce refuses an unavailable backend or conflicting filesystem policy unless --allow-audit-fallback is explicit. --enforce-net requires --enforce; active Landlock network enforcement rejects policies it cannot express as TCP-port allowlists, even with audit fallback enabled.
- Inspect. Configured producers can export recorded decisions and observations in a bundle. Run
assay evidence verify on a saved bundle to review the result. The privileged-action flow carries the verdict, pre-call establish journey, and declared-vs-observed conformance for CI review without a hosted backend. assay mcp wrap --decision-log records tool-call decisions; assay evidence prepare-incident-package turns that log into an incident package verify-incident-package accepts, with the surface grades the verifier derives. The package is not a count of all calls, not completeness of capture, not proof of what the server did, and an allow is not proof a human accepted.
- Stay honest. Trust Basis classifies supported claims as
verified, self_reported, inferred, or absent; its gates check the declared claim boundaries. A tool returning "success" is the provider's assertion, never proof. Assay ships no single safety score; read each artifact’s source, coverage and non-claims before relying on it.
Quickstart
Install the CLI on Linux or macOS:
curl -fsSL https://getassay.dev/install.sh | sh
assay --version
If you prefer to build from source, run cargo install assay-cli --version 8.0.2 --locked.
For installation diagnostics, run assay doctor.
From an empty directory, run a local demo:
assay demo
The demo creates rules in assay-demo/assay.yaml and a sample trace in
assay-demo/traces.jsonl. To try it with your coding agent, ask:
Change the Calculate operation in the demo trace from add to multiply.
Run the command below and explain which rule caught the change.
assay validate --config assay-demo/assay.yaml --trace-file assay-demo/traces.jsonl
The original trace passes. After the edit, validation exits with code 1 because
the rule allows only add and subtract.
To see a tool call go through the MCP gate, open a source checkout or an
extracted CLI archive and run:
python3 examples/mcp-quickstart/run.py