Safe Agent Mcp

io.github.naoanao由 GitHub 帳號 naoanao 發布v0.1.0更新於 Nov 3, 2026

Audit API-key privileges, check idempotency patterns, explain AI-agent guard patterns. Read-only.

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

概覽

AI 產生的概覽

在本機執行的唯讀 MCP 伺服器,提供三個診斷工具:稽核 API 金鑰權限、檢查程式碼中的冪等防護、說明正式環境防護模式。

可以做什麼
  • 依權限描述稽核 API 金鑰是否權限過大,並給出每個金鑰的風險等級
  • 檢查程式碼片段中防止重複執行的訊號,指出哪些已具備、哪些缺少
  • 說明指定的正式環境防護模式,說明它防範的故障及其最小形態
適用情境
適合在正式環境執行 AI 代理或帶副作用的程式碼時使用,就金鑰權限範圍、重複執行防護或該選用哪種防護模式,取得快速的唯讀參考意見。
執行需求
以本機 Python 程序透過 stdio 執行;README 說明需複製儲存庫、建立虛擬環境、安裝相依套件,並在用戶端設定中指向 Python 解譯器與腳本。無網路呼叫,未宣告帳號、API 金鑰或環境變數。
安裝前請注意
工具被描述為唯讀、不寫入、不連網,疑似真實金鑰的輸入會被拒絕;但仍不要貼上真實金鑰值,只提供權限描述。README 推廣付費入門套件與完整包,免費工具旁存在商業推銷。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

Safe AI Agent — Guard Checks (free MCP server)

A free, read-only MCP server with three diagnostic tools for people who run AI agents in production. Distilled from the Safe AI Agent Pack — the production guard modules used by the Sage personal agent and the Growl AI marketing SaaS.

No network calls. No writes. Inputs that look like real secrets are refused.

Tools

ToolWhat it does
audit_api_keysFlags over-privileged API keys from their permission descriptions (never pass key values — secret-looking entries are rejected, not stored)
check_idempotency_patternScans a code snippet for the signals that actually stop duplicate execution: idempotency key, server-side store, uniqueness, short-circuit, payload binding, approval separation
explain_guard_patternExplains a production guard pattern — the failure it prevents and its minimal shape (idempotency_key, approval_gate, outbox, key_inventory, circuit_breaker, signed_approval_link)

Install & run

bash
git clone <this repo>cd safe-agent-mcppython3 -m venv .venv && .venv/bin/pip install -r requirements.txt.venv/bin/python safe_agent_mcp.py   # stdio transport

Claude Desktop / Cursor MCP config:

json
{  "mcpServers": {    "safe-agent-guard-checks": {      "command": "/path/to/.venv/bin/python",      "args": ["/path/to/safe_agent_mcp.py"]    }  }}

Test

bash
.venv/bin/python test_server.py   # in-memory client; calls every tool

The full pack

This free server is the diagnostic front door. The production modules — SQLite idempotency store, @once decorator, approval outbox with HMAC-signed approval links, the token-privilege inventory script, 18 regression tests and the 100 production-traps catalog — ship in the Safe AI Agent Pack ($69 / team $199).

License

MIT for this free server. The paid pack has its own commercial license.

Get the kit

來源:README.md,提交 0ef9c02

工具

3

audit_api_keys

Audit Api Keys

Audit API keys for over-privilege using permission *descriptions* only. Pass entries like {"name": "stripe-main", "service": "Stripe", "scopes": ["charges:write", "refunds:write"]}. NEVER pass actual key values — entries that look like secrets are rejected, not stored. Returns a per-key risk level with reasons and a summary count.

輸入參數keys必填

check_idempotency_pattern

Check Idempotency Pattern

Check a code snippet for the signals that stop duplicate execution. Paste the function that performs the side effect (sending, charging, writing). Returns which guard signals are present, which are missing, and a plain verdict. Read-only static check — the code is not executed.

輸入參數code必填

explain_guard_pattern

Explain Guard Pattern

Explain one production guard pattern: what failure it prevents and its minimal shape. Known patterns: idempotency_key, approval_gate, outbox, key_inventory, circuit_breaker, signed_approval_link.

輸入參數pattern必填

版本歷史

1
  1. v0.1.0最新Oct 29, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分