mcpField
S
safe-agent-mcp

safe-agent-mcp

Local
github.com/naoanaoSecurity0Updated 1d ago

About safe-agent-mcp

safe-agent-mcp is a read-only diagnostic server for people operating AI agents in production. It checks API-key permission descriptions and idempotency signals, and explains common guard patterns without network calls or writes.

Key features

  1. 01Flag overly broad API-key permissions
  2. 02Scan code for idempotency signals
  3. 03Explain production guard patterns
  4. 04Reject secret-looking inputs

Use cases

  1. 01Review API-key privilege descriptions
  2. 02Inspect code for duplicate-execution safeguards
  3. 03Understand approval and circuit-breaker patterns

MCP support

Exposes three read-only diagnostic tools: `audit_api_keys`, `check_idempotency_pattern`, and `explain_guard_pattern`. It makes no network calls and performs no writes.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"naoanao-safe-agent": {
"command": "uvx",
"args": [
"safe-agent-mcp"
]
}
}
}
Run commanduvx safe-agent-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypisafe-agent-mcp0.1.0

Tools

3

Saved tool list · updated 1d ago

ParameterTypeRequiredDescription
keysarrayYes

Details

From the project 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

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

Claude Desktop / Cursor MCP config:

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

Test

.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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.