agy-guard
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
agy-guard
Local safety net for Google Antigravity — runtime destructive-action guard, automatic pre-write snapshots, and offline plugin security auditor.
English | 简体中文
Why agy-guard?
Autonomous coding agents can accidentally wipe directories (rm -rf, Remove-Item -Recurse), run destructive Git resets, leak credentials, or load risky third-party plugins. agy-guard protects your workspace 100% locally without touching host binaries or sending anything to the cloud:
Runtime Guard (
PreToolUse) — Deterministically intercepts catastrophic commands (deny) and risky operations or sensitive/out-of-workspace writes (force_ask) acrosssh,cmd, and PowerShell.Pre-Write Snapshot & Restore — Automatically captures deduplicated, quota-bounded snapshots before edits or deletions so you can diff and roll back in one CLI command.
Offline Plugin & Config Audit — Read-only static audit of Antigravity
plugin.json,hooks.json, global & per-pluginmcp_config.json,rules/*.md,skills/**/SKILL.md, and hook scripts with A–F scoring.
Security Commitments: Zero runtime dependencies · Zero network calls · Zero subprocess spawning in src/ & dist/ · Unminified ESM bundles in dist/ for direct inspection · Automated self-check test on every build.
Related MCP server: codescope
Quick Install
Windows (PowerShell):
irm https://raw.githubusercontent.com/q18270781127-ai/agy-guard/main/install.ps1 | iexmacOS / Linux:
curl -fsSL https://raw.githubusercontent.com/q18270781127-ai/agy-guard/main/install.sh | shFrom a local clone:
git clone https://github.com/q18270781127-ai/agy-guard.git
cd agy-guard
node scripts/install.mjs installUninstall cleanly at any time:
node scripts/install.mjs uninstallDemo Walkthrough
$ agy-guard check "rm -rf /"
DENY [G001]: [agy-guard][Rule G001] Catastrophic recursive delete targeting root, home, system, or workspace root ...
$ agy-guard snapshots
20261129T063015123Z_7 2026-11-29T06:30:15.123Z edit_file (1 file(s))
$ agy-guard diff 20261129T063015123Z_7
--- snapshot/src/app.ts
+++ workspace/src/app.ts
-export const port = 3000;
+export const port = 9999;
$ agy-guard restore 20261129T063015123Z_7 --yes
$ agy-guard audit
[A 100/100] agy-fast (...)
- Clean (0 findings)Guard Rules (G001–G106)
Rule | Decision | Scope |
|
| Recursive delete ( |
|
| Disk format or raw block-device writes ( |
|
| Fork bomb patterns |
|
| Destructive Git commands ( |
|
| Download-to-shell pipes ( |
|
| Accessing sensitive credential paths ( |
|
| Recursive permissive |
|
| Recursive deletion scoped inside the workspace |
|
| File write/edit targeting sensitive files or outside workspace/artifact roots |
Offline Audit Rules (A001–A009)
Rule | Severity | What It Checks |
|
| Hook downloads and executes remote payloads |
|
| Obfuscated execution ( |
|
| Hook or MCP command references credential/SSH paths |
|
| Unpinned remote MCP URL or dynamic |
|
| Hardcoded API tokens ( |
|
| Prompt-injection override phrases or hidden zero-width/bidi Unicode in |
|
|
|
|
| Unaudited executable binary bundled inside a plugin directory |
|
| Missing |
Run agy-guard audit --json, agy-guard audit --md, or agy-guard audit --fail-on high in CI.
Configuration
Precedence: <workspace>/.agents/agy-guard.json > $PLUGIN_DATA/config.json (fallback ~/.agy-guard/config.json) > defaults.
{
"mode": "enforce",
"passDecision": "ask",
"lang": "auto",
"allowRules": [],
"allowCommands": ["rm -rf dist/"],
"snapshot": {
"enabled": true,
"maxFileBytes": 5242880,
"maxSnapshotBytes": 52428800,
"maxTotalBytes": 1073741824,
"retentionDays": 7
}
}mode:"enforce"(default),"ask-only"(downgradesdenytoforce_ask),"monitor"(logs only),"off".passDecision:"ask"(default — preserves Antigravity's native Always Allow prompt flow) or"allow".
MCP Tools
agy-guard exposes 4 read-only MCP tools (restore is intentionally CLI-only):
agy_guard_checkagy_guard_auditagy_guard_snapshotsagy_guard_diff
Security & Protocol Notes
See SECURITY.md for our threat model and fail-open rationale.
See docs/hook-protocol-notes.md for verified Antigravity 2.0
PreToolUsemeasurements.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only checks for proposed orders against evidence and policy; no trading or payment authority.
Read-only MCP for identity resolution and write guardrails.
Read-only MCP server for repository context: context packs, graph impact analysis, and validation.
Run verified read-only code tools: quant diagnostics + agent-ops preflight, no source exposure.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables read-only governance and security checks for local FastMCP environments, including code security review and Trivy vulnerability scanning via MCP tools.-
- AlicenseNot gradedqualityBmaintenanceEnables read-only, allowlisted filesystem and Git inspection of explicitly configured local repositories through MCP, with bounded reads and no arbitrary path or write access.10 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables clients to read files, list tests, and run tests through MCP tool calls, while refusing apply operations.MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to list GKE clusters, describe virtual machines, and retrieve billing information through MCP read tools, without applying production changes.MIT