All guidesSecurity deep dives

The zero-trust MCP playbook

Roll airgap out across a team on Claude Code, Cursor, VS Code and Factory Droid with managed routing rules and client permission gates.

The zero-trust MCP playbook

Enterprise rollout without workflow friction: Engineering teams can adopt autonomous coding agents safely across Claude Code, Cursor, VS Code, and Factory Droid by combining three controls: one-command repository setup, user-scoped credential storage, and client permission gates that require approval for host shell execution while letting mcp__airgap__* tools run smoothly.

Step 1: Register airgap across your team's editors

Run the non-interactive setup command in your repository root (requires Node.js 18+ or the standalone binary):

npx -y airgap-mcp setup --yes

Setup detects installed clients, registers the MCP server, and writes managed routing rules (fenced between <!-- airgap:begin --> and <!-- airgap:end --> markers so existing instructions are preserved):

ClientMCP config writtenRouting rules file
Claude Code.mcp.json / ~/.claude.jsonCLAUDE.md
Cursor.cursor/mcp.json / ~/.cursor/mcp.json.cursorrules
VS Code.vscode/mcp.json / .mcp.json.github/copilot-instructions.md
Factory Droid.factory/mcp.json / ~/.factory/mcp.jsonAGENTS.md
Any stdio MCP clientPaste JSON snippet from /docs#setupAdd airgap routing rules to your system prompt

Step 2: Keep credentials out of git

airgap setup writes discovered API keys only into user-level config files (never workspace files committed to git) and refuses symlinked config files or parent directories so a cloned repo cannot redirect credential writes. Process environment variables (GMI_AGENTBOX_API_KEY, GMI_MAAS_API_KEY) always take precedence over .env files, and provider base URLs (GMI_AGENTBOX_BASE_URL, GMI_MAAS_BASE_URL) are read only from the process environment so a cloned repo's .env can never exfiltrate keys to a rogue endpoint.

Step 3: Enforce the boundary with client tool permissions

Registering an MCP server does not disable an agent's built-in host terminal. For strict team environments, pair airgap's routing rules with your client's tool-permission policy:

  1. Allow mcp__airgap__* tools: Let developers run PR verification, patch tests, manifest audits, injection scans, and secret redaction without repetitive approval prompts.
  2. Gate host shell tools: Require explicit human confirmation for local Bash / terminal execution tools so untrusted commands cannot silently fall back to the host.
  3. Verify with airgap doctor: Run airgap doctor in onboarding checks to confirm binary integrity, editor registration, and credential availability.

Step 4: Shared or hosted HTTP deployment

For teams that prefer centralized key management over per-laptop keys, run airgap serve to expose the same 8 MCP tools over Streamable HTTP behind your internal network and auth proxy. See the full Docs and the hosting guide for deployment details.

Keep reading

All 12 guides

Verify a pull request

Scan, clone at the pinned SHA and run the tests in one call.

Test a local patch

Send clean base files and a diff. Your working tree stays put.