mcp-airlock MCP server
Governance proxy for MCP servers: allowlist, forced dry run, human confirmation, blast radius, audit
25 stars278 downloads/wk
Reviews
Write oneNobody has reviewed mcp-airlock yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
mcp-airlock tools
No tool declarations could be read from the package source. They show once the server is installed.
Public scan report
scanner v0.1.8 · 2026-09-19 · same rubric, same numbers if you re-run it
- Code scan12 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 3 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
What the publisher says
From the mcp-airlock repository's README, as published. We do not edit it. Read it on GitHub
mcp-airlock
Русская версия
mcp-airlock is a proxy you put between an AI agent and an MCP server when the server can do things you don't want an agent doing on its own. It speaks the 2026-07-28 revision of the protocol (the stateless one: no session, no initialize, one POST per request) and adds the parts the protocol leaves to you: who is allowed to call what, dry runs by default, a human in the loop for dangerous calls, an audit trail and tracing.
It is deliberately small. There is no UI, no policy language beyond flat YAML, no MCP SDK of its own. The whole proxy is one Starlette app plus a few helper modules.
How a call goes through
The agent sends a normal tools/call to the proxy instead of the server. The proxy:
it behind a gateway that already did the authentication, from an X-Airlock-Principal header. It is never taken from the request body. No principal, no call.
- Works out who is calling. That comes from a JWT (Authorization: Bearer) or, if you run
a risk tier per environment, so the same delete_service can be free in dev and gated in prod.
- Looks the tool up in the policy. Tools that are not listed are refused. Listed tools have
- Depending on the tier:
agent as input_required with a description of what would happen and a signed requestState. When a person says yes, the agent repeats the call with that state and the proxy executes it for real, once. Repeating it again is refused.
- L0 (read) goes straight through.
- L1 (suggest) always goes through with dry_run: true, whatever the agent asked for.
- L2 (confirm) goes through with dry_run: true first, and the result comes back to the
- L3 (auto) goes through as sent.
argument you name in the policy) and how many a principal has touched in the last hour or day.
- Checks the blast radius: how many objects one call touches (the length of a list
anything in it that smells like a prompt injection. Marking only; it does not change what the agent gets to see.
- Forwards the call, cuts the response down to the output cap if it is too big, and marks
- Writes two audit records, one before the upstream call and one after, whatever happened.
Refusals come back as tool results with isError: true, not as protocol errors, so the model sees why and can do something else. Every result carries the verdict and the rule that produced it in _meta.
Running it
The released version, no clone needed:
uvx mcp-airlock --policy policy.yaml --upstream http://127.0.0.1:8080/mcp --env prodThe same as a container. The image listens on 0.0.0.0:9000, runs as a non-root user and writes audit.jsonl into /data:
docker run --rm -p 9000:9000 -v $PWD/policy.yaml:/data/policy.yaml \
ghcr.io/shalimov04/mcp-airlock:0.2 --policy policy.yaml --upstream http://host.docker.internal:8080/mcp --env prodFrom a checkout:
uv sync
uv run pytest
uv run python demo.pyThe demo starts a fake upstream with a handful of tools on port 9001 and the proxy on 9000, walks through the interesting cases (refused tool, forced dry run, confirmation, replay, blast radius, output cap, injection marking) and leaves the audit log and spans in examples/.
The short version, recorded against that same fake upstream. An agent tries to delete a production service, gets a dry run and a confirmation prompt instead, the confirmation works exactly once, and a poisoned read result comes back flagged:
docs/makedemogif.py re-records it (uv run --with pillow python docs/makedemogif.py).
docs/clients.md shows how to point Claude Code and Cursor at the proxy and what the agent sees when a call is refused or held for confirmation.
Against a real server:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Install directly
claude mcp add mcp-airlock -- uvx mcp-airlock
mcp-airlock: common questions
- Is mcp-airlock MCP server safe?
- Mostly: it is graded B (83/100). Read the mcp-airlock safety report
- How do I install mcp-airlock?
- It runs on your machine. Copy the Claude Code, Claude Desktop or Cursor config from the install section.
- Does mcp-airlock need an API key?
- Yes. The registry entry asks for
AIRLOCK_JWT_SECRET,AIRLOCK_SECRET. - Is mcp-airlock maintained?
- The last commit was 5 days ago (2026-09-16). The latest release is v0.2.0.