SentinelMCP
SentinelMCP
Model Context Protocol (MCP) のための決定論的ポリシーファイアウォール&ランタイムガバナンスエンジン
概要
SentinelMCP は、Model Context Protocol (MCP) サーバーとマルチエージェント AI スウォーム向けに設計された、本番環境対応のセキュリティゲートウェイおよびランタイムガバナンスフレームワークです。AI エージェントが MCP を介してエンタープライズのファイルシステム、データベース、API への自律的なアクセスをますます拡大する中、プロンプトインジェクション、不正なツール呼び出し、データ流出などのセキュリティリスクが急増しています。
SentinelMCP はインラインポリシーファイアウォールとして機能し、JSON-RPC MCP ツール呼び出しをインターセプトし、宣言型 AST ベースのルールに対して引数を検査し、セキュリティ制限を適用し、不変かつ暗号学的に検証可能な監査証跡を記録します。
Related MCP server: AgentGuard MCP Server
主なアーキテクチャと機能
Policy-as-Code エンジン: ツール名のグロブパターンマッチング、引数値の正規表現検査、厳格な引数スキーマ検証をサポートする宣言型 JSON/YAML ポリシー定義。
暗号学的証明台帳: 各実行レコードが SHA-256 ハッシュでチェーンされた追記専用の監査ログ。コンプライアンスとトレーサビリティのための改ざん防止を保証。
高性能プロキシゲートウェイ: FastAPI と Pydantic v2 上に構築され、非同期リクエスト処理によるサブミリ秒のインターセプトレイテンシを実現。
CLI&テストツールチェーン: ポリシーに対するツール呼び出しの評価、ゲートウェイサーバーの起動、台帳の整合性検証を行うための組み込み CLI。
エンタープライズグレードの CI/CD: pytest による完全なテスト、Python 3.11 および 3.12 でのマトリックステスト、GitHub Actions ワークフローとの統合。
インストール
リポジトリをクローンし、開発依存関係を含めて編集可能モードでインストールします:
git clone https://github.com/ateeqdesktop-dot/sentinel-mcp.git
cd sentinel-mcp
pip install -e .[dev]使用方法
1. CLI によるツール呼び出しの評価
セキュリティポリシーに対して任意の MCP ツール呼び出しがどのように評価されるかをテストできます:
sentinel-mcp evaluate --tool fs_delete --args '{"path": "/home/user/document.txt"}' --policy policy.json2. ゲートウェイサーバーの起動
SentinelMCP プロキシサーバーをローカルで起動します:
sentinel-mcp serve --host 127.0.0.1 --port 8000 --policy policy.json3. 監査台帳の整合性検証
追記専用の監査証跡が改ざんされていないことを検証します:
sentinel-mcp verify --ledger sentinel_audit.jsonlポリシー設定例 (policy.json)
{
"version": "1.0",
"default_action": "allow",
"rules": [
{
"id": "block-destructive-fs",
"tool_pattern": "fs_*",
"action": "deny",
"forbidden_arguments": [
"rm\\s+-rf",
"/etc/passwd",
"drop\\s+database"
]
},
{
"id": "limit-sql-queries",
"tool_pattern": "db_*",
"action": "allow",
"max_string_length": 500
}
]
}テスト
pytest とコードカバレッジを使用してテストスイートを実行します:
pytest --cov=sentinel tests/ -vライセンス
MIT ライセンスの下で配布されています。詳細は LICENSE を参照してください。
参考文献
Anthropic Model Context Protocol (MCP) 仕様。オンラインで入手可能。
Open Policy Agent (OPA) のクラウドネイティブセキュリティの原則。オンラインで入手可能。
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceThe security runtime for MCP servers. Every tool call inspected. Every attack blocked. Every decision logged.1-
- FlicenseNot gradedqualityCmaintenanceProvides policy-driven runtime authorization and security evaluation for MCP-based agents, including MCP streaming HTTP gateway, mock MCP servers, deterministic agent demos, and audited tool invocation with redacted PostgreSQL audit chains.-
- 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 gradedqualityBmaintenanceEnforces allow/deny/ask policies on MCP tool calls before they reach downstream servers, with tamper-evident audit logging.MIT