mcp-audit-gateway
mcp-audit
あなたのAIエージェントは昨日847回のツール呼び出しを行いました。その内容を検証できますか?
AIエージェントのツール呼び出しのための改ざん検出可能な監査証跡。
セットアップ(10秒)
変更前:
{
"command": "npx",
"args": ["@modelcontextprotocol/server-github"]
}変更後:
{
"command": "npx",
"args": ["mcp-audit", "wrap", "--", "npx", "@modelcontextprotocol/server-github"]
}すべてのツール呼び出しは、暗号署名され、ハッシュチェーンで連結されるようになりました。他の変更はありません。MCPサーバーは以前とまったく同じように動作します。
Related MCP server: DCL Evaluator
機能
$ mcp-audit tail
✓ 14:32:01 github/create_pr 234ms bf7a2f62
✓ 14:32:03 github/list_issues 89ms a1c4e890
✗ 14:32:05 fs/delete_file 12ms c3d9f012
✓ 14:32:08 github/merge_pr 456ms e5f6a7b8各エントリはHMAC-SHA256で署名され、前のレコードにチェーンされています。エントリを改ざんすると検証が失敗します。エントリを削除するとチェーンが壊れます。
整合性の検証
$ mcp-audit verify ~/.mcp-audit/audit.jsonl
Results:
Total records: 847
Valid: 847
Invalid: 0
All records verified successfully.仕組み
┌────────────┐ ┌───────────┐ ┌────────────┐
│ MCP Client │──────▶│ mcp-audit │──────▶│ MCP Server │
│ (Claude, │◀──────│ wrap │◀──────│ (any) │
│ Cursor) │ └─────┬─────┘ └────────────┘
└────────────┘ │
▼
~/.mcp-audit/
audit.jsonlwrapコマンドは、MCPサーバーを子プロセスとして起動し、stdio上でクライアントとサーバーの間に位置します。すべてのメッセージを透過的に転送します。tools/call のレスポンスのみが署名され、ログに記録されます。それ以外はすべてそのまま通過します。
初回実行時に、署名キーが ~/.mcp-audit/key.hex に自動生成されます。設定は不要です。
監査レコードの形式
{
"id": "bf7a2f62-4d0f-4cce-afd2-cbfbf7bca2a5",
"timestamp": "2026-08-16T14:32:01.000Z",
"method": "tools/call",
"toolName": "github/create_pr",
"args": {"title": "Fix bug", "body": "..."},
"durationMs": 234,
"success": true,
"previousHash": "8a3f2b...",
"attestation": "7c4d9e..."
}attestation は、レコードの正規フィールドに対するHMAC-SHA256署名です。previousHash は、前のレコードのSHA-256ハッシュです。これらにより、改ざん、順序、完全性を検出します。
Claude Desktopでの使用
claude_desktop_config.json:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["mcp-audit", "wrap", "--", "npx", "@modelcontextprotocol/server-github"]
},
"filesystem": {
"command": "npx",
"args": ["mcp-audit", "wrap", "--", "npx", "@modelcontextprotocol/server-filesystem", "/tmp"]
}
}
}Claude Codeでの使用
.claude/hooks/mcp-servers.json またはMCPサーバーコマンドに直接 — mcp-audit wrap -- をプレフィックスとして付けます。
CLI
mcp-audit wrap -- <cmd> [args] # Wrap any MCP server
mcp-audit tail # Live stream of tool calls
mcp-audit verify <log> # Verify chain integrity
mcp-audit serve [config] # Full gateway (policy + OTel)
mcp-audit keygen [dir] # Generate Ed25519 key pairフルゲートウェイモード
アクセス制御、レート制限、マルチサーバールーティングも必要なチーム向け:
mcp-audit serve gateway.config.jsonフルゲートウェイは以下を追加します:
ポリシーエンジン(グロブベースのACL、プリンシパルごとのレート制限)
複数のアップストリームMCPサーバーにわたるツールの名前空間化
OpenTelemetryトレースとメトリクスのエクスポート
自動再接続を備えたアップストリームのヘルス管理
Ed25519署名(HMACより強力、ポータブルな検証)
完全なスキーマについては、ゲートウェイ設定 を参照してください。
インストール
npm install -g @mcp-audit-gateway/coreこれにより、mcp-audit CLIがグローバルにインストールされます。または、インストールせずに使用する場合:
npx @mcp-audit-gateway/core wrap -- <your mcp server command>証明レイヤー
署名および検証サブシステムは、レコードごとのHMACを超えた機能を提供します。ログローテーション、クラッシュリカバリ、マルチファイルチェーンにわたる改ざん検出を提供します。
チェックポイントレコードにより、コンシューマは単一のハッシュを外部に保存することで末尾の切り詰めを検出できます。チェーンはファイルローテーションをまたいで継続します(サイレントリセットはありません)。強制再起動時には、静かに新しく開始する代わりに、署名付きの chain_break レコードが発行されます。
正規形式は型タグ付きで単射的であり、安全でない数値を完全に拒否することでJCSの浮動小数点フォーマット問題を回避し、46の適合性ベクトル(JS + Python)によるクロス言語パリティが実証されています。完全な仕様と脅威モデルについては、SECURITY-DESIGN.md を参照してください。
クロスSDK差分テスト
MCPには10の公式SDKがあり、クロスSDK適合性テストはありません。私たちは、Wycheproofスタイルの差分ハーネスを構築し、10のSDKすべてに対して40のシリアライゼーションエッジケーステストを実行し、それらがどこで不一致になるかを報告します。
結果:8つの異なるシリアライザにわたる26のワイヤーレベルの相違。1e20 の6つの異なる表現。3つの互換性のないキー順序アルゴリズム。TypeScriptは2^53+1で整数精度を静かに失います。C#は他のSDKがエスケープしない文字をHTMLエスケープします。Python SDKは、同じコードパスでpydantic-coreのバージョンによって異なるバイトを生成します。
./test/vectors/cross-sdk-diff.sh # full matrix (stdlib + SDK)
./test/vectors/cross-sdk-diff.sh --layer sdk # SDK-wire-level only
./test/vectors/cross-sdk-diff.sh --json # structured output監査ゲートウェイの正規化は、26の相違クラスすべてに対して免疫を持つように設計されています:安全な整数のみ、明示的なフィールド順序、サロゲート拒否。完全な相違テーブルと方法論については、SDK-AUDIT.md を参照してください。
適合性
この実装は、以下の特性を満たしています(クロス言語適合性ベクトルとユニットテストで検証済み):
単射的な正規形式(クロスタイプのダイジェスト衝突なし)
クロス言語のソート等価性(UTF-16コードユニット順)
ペアになっていないサロゲートの拒否
ログローテーションをまたぐハッシュチェーンの連続性
起動時の植え付け状態の検出
正当なチェーン切断後の誤検知なし
破損または過大な入力に対するフェイルクローズ
chain_break境界でのセグメント単調性
チェックポイントレコードによるコンシューマアンカー完全性
メモリ制限付き初期化(1MB上限)
APS action-ref-v1 適合性:51/51ベクトル合格(JCS再計算 + フェイルクローズダイジェスト比較)。
テスト
npm test # unit tests
node test/vectors/verify-checkpoint.mjs # JS conformance vectors
python3 test/vectors/verify-checkpoint.py # Python conformance vectors
node test/vectors/aps-action-ref-v1.mjs # 51 APS vectors
./test/vectors/cross-sdk-diff.sh # 10-SDK differential testライセンス
MIT
APS適合性フィクスチャ(test/vectors/aps-action-ref-v1-vectors.json)は、アップストリームのApache-2.0ソースから改作されています。出典と条件については、test/vectors/SOURCE.md を参照してください。
This server cannot be installed
Maintenance
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to sign decisions with post-quantum cryptographic proofs and maintain secure audit trails for compliance. It provides tools for stamping events, verifying chain integrity, and exporting audit data across industries like finance and healthcare.498MIT
- FlicenseNot gradedqualityCmaintenanceTamper-evident cryptographic audit trail for LLM outputs. Compliance logging for AI agent decisions.

evermint-mcpofficial
AlicenseNot gradedqualityDmaintenanceTamper-evident receipts for AI agent actions. The notary layer for agent-to-agent transactions.891MIT- AlicenseNot gradedqualityFmaintenanceProvides tamper-proof audit logging for AI agents using SHA-256 hash chains, integrity verification, and compliance reporting for the EU AI Act.1MIT
Related MCP Connectors
Bitcoin-anchored, tamper-evident audit log for AI agents — record, disclose and verify actions.
Hash-chained HMAC-signed audit log MCP for A2A (agent-to-agent) calls. Every tool-call, agent-ha...
Etch is a signed audit chain for AI agent decisions, offline-verifiable against pinned public keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/elang2/mcp-audit-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server