Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Mergen — Execution & Security Gateway for AI AgentsNew to Visual Studio Code? Get it now.
Mergen — Execution & Security Gateway for AI Agents

Mergen — Execution & Security Gateway for AI Agents

Omer Tahtaci

| (0) | Free
AI agent governance for your IDE. Mergen intercepts shell commands, Git operations, SQL, and cloud actions before they execute, enforcing deterministic Allow, Hold, or Block decisions locally. Works with Claude Code, Cursor, Windsurf, and VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mergen — Execution & Security Gateway for AI Agents

Prompts are not boundaries. AI agents don't know your security, infrastructure, or compliance constraints — and asking them nicely doesn't enforce anything. Mergen is the deterministic gate that sits between your AI agents and your systems: every covered action is evaluated against your policy rules in under 1ms, before it executes, and either passes, is blocked with a guided alternative, or is held for one-click human approval.

All of it runs on 127.0.0.1. No cloud. No LLM in the critical path.

What this extension gives you

A live control panel for the gateway, right in your editor:

  • Overview — protection status, active policies, pending approvals, and the most recent agent actions at a glance, plus system health and account settings
  • Runtime Console — one click out to the full decision log, policy editor, runtime map, and approvals history — shared across every IDE (Cursor, Claude Code, VS Code) so no single extension has to duplicate it
  • Status bar shield — turns yellow when an action awaits your approval, red when something was blocked; you're notified the first time the gate intercepts anything
  • Approve / deny in place — held actions wait in Pending Approvals; the agent resumes the moment you click
  • Account & plan — device-authorized sign-in, same flow as the CLI

The extension auto-starts the local gateway, self-heals blocked edits in plain VS Code (no AI-agent pre-write hook exists at the platform level), and monitors the Claude Code Bash-hook health with one-click repair.

What the gateway enforces

One deterministic gate, six groups of capabilities:

  1. Execution Gateway — shell commands (Claude Code/Windsurf PreToolUse hook + mergen-server exec), edit-time changes, git operations, ephemeral cloud credentials, CI build verdicts
  2. AI Safety defaults — rm -rf, DROP TABLE, terraform destroy, force-pushes, secret exfiltration, unscoped SQL mutations, infra teardown
  3. Policy Engine — human-readable, version-controlled rules; Allow / Hold / Block verdicts; Shadow Mode; sub-1ms local evaluation
  4. Human Approval — Slack approve/deny, role-based routing, quorum rules, escalation to on-call
  5. Team Governance — shared policy sync, RBAC, policy versioning, SOC 2 / ISO 27001 audit exports, tamper-evident hash-chained log
  6. Runtime Intelligence — execution visualizer, incident memory, blunder log, durable per-agent timelines

Install

  1. Install this extension, open the Mergen panel, and click Start Local Gateway — it installs and runs mergen-server for you, wires up your editor's hooks, and shows their health in the panel.

  2. Follow the three-step walkthrough (Mergen: Open Getting-Started Walkthrough) for Slack approvals and account sign-in.

  3. Try it: ask your agent to run something destructive. It won't.

Working in a terminal instead?

Mergen has a full terminal mode — the panel and the CLI are two ways to use the same gateway, so pick one:

npm install -g mergen-server
mergen-server setup --usage-mode cli   # Claude Code CLI hook + shell gating
mergen-server doctor                    # verify hook + gateway health
mergen-server approve <token>          # resolve a held action

Settings

Setting Default Description
mergen.serverPort 3000 Port of the local gateway
mergen.serverPath auto Path to dist/index.js if not auto-detected
mergen.autoStartServer true Start the gateway on activation
mergen.pollIntervalMs 2000 Panel refresh interval

Privacy

The gateway binds to localhost only. Policy evaluation, the decision ledger, and the audit trail never leave your machine unless you configure an integration (Slack, SIEM, PagerDuty) yourself.

Development

cd vscode-extension
npm install
npm run build     # tsc + copy webview assets

Press F5 in VS Code to debug. Package with npm run package.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft