agent-guard-mcp

agent-guard-mcp

Provides git-aware safe file operations, allowing AI agents to delete files while protecting git-tracked source code from accidental deletion.

Category
Visit Server

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

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.

Install

Build the single static binary (no runtime dependencies):

go build -o agent-guard-mcp .

Or install directly:

go install github.com/kavachh/agent-guard-mcp@latest

Claude Code

claude mcp add agent-guard -- /path/to/agent-guard-mcp

GitHub Copilot CLI

In ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "agent-guard": { "command": "/path/to/agent-guard-mcp", "args": [] }
  }
}

Any MCP client (generic stdio config)

{ "command": "/path/to/agent-guard-mcp", "args": [] }

Recommended agent instructions

Add to your CLAUDE.md / AGENTS.md / .github/copilot-instructions.md:

Never use rm in the shell. Always delete files with the safe_delete MCP 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

safe_delete { "paths": ["build/", "scratch.txt"] }
→ deleted (untracked)

safe_delete { "paths": ["src/main/java/App.java"] }
→ BLOCKED: git-tracked source file — use `git rm` deliberately if intended

Requirements

  • git on 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, …):

go build -o agent-guard-mcp . && npm test

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured