Git-aware safe file ops for AI agents: delete anything except git-tracked source code.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
MCP server (written in Go, single static binary) for git-aware safe file operations. Give your AI agents (Claude Code, GitHub Copilot CLI, Cursor, β¦) free rein to delete what they build β while making it impossible for them to delete your git-tracked source code.
Policy: anything is deletable until it's tracked by a git repository.
| Tool | Purpose |
|---|---|
safe_delete | Delete files/dirs; refuses git-tracked files or dirs containing them. Supports dry_run. |
check_protection | Report whether paths are protected and why. |
guard_status | Summarize a directory: tracked (protected) vs untracked (deletable) counts. |
Build the single static binary (no runtime dependencies):
Or install directly:
In ~/.copilot/mcp-config.json:
Add to your CLAUDE.md / AGENTS.md / .github/copilot-instructions.md:
Never use
rmin the shell. Always delete files with thesafe_deleteMCP tool, which protects git-tracked source code.
Since safe_delete can never destroy tracked source, it is safe to auto-approve this server's tools in your client's permission settings.
git on PATH24-case edge suite (tracked/staged/ignored files, nested repos, symlinks, dry-run, β¦):
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/agent-guard-mcp)<a href="https://allmcps.com/mcp/agent-guard-mcp"><img src="https://allmcps.com/api/badge/agent-guard-mcp?style=directory" alt="Agent Guard Mcp on AllMCPs" /></a>