Skip to main content
Glama
Safe AI Agent — Guard Checks

Safe AI Agent — Guard Checks

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

Tool

What it does

audit_api_keys

Flags over-privileged API keys from their permission descriptions (never pass key values — secret-looking entries are rejected, not stored)

check_idempotency_pattern

Scans 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_pattern

Explains a production guard pattern — the failure it prevents and its minimal shape (idempotency_key, approval_gate, outbox, key_inventory, circuit_breaker, signed_approval_link)

Related MCP server: agent-guard

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

Available Tools

3 tools
audit_api_keysAudit Api KeysA

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.

Inputs: keys (required). Returns: object

check_idempotency_patternCheck Idempotency PatternA

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.

Inputs: code (required). Returns: object

explain_guard_patternExplain Guard PatternA

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.

Inputs: pattern (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 3 tools

    Disambiguation4/5

    The three tools occupy genuinely different modes: auditing a config artifact (API key scopes), statically checking a code snippet, and explaining a concept. The one soft edge is between check_idempotency_pattern and explain_guard_pattern, since 'idempotency_key' is also one of the explainable patterns, so an agent asking about idempotency could plausibly reach for either first.

    Naming Consistency5/5

    All three follow a clean verb_noun snake_case pattern (audit_api_keys, check_idempotency_pattern, explain_guard_pattern) with unambiguous, domain-specific nouns. The verbs also accurately signal the mode of each tool: audit vs check vs explain.

    Tool Count4/5

    Three tools is on the thin side but defensible for a tightly scoped 'guard checks' server where each tool maps to one clear input type (key entries, code, pattern name). No padding or redundancy, though the surface feels minimal enough that additional coverage seems intended rather than optional.

    Completeness3/5

    The tool set is asymmetric: explain_guard_pattern advertises six patterns (idempotency_key, approval_gate, outbox, key_inventory, circuit_breaker, signed_approval_link) but only idempotency has a corresponding verification tool, and key_inventory is only partly covered by audit_api_keys. An agent can learn about approval gates and outboxes but has no way to check them, creating dead ends in the advertised workflow.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Local-first security check for AI coding agents — finds hardcoded secrets, exposed .env files, git-history leaks and vulnerable dependencies (OSV), entirely on your machine. Ask your agent "is this safe to ship?" and get a Launch Readiness score with a fix for every finding.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Safety checks an agent runs before it acts — flags malicious packages, destructive shell commands, secret leaks, and web-backend holes before execution.
      8
      28 PyPI
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      It lets clients request design-time audits of Python and TypeScript agent applications for defects such as unbounded loops, ungated destructive actions, weak argument validation, insufficient run budgets, absent resiliency controls, overlooked evals, and poor observability. Findings include supporting evidence and feed an approval-driven mechanism for reviewing proposed fixes without mutating the original source.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A read-only MCP server that lets agents scan a project's AI agent setup — Claude Code, Codex, Cursor, MCP servers and instruction files — and surface security findings such as the lethal trifecta, broad permissions, exposed secrets and unpinned packages.
      57 npm
      MIT