thewardn-mcp
thewardn-mcp
MCPサーバー用WARDNガバナンスラッパー — Claudeのすべてのツール呼び出しをガバナンス下に。
Claude DesktopがMCPサーバー(Google Drive、GitHub、Slack、ファイルシステムなど)に接続すると、監視なしで任意のツールを自律的に呼び出すことができます。thewardn-mcpは、Claudeと実際のMCPサーバーの間に介在します。すべてのツール呼び出しは、実際のサービスに到達する前にTheWARDNのガバナンスエンジンを通過します。BLOCKED(拒否)された呼び出しは実行されません。HELD(保留)された呼び出しは、人間によるレビューのためにエスクロー(一時保管)されます。CLEARED(許可)された呼び出しは透過的に転送されます。
仕組み
Claude Desktop
|
| (MCP protocol over stdio)
v
wardn-mcp governance server <-- this package
|
| POST /tool/govern → api.thewardn.ai
| verdict: CLEARED / HELD / BLOCKED
|
| (if CLEARED)
v
Real MCP server (Google Drive, GitHub, etc.)すべてのツール呼び出しは、TheWARDNのCHAM(Contextual Harm Assessment Module:文脈的危害評価モジュール)ポリシーエンジンを通過します。判定結果は封印され、改ざん不可能であり、WARDN監査チェーンに記録されます。エスクローによる保留は、管理者がレビューできるよう console.thewardn.ai のWARDNコンソールに表示されます。
Related MCP server: mcp-boundary
インストール
pip install thewardn-mcpPython 3.10以降が必要です。
クイックスタート
ステップ1: 設定の初期化
wardn-mcp initこのコマンドにより、WARDN APIキー、エージェントID、およびガバナンス対象とするダウンストリームMCPサーバーの入力手順が案内されます。設定は ~/.wardn/mcp-config.json に保存されます。
APIキーとエージェントIDは console.thewardn.ai/settings から取得してください。
ステップ2: Claude Desktopへの追加
~/.claude/claude_desktop_config.json を編集します:
{
"mcpServers": {
"wardn-governed": {
"command": "wardn-mcp",
"args": ["start"],
"env": {
"WARDN_MCP_CONFIG": "~/.wardn/mcp-config.json"
}
}
}
}ステップ3: Claude Desktopの再起動
ガバナンス対象のMCPサーバーからのすべてのツールが、サーバー名を冠したプレフィックス付き(例:google-drive__create_file、github__create_repository)でClaudeに表示されるようになります。すべての呼び出しがガバナンスの対象となります。
設定
設定ファイルの場所:~/.wardn/mcp-config.json(環境変数 WARDN_MCP_CONFIG または --config フラグで上書き可能)。
{
"wardn_api_key": "wdn_live_...",
"wardn_base_url": "https://api.thewardn.ai",
"agent_id": "agt_...",
"servers": [
{
"name": "google-drive",
"command": ["npx", "-y", "@modelcontextprotocol/server-gdrive"],
"args": [],
"env": {
"GDRIVE_CREDENTIALS_FILE": "~/.wardn/gdrive-credentials.json"
}
},
{
"name": "github",
"command": ["npx", "-y", "@modelcontextprotocol/server-github"],
"args": [],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
}
}
],
"tool_overrides": {
"delete_repository": "always_block",
"list_files": "always_clear"
}
}フィールド
フィールド | 必須 | 説明 |
| はい | WARDN APIキー ( |
| いいえ | デフォルトは |
| はい | Claudeを表すWARDNエージェントID |
| はい | ガバナンス対象のダウンストリームMCPサーバーのリスト |
| いいえ | ツールごとのバイパスルール(下記参照) |
ツールの上書き
APIへのラウンドトリップなしで、特定のツールのガバナンスを上書きします:
"always_block"— WARDNポリシーに関係なく、このツールを恒久的にブロックする"always_clear"— このツールのガバナンスをバイパスする(読み取り専用や低リスクのツールに使用)
上書き設定は、ベースツール名(サーバープレフィックスなし)または完全なガバナンス名(server__tool)で照合されます。
ガバナンス判定
判定 | 動作 |
| ツール呼び出しを実際のMCPサーバーに転送 |
| WARDNコンソールでの管理者の承認待ちとしてツール呼び出しをブロック |
| ツール呼び出しを即座に拒否。Claudeはブロックメッセージを受け取る |
ツールがHELD(保留)されると、ClaudeはエスクローIDとWARDNコンソールへのリンクを受け取ります。管理者は console.thewardn.ai でそのアクションを承認または拒否できます。
CLIリファレンス
# Start the governance server
wardn-mcp start [--config PATH]
# Initialize config interactively
wardn-mcp init [--config PATH]
# Show current config and downstream server status
wardn-mcp status [--config PATH]ツールの命名
ダウンストリームサーバーからのツールは、競合を避けるために名前空間が設定されます:
{server_name}__{original_tool_name}
# Examples:
google-drive__list_files
google-drive__create_file
github__create_repository
github__search_code
slack__send_messageClaudeに表示されるツール説明には [WARDN GOVERNED] プレフィックスが含まれ、ガバナンスが有効であることが明確に示されます。
フェイルオープン動作
WARDN APIに到達できない場合(ネットワークエラー、タイムアウト、200以外のレスポンス)、ガバナンスクライアントは警告をログに記録し、フェイルオープンします。つまり、ツール呼び出しはCLEARED(許可)として扱われます。これにより、ガバナンスインフラの停止がすべてのClaudeの活動をブロックすることを防ぎます。
これをフェイルクローズに変更するには、WARDNGovernClient のサブクラスで govern_tool をオーバーライドしてください。
プログラムによる利用
import asyncio
from wardn_mcp import WARDNGovernanceMCPServer, WARDNMCPConfig, MCPServerConfig
config = WARDNMCPConfig(
wardn_api_key="wdn_live_...",
agent_id="agt_...",
servers=[
MCPServerConfig(
name="github",
command=["npx", "-y", "@modelcontextprotocol/server-github"],
env={"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."},
)
],
)
server = WARDNGovernanceMCPServer(config)
asyncio.run(server.run())ガバナンスフロー図
Claude calls tool: google-drive__delete_file(path="/budget.xlsx")
|
v
wardn_mcp intercepts call
|
v
Check tool_overrides: no override for delete_file
|
v
POST api.thewardn.ai/tool/govern
{
agent_id: "agt_...",
tool_name: "delete_file",
tool_input: {path: "/budget.xlsx"},
integration: "google-drive"
}
|
v
WARDN CHAM evaluates:
- Policy rules for this agent
- Risk tier of delete_file
- Context: what files have been accessed this session
- Integration-level rules for google-drive
|
-------
| |
CLEARED BLOCKED / HELD
| |
v v
Forward to Return verdict message to Claude
Google Drive (+ escrow ID if HELD)
MCP serverドキュメント
完全なドキュメント:docs.thewardn.ai
WARDNコンソール(ポリシー管理、エスクローのレビュー、監査ログの表示):console.thewardn.ai
ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP enforcement layer that intercepts AI agent actions and blocks rule violations before execution.
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
AlicenseNot gradedqualityCmaintenancePolicy enforcement gateway for MCP tool calls, evaluating every tool invocation against declarative YAML policies (allow/deny/escalate-to-human), generating cryptographic hash-chained audit receipts, and including built-in content safety scanning.2MIT- FlicenseNot gradedqualityDmaintenanceWraps your existing MCP servers and checks each tool call against policy and live state before it runs. Allow, block, or require a refresh, with a reason the agent can act on.5-
- AlicenseAqualityBmaintenanceProvides advisory AI-governance checks for MCP hosts and coding agents, enabling policy verdicts, PII masking, and audit traces before executing tool calls.357 npmMIT
- AlicenseNot gradedqualityAmaintenanceProvides a governance proxy layer for MCP servers, enforcing per-tool allowlists, human approval for write operations, quotas, secret redaction, and a hash-chained audit log of all calls.MIT