assay_check_argsLABSCO SUMMARY
Two ways in: a gate the agent cannot bypass, or a check it can call itself.
The wrap is the enforcement — the server behind it never sees a denied call. The three assay_* tools are the cooperative half, letting an agent validate arguments or a sequence and get back a suggested fix rather than a failure. Generating a first policy from a real trace is the practical way to start, since writing an allowlist from scratch for an unfamiliar server usually means blocking something you needed.
What it is
A policy layer for MCP. assay mcp wrap puts the Assay engine in front of a server so every tool call is checked before it is forwarded, and a second set of tools lets an agent check its own call before making it.
What you get
assay mcp wrap --policy policy.yaml -- your-mcp-servergates a server without changing its code; blocked calls never reach it- A policy is YAML:
tools.allowandtools.denyby name, plus JSON Schema constraints per tool — a path pattern, a minimum length,additionalProperties: false - Decisions come back readable: ALLOW with
policy_allow, DENY withpath_constraint_violationortool_denied assay_check_argsvalidates arguments against the schema and returns violations with suggestions and a suggested fixassay_check_sequencevalidates a proposed next tool against the history that came before itassay_policy_decidedoes an exact-name check against a compatibility blocklist — argument-aware evaluation belongs toassay_check_argsassay init --from-trace trace.jsonlwrites a starting policy from what your agent actually did--audit-logrecords mandate lifecycle events and--decision-logrecords every ALLOW/DENY as NDJSON;assay evidence exportandassay evidence verifypackage and check them, andassay evidence lint --pack eu-ai-act-baselinechecks against a compliance pack
Requirements
The Assay CLI, from cargo install assay-cli, plus a policy file. Any stdio-based MCP server works behind it. assay mcp config-path cursor prints the detected Cursor config location and a ready-to-paste entry; Windsurf and Zed take the same wrapped command under mcpServers and context_servers respectively.
Setup effort
One command — cargo install assay-cli
USE CASES
Making a filesystem server safe to hand an agent
Allow reads and listings, deny writes and exec, and constrain paths with a schema pattern.
Writing the first policy without guessing
Generate it from a captured trace of what the agent actually called.
Letting the agent check before it acts
Validate the arguments or the next step and read back the violation and the suggested fix.
Producing evidence someone will audit
Export the decision log as a verifiable bundle and lint it against a compliance pack.
3 tools
Listed in project docs. Your client may show a different list.
assay_check_sequenceassay_policy_decideBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation.
INSTALLATION
Connect your client
Server setup
cargo install assay-cliMCP Clients
Cursor
assay mcp config-path cursorWindsurf
{
"mcpServers": {
"filesystem-secure": {
"command": "assay",
"args": [
"mcp",
"wrap",
"--policy",
"<YOUR_PATH_TO_POLICY>",
"--",
"npx",
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/<YOUR_USERNAME>"
]
}
}
}Zed
{
"context_servers": {
"filesystem-secure": {
"command": "assay",
"args": [
"mcp",
"wrap",
"--policy",
"<YOUR_PATH_TO_POLICY>",
"--",
"npx",
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/<YOUR_USERNAME>"
]
}
}
}Claude Code
assay mcp config-path