Safe AI Agent — Guard Checks
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Safe AI Agent — Guard Checksexplain idempotency keys for duplicate agent actions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Flags over-privileged API keys from their permission descriptions (never pass key values — secret-looking entries are rejected, not stored) |
| Scans a code snippet for the signals that actually stop duplicate execution: idempotency key, server-side store, uniqueness, short-circuit, payload binding, approval separation |
| Explains a production guard pattern — the failure it prevents and its minimal shape ( |
Related MCP server: opzyai
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 transportClaude 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 toolThe 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.
Available Tools
3 toolsaudit_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.
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses a security behavior (secret-like entries are rejected, not stored), which is exactly the kind of non-obvious trait an agent needs. It also previews the return shape (per-key risk level with reasons plus a summary count). It omits any statement about side effects, persistence of the audit results, or cost, keeping it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences, front-loaded with the purpose, then the input example, then the hard constraint, then the return shape. The inline example earns its space by defining an otherwise opaque schema; nothing is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists so return values need not be spelled out, yet the description still summarizes them. For a single-parameter tool whose inner object is untyped, the example fills the main gap, and the security constraint covers the biggest misuse risk. Nothing critical is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the items are untyped objects with additionalProperties: true, so the schema alone tells an agent nothing. The description compensates by showing the entry shape with name, service, and scopes keys. It does not state which of those fields are required or how extra fields are treated, so it falls short of full compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ("Audit API keys for over-privilege") plus the crucial qualifier that the audit works from permission descriptions rather than live credentials. This is instantly distinguishable from the sibling tools about idempotency and guard patterns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies the use case clearly (checking keys for over-privilege) and provides a concrete exclusion: "NEVER pass actual key values — entries that look like secrets are rejected, not stored." It does not explicitly say when to prefer a sibling tool or what input qualifies as a description, but the operating context is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does so: 'Read-only static check — the code is not executed' discloses the safety profile, and it says the result is a per-signal present/missing breakdown plus a verdict. It omits anything about how the guarded patterns are recognized or limits on snippet size, so not a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences with no filler: purpose first, input instruction second, safety and output character last. Every sentence adds information an agent needs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
A one-parameter tool with an output schema present; the description covers what to pass, that it is static and read-only, and the shape of the answer in general terms. Nothing material is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for the single 'code' parameter, so the description must compensate and largely does by specifying that the value should be the function performing the side effect, with examples of side-effect kinds. It does not say whether surrounding file scope or callers matter, leaving a small ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (check) and resource (a code snippet) plus the domain concept it evaluates: signals that stop duplicate execution. An agent can distinguish it from explain_guard_pattern and audit_api_keys, though the phrase 'signals that stop duplicate execution' is slightly abstract where 'idempotency guards' would be sharper.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Paste the function that performs the side effect (sending, charging, writing)' gives a clear, actionable condition for when to use the tool and what input scope is expected. It stops short of naming when to use a sibling instead, so it does not reach a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses that the tool explains what failure the pattern prevents and its minimal shape, which is useful behavioral context. However, it does not mention error behavior for unknown patterns, case sensitivity, or other operational details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose and followed by the valid pattern list. Every sentence earns its place with no waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given an output schema exists, the description need not explain return values. It adequately covers the tool's scope and valid inputs. Minor gaps remain around unknown-pattern behavior, but the definition is complete enough for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It lists all known pattern values, giving strong semantic meaning to the required 'pattern' parameter. It does not specify exact string format or case sensitivity, but the enumeration is a significant addition beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Explain one production guard pattern'. It also names the known patterns, making the tool's scope concrete. It does not explicitly differentiate itself from sibling tools like check_idempotency_pattern, but the verb 'Explain' implies conceptual explanation rather than validation or auditing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the phrase 'Explain one production guard pattern' and the list of known patterns. However, there is no explicit guidance on when to use this tool versus alternatives such as check_idempotency_pattern or audit_api_keys, nor any exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
audit_api_keys - First observed
check_idempotency_pattern - First observed
explain_guard_pattern
TDQS
Scored across 3 tools
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.
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.
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.
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
Related MCP Connectors
Security scanner for AI agents: prompt injection, leaked secrets, PII, and SSRF-risk URL detection.
Agent security: prompt injection, PII & secret scans, TLS/header/CORS audits, MCP checks. Free.
Lets coding agents check their own code for leaked secrets, risky dependencies and AI-code mistakes
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Related MCP Servers
- AlicenseAqualityBmaintenanceSecurity co-pilot for AI agents. Scans for vulnerabilities like prompt injection, infinite loops, and token bombing in AI Agents, audits MCP servers, verifies AGENTS.md governance, and generates EU AI Act compliance reports.10160 npm3Apache 2.0
- AlicenseNot gradedqualityDmaintenanceLocal-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
agent-guardprivate
AlicenseAqualityCmaintenanceSafety checks an agent runs before it acts — flags malicious packages, destructive shell commands, secret leaks, and web-backend holes before execution.8MIT- AlicenseNot gradedqualityCmaintenanceIt 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