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 分