Airlock: Permissions-Aware MCP Gateway MCP Server
Permissions-aware MCP gateway with per-agent allow/ask/deny policy, HITL approvals, and audit logs.
Airlock: Permissions-Aware MCP Gateway scores 70 (Good), licensed MIT and written in TypeScript. It installs as a local process. It does not declare tools yet. Filed under Knowledge. GitHub shows 18 stars. Package registries report about 558 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
70 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
65/100 for listing completeness. Lost points: no listed tools, short summary.
How quality is graded
Where the 70 comes from
22 + 20 + 7 + 10 + 4 + 7 = 70. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 7 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "airlock-dev-airlock": { "command": "npx", "args": [ "-y", "airlock-bot@0.4.1" ] } }}
Environment variables
This server does not declare environment variables.
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
Airlock
A permissions-aware MCP gateway that sits between AI agents (Claude Code, Cursor, OpenClaw, etc.) and your downstream tool servers, CLI tools, and REST APIs. Airlock enforces per-agent allowlists, requires human approval for sensitive operations, and keeps a full audit trail of every tool call.
Agent (Claude Code / Cursor / OpenClaw)
│ stdio, streamable HTTP, or SSE
▼
Airlock ←→ HITL (Telegram / Slack / webhook / TUI / macOS / iOS / dashboard)
│
├── MCP servers (github, filesystem, ...)
├── CLI tools (git, docker, kubectl, ...)
├── REST APIs (any OpenAPI spec)
├── built-in: http/get, http/post, ...
└── built-in: exec/run
Features
- Per-agent policy — each agent sees only the tools it can use, with
allow,ask,deny, andremember_allowover namespaced tools (github/create_pr,filesystem/read_file), plusarg_policy/arg_scope(value_sets+arg_dimensions) andcommand_policyfor CLI-dispatcher tools - HITL approvals, grants, plans, async & previews — gate sensitive calls with time-limited grants (
tool,tier,provider,profile), multi-step plans (airlock_request_approval), non-blocking async approvals (airlock_await_approval), batched notifications, and operator-only structured approval previews (approvals.previews) - Native iOS & macOS companions + HITL providers — native iOS Companion (APNs push, interactive actions, TestFlight, cross-device dismissal) and macOS Companion alongside Command Center dashboard, Telegram, Slack webhook, generic webhook, OpenClaw, TUI, macOS dialog, and stdio
- Rebuilt Command Center & Policy Assistant — browser Approvals Inbox, active Grants view, Activity audit log, Agent Composer with one-time
token_sha256keys, Policy Assistant, and Provider Health - Composable profiles & sandboxing — reusable permission sets (
extends+ top-leveldefault_profile) and OS-levelsandbox_presetswith tool variants (alias_of) - Middleware pipeline — schema validation, staged
upload-policy, prompt injection detection, canary tokens, PII classification, output scanning, rate limiting, and output size limiting / summarization - Stateless Streamable HTTP (MCP 2026-07-28) — sessionless
/agents/:agentId/mcpwithX-Airlock-Session-Idscoping alongside legacy SSE and lean stdio mode - MCP Events (SEP-3415) & MCP Apps — default-deny
events/pollandevents/streampush subscriptions withevents.arg_policy, untrusted payload scanning, and live reload revocation, plus opt-inmcp_apps: trueinline view proxying (io.modelcontextprotocol/ui) with namespacedui://URIs and auditedresources/read - Staged File Uploads (
uploads.enabled: true) — push binary and large files from disk through single-use presigned URLs to OpenAPI, built-in HTTP, upstream MCP, and CLI tools without passing raw bytes through LLM context - Resilient OAuth,
client_credentials& hot-add HTTP providers — browser OAuth2 (with native gateway callbacks viaoauth_callback_mode: gateway, single-writer revisioned grant storage, andairlock oauth status|history|restore), machine-to-machineclient_credentialswith disk-cached tokens, and zero-downtime hot-add HTTP providers usingbearer_token_file - Credential Health & Catalog Drift — active
credential_probeverification and order-independent SHA-256toolCatalog/eventCatalogcontract fingerprints on/health - Backend adapters & auto-discovery — unified gateway for MCP servers, CLI tools (
--help, shell completions, Fig specs), OpenAPI 3.x REST APIs, built-in HTTP, and exec - Policy introspection CLI & interactive TUIs —
config check,explain,who-can,tools, andlint, plusconfigure-agentandconfigure-cliTUIs - Security defaults & audit trail — localhost and RFC-1918 blocking, per-agent domain allowlists, shell injection prevention, SQLite audit log with secret redaction, and hot reload
- Leaner stdio mode —
--agentruns with no HTTP data-plane server and connects only to providers the agent references (opening an ephemeral loopback listener on127.0.0.1only whenuploads.enabled: true)
Install
Requires Node.js 22 or newer.
npm install -g airlock-bot
Quick start
# 1. Start the gateway (:4111) + Command Center (:4112)
# Auto-creates a no-secret ./airlock.yaml on first run
npx airlock-bot
# Or scaffold & validate the starter config first
npx airlock-bot init
npx airlock-bot config check --config airlock.yaml
# Or connect a local MCP client over stdio
npx airlock-bot --agent claude-code --config airlock.yaml
The starter exposes the built-in HTTP and exec tools with fail-closed command and domain policy. Safe read-only operations are allowed, mutating operations require approval, and everything else is denied. See the quickstart to connect a client, then add your own providers or discovered CLI/API tools.
Claude Code setup
Add Airlock as an MCP server in ~/.claude/mcp.json:
{
"mcpServers": {
"airlock": {
"command": "airlock",
"args": ["--agent", "claude-code", "--config", "/path/to/airlock.yaml"]
}
}
}
Or without a global install:
{
"mcpServers": {
"airlock": {
"command": "npx",
"args": ["airlock-bot", "--agent", "claude-code", "--config", "/path/to/airlock.yaml"]
}
}
}
Or install as a Claude Code plugin directly from GitHub:
/plugin marketplace add airlock-dev/airlock
/plugin install airlock@airlock
Airlock is also packaged for the Official MCP Registry under io.github.airlock-dev/airlock (airlock-bot on npm).
See examples/claude-code-setup.md for a full walkthrough.
Discovery
Auto-generate Airlock config from existing tools instead of writing YAML by hand.
CLI discovery
# Parse --help output (works with any CLI)
airlock discover cli docker
# Try Fig autocomplete specs first, fall back to --help
airlock discover cli kubectl --fig
# Write to a file, limit recursion depth
airlock discover cli git --output git-commands.yaml --max-depth 2
# Only include specific commands
airlock discover cli npm --include install,test,run
Reference the output in your config:
clis:
git:
discovered: ./git-commands.yaml
max_output_bytes: 30000 # default matches Claude Code's limit
commands:
# Inline commands override discovered ones with the same name
custom-deploy:
exec: 'git push origin main'
params: {}
API discovery
# From a local spec file
airlock discover api ./petstore.json --output petstore-api.yaml
# From a URL
airlock discover api https://api.example.com/openapi.json --base-url https://api.example.com
# Filter endpoints
airlock discover api ./spec.json --include "GET *" --exclude "DELETE *"
Reference in config:
apis:
petstore:
spec: ./petstore.json
base_url: https://petstore.example.com/v1
auth:
type: bearer
token: ${PETSTORE_TOKEN}
timeout_ms: 30000
max_response_bytes: 1048576
Configure agent TUI
Interactively assign allow/ask/deny to tools discovered from your live MCP servers:
airlock configure-agent --config ./airlock.yaml --agent claude-code
Navigate with j/k, set permissions with a/s/d (per tool or bulk per provider), then Enter to edit config directly, copy to clipboard, or print YAML.
Config
providers:
github:
type: stdio
command: npx
args: ['-y', '@modelcontextprotocol/server-github']
env:
GITHUB_PERSONAL_ACCESS_TOKEN: '${GITHUB_TOKEN}'
exec: builtin
http: builtin
# CLI tools exposed as MCP tools
clis:
git:
discovered: ./git-commands.yaml
shell: /bin/bash
max_output_bytes: 30000
commands:
status:
exec: git status
params: {}
log:
exec: 'git log --oneline -n {count}'
params:
count:
type: number
required: false
default: 10
# REST APIs exposed as MCP tools
apis:
petstore:
spec: ./petstore.json
base_url: https://petstore.example.com/v1
auth:
type: bearer
token: ${PETSTORE_TOKEN}
# Reusable permission profiles
profiles:
readonly:
allow:
- github/list*
- github/get*
- http/get
developer:
allow:
- github/*
- git/*
- exec/run
ask:
- github/create_pr
- github/merge_pull_request
agents:
helena:
extends: [readonly, developer]
exec:
allow: ['git status', 'git diff*', 'npm test*']
ask: ['git push*']
deny: ['sudo *', 'rm -rf *']
env:
PATH: '/usr/local/bin:/usr/bin:/bin'
http:
domain_allowlist: ['api.github.com', '*.sentry.io']
claude-code:
extends: [readonly]
exec:
allow: ['git status', 'git diff*', 'npm test']
approvals:
provider:
type: telegram
bot_token: '${TELEGRAM_BOT_TOKEN}'
chat_id: '${TELEGRAM_CHAT_ID}'
timeout_ms: 300000
batch_window_ms: 10000
Precedence: the most specific matching pattern wins — an exact tool name beats
provider/prefix*, which beats provider/* (longer prefixes beat shorter ones). Equally specific
matches break ties deny > remember_allow > ask > allow, and anything unmatched is
default-denied.
See examples/gateway.yaml for a fully annotated reference config and examples/profiles.yaml for composable profile examples.
Sandbox presets and tool variants
Airlock can expose multiple names for the same underlying tool by using tool_overrides.<name>.alias_of.
This is especially useful when you want different approval posture for the same capability:
- a tightly sandboxed variant that is safe enough to
allow - a broader variant that still goes through
ask
That pattern helps reduce approval fatigue without giving up higher-power versions of the tool.
Why use presets?
Sandbox config gets repetitive quickly. A typical local-only transform tool wants the same shape every time:
- read the repo
- write only to
/tmp - deny secret directories like
~/.ssh - no outbound network
Top-level sandbox_presets let you define that once and reuse it across agents and tool variants.
Example: safe Python fast path + approved full Python
providers:
exec: builtin
sandbox_presets:
local_transform:
filesystem:
allow_read:
- '.'
allow_write:
- '/tmp'
- '/private/tmp'
deny_read:
- '~/.ssh'
- '~/.aws'
- '.env'
deny_write:
- '.'
network:
allowed_domains: []
denied_domains: []
github_only:
network:
allowed_domains:
- 'github.com'
- '*.github.com'
- 'api.github.com'
denied_domains: []
agents:
claude-code:
allow:
- 'python/sandboxed'
ask:
- 'python/full'
- 'python/github'
sandbox:
enabled: true
presets:
- local_transform
tool_overrides:
python/sandboxed:
alias_of: 'exec/run'
description: 'Run Python for local transformations only'
python/full:
alias_of: 'exec/run'
description: 'Run Python with broader permissions after approval'
sandbox:
filesystem:
allow_write:
- '.'
- '/tmp'
- '/private/tmp'
deny_write: []
network:
allowed_domains:
- 'pypi.org'
- '*.pythonhosted.org'
denied_domains: []
python/github:
alias_of: 'exec/run'
description: 'Run Python with GitHub-only network access after approval'
sandbox_presets:
- github_only
In this example:
python/sandboxedinherits the agent'slocal_transformpreset and can be broadly allowedpython/fullkeeps the same base tool but overrides filesystem and network to be more permissive, so it should stay inaskpython/githubreuses the same local transform defaults but adds a reusable GitHub-only network preset
Preset merge rules
Presets are expanded during config parsing.
sandbox.presetsapplies to the whole agent sandbox baselinetool_overrides.<tool>.sandbox_presetsapplies only to that tool variant- explicit
sandboxvalues on the tool override win over preset values when they conflict - deny lists are additive
- allow lists usually replace the previous value so the tool variant can define a tighter or broader envelope intentionally
Approval and audit visibility
When a tool call requires approval, Airlock includes the resolved sandbox summary in the approval payload and formatter output. That means operators can see things like:
- which presets were applied
- whether network is disabled or limited to specific domains
- where writes are allowed
- which paths are explicitly denied
Audit entries also include the resolved sandbox context alongside the tool arguments, so you can later verify not just what command ran, but under what safety envelope it ran.
Practical guidance
- Use a sandboxed
allowvariant for cheap local work like JSON transforms, parsing, codegen, or text munging - Keep networked or repo-writing variants in
askuntil you've smoke-tested the exact runtime you care about - Prefer a small number of named presets such as
local_transform,github_only,npm_registry, orreadonly_repo - If a tool needs a one-off tweak, put that in the tool override instead of copying a giant sandbox block everywhere
See examples/sandbox-presets.yaml for a fuller example config focused on this pattern.
HITL providers
| Provider | Config type | Notes |
|---|---|---|
| TUI | tui | Terminal UI on stderr — [a]pprove / [d]eny with j/k navigation via /dev/tty |
| macOS dialog | macos | Native approve/deny popup via osascript — best for local dev on Mac |
| Dashboard | dashboard | Browser UI with live SSE updates; runs in-process or as a standalone admin dashboard |
| iOS companion | ios | APNs push to the Airlock iOS companion app; see HITL providers |
| Telegram bot | telegram | Long-polls for replies; reply approve ABC123 or deny ABC123 |
| Slack webhook | slack | Incoming webhook, fire-and-forget; pair with slash commands for approvals |
| Generic webhook | webhook | POSTs {requests, text} JSON; configurable headers |
| OpenClaw | openclaw | WebSocket RPC to OpenClaw gateway; see examples/openclaw-setup.md |
| stdio | stdio | Prints to stderr, reads from stdin — for local dev and testing |
API
When running in gateway mode, Airlock can expose a separate management API
listener for operator/control-plane routes. It is disabled by default and binds
to 127.0.0.1:4113 when enabled:
server:
api_secret: ${AIRLOCK_API_SECRET}
management_api:
enabled: true
api_secret: ${MANAGEMENT_API_SECRET}
GET /health — MCP health, pending HITL count, uptime
GET /hitl/pending — list pending approval requests
POST /hitl/approve/:id — approve a request by canonical approval ID
POST /hitl/deny/:id — deny by canonical approval ID (body: {"reason": "..."})
GET /audit?agent=&tool=&since=&limit= — query audit log
GET /events — dashboard approval event stream
POST /approve?code=ABC123 — approve via manual-entry approval code
POST /deny?code=ABC123 — deny via manual-entry approval code
GET /admin/tools — dashboard tool catalog
All management endpoints require Authorization: Bearer <management_api.api_secret>.
If management_api.api_secret is unset, Airlock temporarily falls back to
server.api_secret and emits a deprecation warning so existing deployments keep
working while operators split the control-plane secret from the data-plane
fallback.
The management listener must use a different port than the agent MCP
data-plane listener (server.port, default 4111). Binding the management API
beyond loopback requires the explicit management_api.insecure_remote_bind: true
opt-in and trusted network controls.
Testing
npx vitest run # unit + integration tests
npx vitest run test/integration.test.ts # just the integration test (real child process)
npm run typecheck # TypeScript type check (no emit)
npm run build # Full build to dist/
Interactive testing with MCP Inspector
A self-contained test config with an echo MCP server is included — no tokens or external services needed:
npx @modelcontextprotocol/inspector npx tsx src/index.ts -- --agent test --config test/test-gateway.yaml
Open http://localhost:6274, then list tools and call echo/echo or echo/add through the UI.
systemd
sudo cp airlock.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now airlock
See airlock.service for the full unit file.
Docker
Airlock can also run as a containerized gateway:
docker build -t airlock-bot:local .
mkdir -p airlock-config
cp examples/docker-gateway.yaml airlock-config/airlock.yaml
docker run --rm \
--env-file .env \
-v "$PWD/airlock-config:/config" \
-v airlock-data:/data \
-p 127.0.0.1:4111:4111 \
-p 127.0.0.1:4113:4113 \
-p 127.0.0.1:4112:4112 \
airlock-bot:local
The dashboard edits /config/airlock.yaml and writes /config/airlock.bak, so
mount a config directory when dashboard editing is enabled.
See examples/docker-compose.yaml and
docs/guides/docker-deploy.md for a VPS or
reverse-proxy deployment. The compose example uses split mode: the gateway mounts
config read-only, while the dashboard mounts the same config directory read-write
for admin edits and approval decisions.
License
MIT © 2026 Airlock
Frequently asked questions
What is Airlock: Permissions-Aware MCP Gateway MCP Server?
Permissions-aware MCP gateway with per-agent allow/ask/deny policy, HITL approvals, and audit logs.
How do I install Airlock: Permissions-Aware MCP Gateway MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Airlock: Permissions-Aware MCP Gateway MCP Server runs locally from the npm package airlock-bot with the command npx -y airlock-bot@0.4.1.
Is Airlock: Permissions-Aware MCP Gateway MCP Server free and open source?
Yes. Airlock: Permissions-Aware MCP Gateway MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Airlock: Permissions-Aware MCP Gateway MCP Server support remote (HTTP) connections?
No remote endpoint is listed for Airlock: Permissions-Aware MCP Gateway MCP Server. It runs locally on your machine over stdio, started by your MCP client.
How is Airlock: Permissions-Aware MCP Gateway MCP Server's trust score calculated?
Airlock: Permissions-Aware MCP Gateway MCP Server scores 70 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.