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 --yesSetup 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):
| Client | MCP config written | Routing rules file |
|---|---|---|
| Claude Code | .mcp.json / ~/.claude.json | CLAUDE.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.json | AGENTS.md |
| Any stdio MCP client | Paste JSON snippet from /docs#setup | Add 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:
- Allow
mcp__airgap__*tools: Let developers run PR verification, patch tests, manifest audits, injection scans, and secret redaction without repetitive approval prompts. - Gate host shell tools: Require explicit human confirmation for local
Bash/ terminal execution tools so untrusted commands cannot silently fall back to the host. - Verify with
airgap doctor: Runairgap doctorin 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.