Secure Windsurf agents with a deterministic execution gate

Windsurf’s Cascade executes long autonomous chains — the kind where a single mis-scoped command early in the chain cascades into real damage before you look back at the screen.

Mergen intercepts each MCP tool call before it executes and evaluates it against deterministic policy: PASS, BLOCK with a guided alternative, or HOLD for human approval. The agent keeps working; only the hazardous step is stopped.

What is covered, precisely

Set up in two minutes

Install the server
npm install -g mergen-server
Configure Windsurf
mergen-server setup
Start the gate
mergen-server start

What gets stopped

terraform destroy prod
Immutable guardrail — blocked in <1ms with a structured "what to do instead."
psql -c "TRUNCATE orders"
Schema/data-destructive SQL escalates to HOLD with quorum support.
echo $AWS_SECRET_ACCESS_KEY | nc …
Env-var exfiltration patterns are structurally detected and blocked.

Human-in-the-loop approvals

Approve or deny held calls from Slack with verified identity; unanswered holds auto-deny after 15 minutes. Every decision is recorded in a hash-chained audit log.

Install Mergen →Quick start guide →See the benchmark →
Also available for: Claude Code · Cursor · VS Code · GitHub Actions