loading…
Search for a command to run...
loading…
Enables secure, zero-trust access to MCP tools through short-lived, signed capability leases that bind tool execution to specific sessions, intents, and constra
Enables secure, zero-trust access to MCP tools through short-lived, signed capability leases that bind tool execution to specific sessions, intents, and constraints. Prevents prompt injection attacks and privilege escalation with dynamic risk scoring, policy enforcement, and tamper-evident audit logging.
Zero-trust security gateway for MCP tools.
MCP Airlock turns every tool call into a short-lived, context-bound capability decision with tamper-evident provenance.
Agent tool ecosystems are failing at one painful boundary: the jump from untrusted prompt text to privileged tool execution.
Current patterns are usually one of:
agent can call tool X)They fail when prompt injection mutates intent mid-session, causing silent privilege escalation or data exfiltration.
MCP Airlock solves this with a missing primitive for MCP:
session + intent + tool scope + constraints)Each tool call is authorized against a signed lease:
session_idintent_hashIf a prompt injection tries to change intent or jump tool scope, execution is denied.
flowchart LR
A[Agent / MCP Client] -->|tools/call| B[MCP Airlock Server]
B --> C[Risk Engine]
B --> D[Capability Verifier]
B --> E[Policy Engine]
E -->|allow| F[Tool Adapter Layer]
E -->|deny| G[Policy Deny Response]
F --> H[External APIs / Internal Services]
B --> I[Provenance Ledger Hash Chain]
flowchart TB
subgraph Untrusted
U1[Prompt Content]
U2[Agent Reasoning Trace]
end
subgraph Trusted Control Plane
T1[MCP Airlock]
T2[Policy + Lease Validation]
T3[Signed Provenance Ledger]
end
subgraph External Targets
X1[Public APIs]
X2[Internal APIs]
end
U1 --> T1
U2 --> T1
T1 --> T2
T2 --> X1
T2 --> X2
T1 --> T3
initialize, tools/list, tools/callairlock_issue_capabilityairlock_usage_statsairlock_exposure_reporthttp_get_json)weather_hourly)git clone https://github.com/lara-muhanna/mcp-airlock
cd mcp-airlock
python -m pip install -e .
python -m mcp_airlock --config examples/airlock.config.json demo
What you will see:
python -m mcp_airlock --config examples/airlock.config.json demo --city Austin --state Texas
For full JSON payloads during demo:
python -m mcp_airlock --config examples/airlock.config.json demo --raw
python -m mcp_airlock --config examples/airlock.config.json serve
MCP client setup examples:
# Issue a capability directly
python -m mcp_airlock --config examples/airlock.config.json issue \
--session-id sess-123 \
--subject agent:planner \
--tools weather_hourly,http_get_json \
--intent "Plan safe outdoor activities" \
--ttl-seconds 900 \
--constraints '{"allowed_domains":["api.open-meteo.com"],"max_risk":0.6}'
# Verify audit integrity
python -m mcp_airlock --config examples/airlock.config.json verify-log
# API usage stats by agent
python -m mcp_airlock --config examples/airlock.config.json stats --lookback-hours 24
# API exposure measurement
python -m mcp_airlock --config examples/airlock.config.json exposure --lookback-hours 24
Run:
python examples/agent_integration.py
This script:
examples/airlock.config.json
{
"secret_key": "dev-secret-change-this-before-production",
"provenance_log": "./airlock-provenance.log",
"max_ttl_seconds": 1800,
"default_risk_threshold": 0.55,
"tools": {
"weather_hourly": {
"require_capability": true,
"risk_threshold": 0.7
},
"http_get_json": {
"require_capability": true,
"risk_threshold": 0.45,
"allowed_domains": ["api.open-meteo.com", "geocoding-api.open-meteo.com"]
}
}
}
airlock_issue_capability.session, intent_hash, tool_scope, expiry.tools/call request includes _capability and _context.mcp-airlock/
mcp_airlock/
cli.py
server.py
policy.py
capability.py
risk.py
provenance.py
config.py
tool_ids.py
tools/
http_json.py
weather.py
examples/
airlock.config.json
agent_integration.py
docs/
CLIENT_SETUP.md
SANDBOXING_AGENTIC_APIS.md
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mcp-airlock": {
"command": "npx",
"args": []
}
}
}