---
title: "Docs · airgap"
description: "Install airgap, register it with Claude Code, Cursor, VS Code or Factory Droid, set GMI credentials, and look up all 8 MCP tools and configuration."
url: https://www.useairgap.dev/docs
---

# Install, register, run.

Everything you need to put airgap between your agent and your machine: install, client setup, credentials, the 8 tools and their defaults.

## Overview

airgap is an open-source Rust MCP server. It sends the files and commands your agent passes in a tool call to a disposable Linux microVM on GMI Cloud AgentBox v2, runs them there, and returns the scrubbed result. It never executes submitted commands on your computer.

The name describes the boundary around your machine. GMI sandboxes have outbound internet, and files you send leave your computer. Provider isolation, network policy, account permissions and image trust remain part of the security boundary.

## Install

Prebuilt binaries cover x86_64 and ARM64 on Linux, macOS and Windows. The installers verify checksums before replacing anything.

```
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/dhruvil-codes/airgap/main/scripts/install.sh | bash
```

```
# Windows (PowerShell)
irm https://raw.githubusercontent.com/dhruvil-codes/airgap/main/scripts/install.ps1 | iex
```

```
# From source (not published on crates.io)
cargo install --git https://github.com/dhruvil-codes/airgap --locked
```

```
# npm (Node.js 18+, runs the MCP server directly)
npx -y airgap-mcp
```

The [npm launcher](https://www.npmjs.com/package/airgap-mcp) downloads and verifies the matching release, caches it, then starts `airgap --mcp`. Arguments pass through, so `npx -y airgap-mcp setup --yes` runs the normal setup flow.

Set `AIRGAP_VERSION` to pin a release, `AIRGAP_INSTALL_DIR` to choose an install directory, or `AIRGAP_NO_PATH_UPDATE=1` to skip PATH changes.

## Register with your agent

`airgap setup` writes the MCP entry for your client and adds routing rules to `AGENTS.md`, `CLAUDE.md` and `.cursorrules`. It does not call GMI or create compute resources. Flags can be combined.

| Client | Command | Config written |
| --- | --- | --- |
| Claude Code | `airgap setup --claude --yes` | `.mcp.json`, `~/.claude.json` |
| Cursor | `airgap setup --cursor --yes` | `.cursor/mcp.json`, `~/.cursor/mcp.json` |
| VS Code | `airgap setup --vscode --yes` | `.vscode/mcp.json`, `.mcp.json`, `.github/copilot-instructions.md` |
| Factory Droid | `airgap setup --droid --yes` | `.factory/mcp.json`, `~/.factory/mcp.json` |
| Rules only | `airgap setup --rules-only --yes` | `.cursorrules`, `CLAUDE.md`, `AGENTS.md` |

Any other stdio MCP client, such as Windsurf, can use this entry:

```
{
  "mcpServers": {
    "airgap": { "command": "airgap", "args": ["--mcp"] }
  }
}
```

Adding an MCP server does not disable an agent's own terminal. If every command must go through airgap, restrict your client's tool permissions too.

## Credentials

Sandboxes need a compute-scoped AgentBox key. Injection scans and repo audits need an inference key. Local scanners and tool discovery work with no credentials at all.

```
export GMI_AGENTBOX_API_KEY="your-compute-key"
export GMI_MAAS_API_KEY="your-inference-key"
```

```
$env:GMI_AGENTBOX_API_KEY = "your-compute-key"
$env:GMI_MAAS_API_KEY = "your-inference-key"
```

Setup stores discovered keys only in user-level editor configs. Workspace files never receive keys, and setup removes keys it finds there.

## Check your setup

```
airgap doctor
airgap doctor --verbose
```

Doctor checks model availability, AgentBox compute eligibility and editor registrations. It is read-only: it does not launch a sandbox or run an inference completion. Failed checks print a suggested fix and return a nonzero exit code.

## Tools

| Tool | Use it when | Runs on |
| --- | --- | --- |
| `airgap_verify_pr` | A GitHub PR needs verifying in one call | GMI MaaS, local, microVM |
| `airgap_verify_patch` | A local diff needs testing against clean base files | microVM |
| `airgap_sandbox_run` | Ad-hoc run, build, test, reproduce or scrape | microVM |
| `airgap_scan_injection` | Before acting on untrusted issue or PR text | GMI MaaS |
| `airgap_audit_supply` | Before installing from a manifest you did not write | local |
| `airgap_redact_secrets` | Before showing logs, diffs or env vars | local |
| `airgap_audit_repo` | Defensive security review in six static phases | microVM, GMI MaaS |
| `airgap_configure` | Change the default model or request timeout | local |

## Configuration

The process environment wins over `.env` and `cloudvet.env` files in the current directory and four parents. Provider base URLs are read only from the process environment.

| Variable | Default / meaning |
| --- | --- |
| `GMI_API_KEY` | Fallback when a dedicated key is absent |
| `GMI_AGENTBOX_API_KEY` | Compute-scoped AgentBox key |
| `GMI_MAAS_API_KEY` | Inference key |
| `GMI_DEFAULT_IDC` | `us-central-iowa16` |
| `GMI_AGENTBOX_INSTANCE_TYPE` | `gmi.sandbox.medium` (2 vCPU, 4 GiB) |
| `GMI_MODEL` | `deepseek-ai/DeepSeek-V4.1-Flash` |

## Limits

- Commands default to 120 s and accept 1 to 1800 s, plus up to 600 s for provisioning.
- At most four sandbox jobs and four inference requests run at the same time.
- Default images: `rust:1-bookworm` for a root Cargo.toml, `node:20-bookworm` for a root package.json, otherwise `python:3.12-bookworm`.
- The first run for an image builds a template. Later runs reuse it.
- VERIFIED needs exit 0, a recognized test summary, at least one passing test and zero failures. Zero-test runs are never verified.

## Further reading

- [Full tool and configuration reference ↗](https://github.com/dhruvil-codes/airgap/blob/main/docs/reference.md)
- [Editor setup and diagnostics ↗](https://github.com/dhruvil-codes/airgap/blob/main/docs/setup.md)
- [Security model ↗](https://github.com/dhruvil-codes/airgap/blob/main/docs/security-model.md)
- [Hosting with airgap serve ↗](https://github.com/dhruvil-codes/airgap/blob/main/docs/hosting.md)
- [Validation record ↗](https://github.com/dhruvil-codes/airgap/blob/main/docs/validation.md)
