
Agent Guard Mcp
io.github.KavachhPublished by GitHub account Kavachhv0.2.0Updated Oct 24, 2026
Git-aware safe file ops for AI agents: delete anything except git-tracked source code.
Overview
A local MCP server that lets an assistant delete files and directories while refusing to remove anything tracked by git.
- What you can do
- Provides git-aware file deletion tools: safe_delete removes files or directories but blocks git-tracked files or directories containing them, and supports a dry_run mode. check_protection reports whether given paths are protected and why, and guard_status summarizes a directory with counts of tracked (protected) versus untracked (deletable) entries. The policy is that anything is deletable until it is tracked by a git repository.
- When to use it
- Useful when you want an AI coding agent to clean up build output, scratch files, and generated artifacts without risking deletion of source code under version control. It fits workflows where agents are given broad permission to remove files they create.
- Requirements
- Runs as a local stdio process from a single static binary; git must be on PATH. Building from source requires Go 1.24 or later, though the compiled binary has no runtime dependencies. No accounts, API keys, or environment variables are declared.
Installation
In SourceWeft
- Open Agent Guard Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
agent-guard-mcp
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.
Tools
Install
Build the single static binary (no runtime dependencies):
Or install directly:
Claude Code
GitHub Copilot CLI
In ~/.copilot/mcp-config.json:
Any MCP client (generic stdio config)
Recommended agent instructions
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.
Example
Requirements
giton PATH- Go ≥ 1.24 (build only — the binary itself has zero dependencies)
Testing
24-case edge suite (tracked/staged/ignored files, nested repos, symlinks, dry-run, …):
Source: README.md at commit f19ee77
Tools
0Version history
1- v0.2.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts