# MCP Security Guard

> MCP Security Guard is an open-source MCP server for security. Local audit of installed MCP servers for tool poisoning, rug pulls and leaked secrets. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, VS Code, macOS, Windows, Linux, Self-hosted
- **Repository:** https://github.com/petrovicistefan/mcp-security-guard
- **MCP Registry name:** io.github.petrovicistefan/mcp-security-guard
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

The question this tool answers is whether the MCP servers an AI client can reach are feeding it hostile text. It discovers servers from user, project and local scope, servers bundled in plugins, Claude Desktop config and extensions, managed configs, other clients such as Cursor, VS Code and Windsurf, and claude.ai connectors. It then scans what each server puts into context: tools, instructions, prompts, resources and templates.

Checks include instruction overrides and hidden directives in tool descriptions, the same checks across full parameter schemas, zero-width and bidirectional Unicode, tool shadowing between servers, and rug pulls detected by SHA-256 pins on tools, skills, commands, subagents and CLAUDE.md files, re-checked at each session start. Findings map to the OWASP MCP Top 10, and supply-chain checks use OSV, npm and PyPI. By default everything runs locally and network access is opt-in.

Usage options include an npx command line, a Claude Code plugin with a /mcp-audit command, runtime pre and post tool-use hooks, and a GitHub Action that emits SARIF for pull-request code scanning. It can also export a CycloneDX 1.6 agent bill of materials. A paid, opt-in Team plan adds shared policy and approvals. The licence is MIT.

## Features

- **Multi-source discovery:** Finds servers in user, project, plugin, desktop and other-client configs.
- **Tool poisoning detection:** Flags instruction overrides, secret-reading directives and exfiltration tricks.
- **Rug-pull pinning:** Pins SHA-256 hashes and warns when definitions later change.
- **OWASP MCP Top 10 mapping:** Every finding is mapped to the OWASP list.
- **CI integration:** A GitHub Action reports findings as SARIF code-scanning alerts.
- **Runtime hooks:** Pre and post tool-use hooks can block credentials and poisoned outputs.
- **Agent bill of materials:** Exports a CycloneDX 1.6 inventory.

## Good for

- Audit your local MCP setup before trusting a new server
- Fail a pull request that adds a risky MCP server or poisoned skill
- Detect when an installed server changes its tool descriptions
- Produce compliance evidence for OWASP MCP Top 10 coverage

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mcp-security-guard -- npx -y mcp-security-guard
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-security-guard -- npx -y mcp-security-guard
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp-security-guard]
command = "npx"
args = ["-y", "mcp-security-guard"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mcp-security-guard npx -- -y mcp-security-guard

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-security-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-security-guard"
      ]
    }
  }
}
```

## FAQ

### Does MCP Security Guard send data off my machine?

No by default. The README says everything runs locally and network access is explicit opt-in.

### How do I run MCP Security Guard?

With npx -y mcp-security-guard audit --project-only, or install it as an MCP server or Claude Code plugin.

### What licence is MCP Security Guard?

MIT.

### Is there a paid plan?

A Team plan is available as a paid opt-in with shared policy and approvals; prices are not given.

### How do I add MCP Security Guard to Claude Code?

Run this command in your terminal: claude mcp add mcp-security-guard -- npx -y mcp-security-guard

### What are the best alternatives to MCP Security Guard?

The closest alternatives to MCP Security Guard are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/mcp-security-guard
