mcp-runtime-guard
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-runtime-guardblock shell execution tools"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Runtime Guard
Language
🇯🇵 Japanese (このページ)
🌐 English
👉 📚 Docs
🇯🇵 coming soon...
🌐 coming soon...
MCPサーバーへのtool callをポリシーに基づいてリアルタイムでブロックするランタイムプロキシ。
AIエージェント(Claude Code、Cursor等)と実MCPサーバーの間に透過的に挟まり、YAMLで定義したルールに違反するtool callを実行前にブロックする。
仕組み
Claude Code / Cursor
│ stdio (JSON-RPC 2.0)
▼
mcp-runtime-guard ← ここでポリシー評価(実行前)
│ stdio (JSON-RPC 2.0, subprocess)
▼
実MCPサーバーmcp-runtime-guard 自身がMCPサーバーとして振る舞い、実サーバーをサブプロセスとして起動する。tools/list・resources・prompts はそのまま転送し、tools/call だけを傍受する。
Related MCP server: AgentWall
特徴
同期的ブロック — deny 判定時は upstream に一切転送しない
ポリシー駆動 — ルールはコード外のYAMLファイルで定義。再ビルド不要
fail-closed — policy ファイルが読めなければ起動失敗。プロキシがクラッシュすれば stdio が切れてエージェントにエラーが返る
完全インターセプト — すべての
tools/callがポリシーエンジンを通過する。抜け道なし
インストール
npm install -g mcp-runtime-guardnpx で直接使う場合:
npx mcp-runtime-guard --policy ./policy.yaml -- npx @modelcontextprotocol/server-filesystem /home/user使い方
mcp-runtime-guard --policy <ポリシーファイルのパス> -- <upstreamコマンド> [args...]-- 以降がすべて upstream MCPサーバーのコマンドライン。
オプション
オプション | 説明 | デフォルト |
| YAMLポリシーファイルのパス | 必須 |
|
|
|
| JSONL監査ログの出力先 | stderrのみ |
Claude Desktop への組み込み例
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"mcp-runtime-guard",
"--policy", "/home/user/.config/mcp-runtime-guard/policy.yaml",
"--",
"npx", "@modelcontextprotocol/server-filesystem", "/home/user"
]
}
}
}ポリシーファイル
version: 1
# ルールにマッチしなかったtool callのデフォルト動作
# 省略した場合は "block"(fail-closed)
default_action: allow
rules:
# ツール名完全一致 + 引数条件
- name: no-credential-read
tool: read_file
when:
path:
matches: '\.env$|\.env\.|\.aws/|\.ssh/|id_rsa|\.pem$'
action: block
message: "Credential files are protected by mcp-runtime-guard"
# ツール名 regex
- name: no-shell
tool:
matches: 'execute_command|run_shell|bash|eval'
action: block
message: "Shell execution is not allowed"
# not_matches でallowlist
- name: restrict-fetch
tool: fetch
when:
url:
not_matches: '^https://api\.github\.com/'
action: block
message: "External requests restricted to api.github.com"
logging:
level: info
# file: ~/.mcp-runtime-guard/audit.jsonlマッチングルール
設定 | 動作 |
| 完全一致 |
| 正規表現マッチ |
| 引数の値が正規表現にマッチ |
| 引数の値が正規表現に不マッチ |
複数の | AND 評価 |
複数のルール | 上から順に評価、最初のマッチが適用 |
マッチなし |
|
ブロック時のレスポンス
upstreamサーバーは呼ばれず、MCP標準の CallToolResult エラーが返る。
{
"content": [{
"type": "text",
"text": "[mcp-runtime-guard] BLOCKED: Credential files are protected by mcp-runtime-guard (rule: no-credential-read)"
}],
"isError": true
}ログ
stderr(リアルタイム確認用):
[mcp-runtime-guard] BLOCK read_file {"path":"/home/user/.env"} rule=no-credential-read
[mcp-runtime-guard] ALLOW read_file {"path":"/tmp/data.json"}JSONLファイル(構造化監査ログ、オプション):
{"ts":"2026-04-07T10:00:01Z","action":"BLOCK","tool":"read_file","args":{"path":"/home/user/.env"},"rule":"no-credential-read","message":"Credential files are protected by mcp-runtime-guard"}
{"ts":"2026-04-07T10:00:02Z","action":"ALLOW","tool":"read_file","args":{"path":"/tmp/data.json"},"rule":null,"message":null}License
Apache-2.0
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP enforcement layer that intercepts AI agent actions and blocks rule violations before execution.
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
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- AlicenseNot gradedqualityCmaintenancePolicy-enforcing MCP proxy that blocks dangerous tool calls before they execute. Protects credentials, filesystem, shell, and databases across Claude Desktop, Cursor, Windsurf, and OpenClaw.5 npm39Apache 2.0

SentinelGateofficial
AlicenseNot gradedqualityAmaintenanceOpen-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool servers25AGPL 3.0- AlicenseNot gradedqualityAmaintenanceSecurity gateway for MCP tool calls. Sits between your LLM client and MCP servers, enforcing per-tool policies (allow/block/approve/read-only), logging every call, and pausing dangerous operations for human approval in terminal or Slack.4 npm1MIT