MCP Airlock
MCP Airlock
MCPツール向けのゼロトラストセキュリティゲートウェイ MCP Airlockは、すべてのツール呼び出しを、改ざん検知可能な来歴を持つ、短命でコンテキストに紐付いた機能決定へと変換します。
なぜこれが必要なのか
エージェントのツールエコシステムは、ある痛みを伴う境界線で失敗しています。それは、信頼できないプロンプトテキストから特権的なツール実行への移行です。
現在のパターンは通常、以下のいずれかです:
静的な許可リスト(
エージェントはツールXを呼び出せる)脆弱な正規表現フィルタリング
完全性保証のない事後ログ
これらは、プロンプトインジェクションがセッション中に意図を改変し、密かに権限昇格やデータ流出を引き起こす場合に失敗します。
MCP Airlockは、MCPに欠けているプリミティブでこれを解決します:
機能リース(Capability Leases): 短命で署名済み、コンテキストに紐付いた権利(
セッション + 意図 + ツールスコープ + 制約)コンテキスト認識ポリシー: すべての呼び出しに対する動的な認可(リスクスコア + ツール制約 + リースチェック)
改ざん検知可能な来歴: すべての許可/拒否決定にわたる追記専用のハッシュチェーン
Related MCP server: evav-gateway
コアとなる革新
コンテキスト紐付け機能リース(CBCL)
各ツール呼び出しは、署名済みのリースに対して認可されます:
session_idに紐付けintent_hashに紐付け特定のツールにスコープを限定
時間制限付き
オプションの制約(例:許可されたドメイン、最大リスク)
プロンプトインジェクションが意図を変更しようとしたり、ツールのスコープを飛び越えようとしたりした場合、実行は拒否されます。
アーキテクチャ
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/callと互換性のあるMCP stdioサーバー機能発行ツール:
airlock_issue_capabilityエージェント/API使用状況分析ツール:
airlock_usage_statsAPI公開範囲測定ツール:
airlock_exposure_reportツールごとのリスクしきい値を持つポリシー適用ミドルウェア
プロンプトインジェクションのシグネチャスコアリング
SSRF耐性のあるHTTPツールアダプター (
http_get_json)実際のAPI統合例 (
weather_hourly)改ざん検知可能な来歴ログ + 検証コマンド
エージェントAPIセキュリティのためのサンドボックス強化ガイド
serve/demo/issue/verify/stats/exposure 用のCLI
2分でわかるクイックスタート
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確認できること:
人間に優しい要約(ハンドシェイク、機能、許可/拒否、監査の完全性)
悪意のある呼び出しが平易な英語の理由で拒否される様子
署名済みの来歴証拠
ワンコマンドのローカルデモ(インストール不要)
python -m mcp_airlock --config examples/airlock.config.json demo --city Austin --state Texasデモ中の完全なJSONペイロードについては:
python -m mcp_airlock --config examples/airlock.config.json demo --rawMCPサーバーとして実行
python -m mcp_airlock --config examples/airlock.config.json serveMCPクライアントの設定例:
CLI
# 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エージェント統合の例
実行:
python examples/agent_integration.pyこのスクリプトは:
stdio経由でAirlockを起動
MCPのinitialize/listをネゴシエーション
リースを発行
通常のツール呼び出しを実行
ブロックされるインジェクションされた呼び出しを実行
設定テンプレート
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を介してリースを要求。リースはHMAC署名され、
session、intent_hash、tool_scope、expiryが含まれる。すべての
tools/callリクエストには_capabilityと_contextが含まれる。Airlockは以下を強制する:
リースの有効性 + 署名
セッションと意図の継続性
リスクしきい値
ツール固有の制約(例:ドメイン許可リスト)
決定 + 証拠は来歴ログにハッシュチェーンされる。
プロジェクト構造
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ロードマップ
アップストリームMCPプロキシモード(既存のMCPサーバーを透過的にラップ)
OPA/Regoポリシーバックエンド
OpenTelemetryトレース + SIEMシンク
管理された機能ブローカー + 鍵ローテーション
インシデント対応のための署名済みリプレイパッケージ
コミュニティ
貢献ガイド:
CONTRIBUTING.mdセキュリティポリシー:
SECURITY.md行動規範:
CODE_OF_CONDUCT.mdリリースチェックリスト:
docs/RELEASE_CHECKLIST.md
ライセンス
MIT
Available Tools
4 toolsairlock_audit_tailC
Read recent signed provenance events.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While it notes events are 'recent' and 'signed', it fails to specify the time window for 'recent', result ordering, return format, pagination behavior, or the implications of 'signed' (verification requirements?). This leaves critical behavioral gaps for an audit tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at five words, immediately front-loading the verb and object. While efficient, this brevity is arguably inappropriate given the complete absence of annotations and schema descriptions, leaving the description too terse to stand alone as documentation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a security/audit tool handling cryptographically signed provenance data, the description is inadequate. With no output schema, no parameter descriptions, and no annotations, the description should explain what data structure is returned and what 'airlock' provenance tracks, but it provides none of this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage for the 'limit' parameter. The description completely fails to compensate by explaining the parameter's purpose, valid ranges, or default behavior (20). The agent has no textual guidance on how to use the only available parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Read') and the specific resource ('signed provenance events'), distinguishing it from the sibling 'airlock_issue_capability' (which issues/writes) and the unrelated 'weather_hourly' and 'http_get_json' tools. However, it could better clarify what constitutes a 'provenance event' in this specific 'airlock' domain.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites (e.g., specific permissions needed to read signed audit trails) or when not to use it. The agent receives no signals about appropriate usage contexts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
airlock_issue_capabilityC
Issue a short-lived capability lease bound to session+intent.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| subject | Yes | ||
| tools | Yes | ||
| ttl_seconds | No | ||
| intent | Yes | ||
| constraints | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Lacking annotations, the description only discloses the 'short-lived' nature (relating to ttl_seconds) but omits critical behavioral details: what authorization the lease grants, how the constraints object limits usage, side effects of issuance, or security implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single dense sentence with no filler words; information is front-loaded. However, extreme brevity becomes a liability given the complete absence of schema documentation and annotations.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Inadequate for a security-sensitive tool with 6 parameters (including a nested constraints object). Fails to explain the capability model, what the lease authorizes, or the purpose of required fields like 'subject', creating operational risk.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description partially compensates by implying session_id, intent, and ttl_seconds via 'bound to session+intent' and 'short-lived', but leaves 'subject', 'tools', and the nested 'constraints' object completely unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States the core action (Issue) and resource (capability lease) with binding context (session+intent), but uses domain jargon without explanation and fails to differentiate from sibling 'airlock_audit_tail' or explain what the lease enables.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides no guidance on when to issue capabilities versus using other tools, no security prerequisites, and no warnings about the sensitivity of granting tool access via leases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
http_get_jsonA
Fetch JSON from a public HTTPS API endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL to fetch. | |
| query | No | Optional query parameters. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It adds valuable behavioral context by specifying 'public' (implying no auth headers required) and 'JSON' (setting expectation for response parsing), but omits operational details like timeout behavior, redirect handling, or error responses for non-JSON content.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, dense sentence with zero waste. It front-loads the action and precisely qualifies the target resource type and protocol without filler text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, no output schema), the description adequately covers the essential contract. The 'public' qualifier is crucial for setting correct expectations, though mentioning error handling for non-JSON responses would strengthen completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the schema fully documenting both 'url' and 'query' parameters. The description adds no additional parameter semantics beyond what the schema provides, meeting the baseline expectation for well-documented schemas.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description provides a specific verb ('Fetch'), resource type ('JSON'), and scope ('public HTTPS API endpoint'), clearly positioning this as a generic external HTTP client distinct from domain-specific siblings like weather_hourly and airlock_audit_tail.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
While it lacks explicit 'when-to-use' statements, the description implies usage through the 'public HTTPS API' scope, suggesting external/unauthenticated endpoints versus the internal/domain-specific siblings. However, it does not explicitly direct users to alternatives like weather_hourly for weather data.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
weather_hourlyA
Resolve US city/state and fetch hourly weather from Open-Meteo.
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes | ||
| state | Yes | ||
| hours | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden. It successfully indicates the geocoding behavior ('Resolve') and data source ('Open-Meteo'), but omits critical behavioral details like error handling for invalid locations, output format, units (imperial/metric), or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, dense sentence with zero redundancy. Every word contributes essential information (action, scope, data source), making it appropriately sized and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple 3-parameter schema with primitive types and no output schema, the description adequately covers the core function. However, gaps remain: the 'hours' parameter is undocumented, and the absence of annotations or output schema leaves the return structure and units unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, requiring the description to compensate. It implicitly documents the 'city' and 'state' parameters by specifying they are 'US city/state', adding geographic context not present in the raw parameter names. However, it fails to mention the 'hours' parameter or its constraints (1-168, default 24).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verbs ('Resolve', 'fetch') and identifies the exact resource ('hourly weather'). It clearly distinguishes the tool from siblings (airlock_audit_tail, http_get_json) by specifying the weather domain and Open-Meteo data source.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies geographic constraints by specifying 'US city/state', hinting at usage boundaries. However, it lacks explicit guidance on when to use versus alternatives (e.g., for non-US locations) or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
airlock_audit_tail - First observed
airlock_issue_capability - First observed
http_get_json - First observed
weather_hourly
TDQS
Scored across 4 tools
Each tool targets a distinct function (provenance auditing, capability issuance, generic HTTP fetching, and weather retrieval) with minimal overlap. An agent can easily distinguish when to use each based on the task requirements.
Mixed naming patterns: two tools use 'airlock_' prefix with verbs (issue, audit_tail), while others use 'http_' prefix or no prefix (weather_hourly). The weather tool breaks the verb-first convention used by others, using a noun-adjective pattern instead.
Four tools is acceptably compact but the set suffers from scope confusion, mixing core Airlock security functions with unrelated utility tools (weather, HTTP). This feels like two different servers merged together rather than a cohesive toolset.
The Airlock domain (capability management) is severely underdeveloped, offering only issuance and audit tail reading without revocation, validation, or capability listing. The utility tools (weather, HTTP) are also minimal, offering only hourly forecasts and GET requests without parameter customization.
Maintenance
Related MCP Connectors
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Identity, authorization, audit trails, and revocable permissions for AI agents accessing MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables secure interaction between LLMs and MCP tools by applying zero-trust security controls, including sensitive data masking, file system protection, and policy enforcement.-

evav-gatewayofficial
AlicenseNot gradedqualityBmaintenanceGoverned MCP gateway that lets AI agents call tools with policy enforcement, prompt-injection screening, a kill-switch, and tamper-evident signed audit logs.Apache 2.0- AlicenseNot gradedqualityBmaintenanceEnforces fine-grained, context-aware access control on MCP tool calls, with a tamper-evident, replayable audit log that records denials and verifies every decision.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely discover, invoke, and manage tools through a hardened MCP endpoint with protections like injection detection, circuit breakers, retry backoff, response caching, context-window limiting, and state snapshots.1 npmMIT