AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Mcp Guard

mcp-sainitish1609-mcp-guard Β· by sainitish1609

πŸ›‘οΈ Ultra-fast local security firewall, secret sanitizer, and context token compressor for Claude Code, Cursor, and MCP AI agents.

β€” No reviews yet
0 installs
26 views
0.0% view→install

Install

$ agentstack add mcp-sainitish1609-mcp-guard

βœ“ scanned Β· βœ“ verified, works with Claude Code, Cursor, and more.

Security review

βœ“ Passed

No issues found. Passed automated security review. Β· v0.1.0 How review works β†’

  • βœ“ Prompt-injection patterns
  • βœ“ Secret / credential exfiltration
  • βœ“ Dangerous shell & filesystem operations
  • βœ“ Untrusted network calls
  • βœ“ Known-malicious package signatures

What it can access

  • βœ“ Network access No
  • βœ“ Filesystem access No
  • βœ“ Shell / process execution No
  • ● Environment & secrets Used
  • βœ“ Dynamic code execution No

From automated source analysis of v0.1.0. β€œUsed” means the capability is present in the source β€” more access means more to trust, not that it’s unsafe.

View the full security report β†’

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-sainitish1609-mcp-guard)

Reliability & compatibility

βœ“ Security review passed
0 installs to date
β€” no reviews yet
● 20d ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work β†’
Are you the author of Mcp Guard? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

mcp-guard πŸ›‘οΈ

[](https://golang.org/) [](https://opensource.org/licenses/MIT)

> The local privacy firewall, secret sanitizer, and token compressor for AI coding agents.

A security guardrail proxy for Model Context Protocol (MCP) servers.

mcp-guard is an ultra-fast, zero-dependency Go binary that sits transparently in the stdio JSON-RPC path between your editor (Claude Code, Cursor, VS Code) and any Model Context Protocol (MCP) server.

It acts as a local security proxyβ€”ensuring your sensitive API keys, database credentials, and protected paths (~/.ssh, .env, .git) are never leaked to cloud LLMs or mutated by autonomous tool execution.


πŸ’‘ Why mcp-guard?

When AI agents run tools like @modelcontextprotocol/server-filesystem or postgres-mcp, they read raw files directly from your disk. If a file contains AWS keys, JWTs, or database passwords, those credentials are sent directly to cloud AI APIs in plain text.

mcp-guard runs locally on your machine to solve this without breaking agent execution:

  • πŸ”’ Zero-Trust Input/Output Inspection: Intercepts both requests and responses on stdin/stdout.
  • ⚑ Zero-Dependency Go Binary: Negligible performance overhead ( Note: Compression automatically skips read-for-edit tools (read_file, get_file_contents) to preserve exact diff boundaries for safe file editing.

πŸš€ Installation

# Install via Go
go install github.com/sainitish1609/mcp-guard/cmd/mcp-guard@latest

# Or build from source
git clone https://github.com/sainitish1609/mcp-guard.git
cd mcp-guard
go build -o mcp-guard ./cmd/mcp-guard

---

## βš™οΈ Configuration & Integration

### Claude Code

Wrap any standard MCP server command using `mcp-guard --`:

```bash
claude mcp add postgres -- mcp-guard --redact-secrets --max-tokens 4000 -- npx -y @modelcontextprotocol/server-postgres

Cursor / VS Code (.vscode/mcp.json)

{
  "mcpServers": {
    "filesystem": {
      "command": "mcp-guard",
      "args": [
        "--redact-secrets",
        "--block-shell",
        "--",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/projects"
      ]
    }
  }
}

πŸ“‹ Flag Reference

| Flag | Default | Description | | --- | --- | --- | | --redact-secrets | true | Mask API keys, tokens, and database passwords in tool responses | | --block-shell | true | Block execution of shell scripts in exec tools | | --annotate-tools | true | Append policy notices to tools/list so agents know boundaries upfront | | --compress | false | Strip comments and blank lines from context (safe tools only) | | --max-tokens N | 0 | Approximate token budget cap per result block (0 = unlimited) | | --protect-paths | (defaults) | Custom comma-separated protected paths (overrides defaults) | | --log-level | info | Set logging verbosity (silent, error, info, debug on stderr) | | --dry-run | false | Log security events to stderr without mutating stdin/stdout |


πŸ§ͺ Testing & Verification

# Run unit and integration tests
go test ./... -v

# Run static analysis
go vet ./...

πŸ“„ License

Distributed under the MIT License. See LICENSE for details.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source β€” we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.