Guardrails

io.github.ExpertVagabond由 GitHub 帳號 ExpertVagabond 發布v1.0.1更新於 Oct 24, 2026

AI Agent Guardrails MCP server - security layer

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為 AI 代理加上安全護欄層:輸入驗證、提示注入偵測、PII 去識別化、政策檢查與稽核日誌。

可以做什麼
透過全部護欄檢查驗證並清理傳入請求,包括提示注入偵測與惡意程式碼攔截。過濾並去識別化回應中的敏感資料,例如 PII、金鑰與憑證。依 RBAC、資源存取與配額等安全政策評估請求。依類型、使用者與時間範圍查詢稽核日誌,並讀取活躍使用者、攔截率與請求數等引擎統計。在執行時更新護欄設定。
適用情境
適合助理或代理處理不受信任輸入、需要本機檢查點來篩選請求、去識別化敏感輸出並保留稽核紀錄的情境。也適用於需要政策執行、速率限制或記錄被攔截請求的部署。
執行需求
以本機 stdio 程序在使用者機器上執行,從 npm 套件 guardrails-mcp-server 安裝,並以 Node.js 啟動。README 提供指向伺服器 index.js 路徑的手動設定範例。未宣告驗證、環境變數或標頭。
安裝前請注意
伺服器會檢查並去識別化敏感內容,可能處理傳輸中的 PII、憑證與私鑰,需確認日誌存放位置。update_config 工具會在執行時變更護欄設定,稽核日誌會記錄使用者活動。偵測以正規表達式為基礎,可能漏掉新型攻擊或誤判正常內容。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Guardrails,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

guardrails-mcp-server

[!License: MIT](https://opensource.org/licenses/MIT) [!MCP](https://modelcontextprotocol.io) [!Node.js](https://nodejs.org)

MCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.

Tools

ToolDescription
validate_inputValidate and sanitize incoming requests through all guardrail checks
filter_outputFilter and redact sensitive data (PII, secrets, credentials) from responses
check_policyEvaluate a request against security policies (RBAC, resource access, quotas)
get_audit_logsQuery the audit log with filtering by type, user, time range
get_statsGet engine statistics including active users, block rate, request counts
update_configUpdate guardrail configuration at runtime

Security Features

  • Prompt Injection Detection -- 12 regex patterns for jailbreak, DAN mode, system prompt override
  • PII Detection and Redaction -- SSN, credit card, email, phone, IP, API keys, AWS keys, JWT, passwords, private keys, connection strings
  • Malicious Code Blocking -- eval, exec, subprocess, child_process, shell injection
  • Policy Engine -- Block sensitive paths, dangerous tools, unauthenticated destructive ops, URL allowlist, maintenance windows
  • Rate Limiting -- Per-user sliding window (configurable requests/minute)
  • Audit Logging -- Timestamped events with metrics, log rotation, external handler support

Install

bash
npm install

Configuration

json
{  "mcpServers": {    "guardrails": {      "type": "stdio",      "command": "node",      "args": ["/path/to/guardrails-mcp-server/index.js"]    }  }}

Project Structure

src/engine/GuardrailsEngine.js    # Core orchestrationsrc/validators/InputValidator.js   # Prompt injection and PII detectionsrc/filters/OutputFilter.js        # Redaction and harmful content blockingsrc/policies/PolicyEngine.js       # RBAC, quotas, maintenance windowssrc/audit/AuditLogger.js           # Event logging and metrics

License

MIT

來源:README.md,提交 2ecb5e7

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分