# MCPGuard — MCP Config & AI Agent Rules Security Auditor

> MCPGuard — MCP Config & AI Agent Rules Security Auditor is an open-source MCP server for security. Deterministic security scanner for MCP configs, agent rules files and agent spend logs. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Web, Self-hosted
- **Repository:** https://github.com/zluowa/mcpguard-kit
- **MCP Registry name:** io.github.Zluowa/mcpguard-kit
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-11-27

## About

Scans the configuration files that wire AI agents to tools and check them for risks before they reach production. It flags hardcoded credentials, plaintext endpoints, secrets in URL query strings, unpinned npx packages and overly broad filesystem roots in MCP config files, including JSONC. It also inspects agent instruction files such as AGENTS.md, CLAUDE.md, .cursorrules and SKILL.md for hidden Unicode steganography, bidi override characters, piped remote shell commands and context bloat.

Results come from fixed rules rather than a language model, so the same input always produces the same findings and exit codes. Output can be a 0-100 score, Markdown for pull request comments, or SARIF 2.1.0 for code scanning. A separate circuit breaker checks agent JSONL logs against USD and token budgets and detects retry loops.

It suits developers and platform teams who want a CI gate for agent configuration. It runs as a zero-install CLI, a GitHub Action, a local stdio MCP server, a browser page that works offline, or a self-hosted HTTP service.

## Features

- **Credential leak detection:** Finds hardcoded API keys, bearer tokens, PEM blocks and database credentials in MCP configs.
- **Agent rules backdoor scanning:** Detects invisible Unicode tag characters, bidi overrides and zero-width smuggling in instruction files.
- **Unified repository audit:** Discovers MCP configs and agent rules across a repo and produces a graded score.
- **SARIF and pull request output:** Exports SARIF 2.1.0 for code scanning and Markdown summaries for review comments.
- **Agent budget circuit breaker:** Halts agent runs that exceed USD or token caps or fall into ping-pong retry loops.
- **Deterministic exit codes:** Returns fixed exit codes per finding class so CI jobs can allow or block automatically.

## Good for

- Blocking pull requests that add plaintext secrets to mcp.json
- Auditing SKILL.md and CLAUDE.md files for hidden instructions before merging
- Limiting spend and stopping retry loops in scheduled agent jobs
- Scoping filesystem MCP servers to a project directory instead of the root
- Running a security gate in GitHub Actions with results shown in code scanning

## Install

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

```sh
claude mcp add --transport http mcpguard-kit 'https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor'
```

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": {
    "mcpguard-kit": {
      "type": "http",
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "type": "http",
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

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

```sh
codex mcp add mcpguard-kit --url 'https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor'
```

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

```toml
[mcp_servers.mcpguard-kit]
url = "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
```

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "httpUrl": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http mcpguard-kit 'https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor'

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "serverUrl": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor",
      "transport": "http"
    }
  }
}
```

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": {
    "mcpguard-kit": {
      "type": "streamableHttp",
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcpguard-kit": {
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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": {
    "mcpguard-kit": {
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

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

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor
```

Enter a Name (for example "MCPGuard — MCP Config & AI Agent Rules Security Auditor"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin. When we checked, this server asked for a bearer token. Add it under HTTP headers as Authorization: Bearer <your token>.

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

```json
{
  "mcpServers": {
    "mcpguard-kit": {
      "type": "http",
      "url": "https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor"
    }
  }
}
```

## Tools

Going by the tool names, 5 names don't say. From the server's own tool labels and tool names; not verified by us.

- `audit_repository`: Audit a repository for MCP configs and agent rules.
- `audit_mcp_config`: Audit an MCP configuration file.
- `sanitize_mcp_config`: Produce a sanitized MCP configuration.
- `audit_rules_file`: Audit an agent rules file.
- `evaluate_circuit_breaker`: Evaluate agent logs against budget and loop limits.

## FAQ

### Does the auditor use an LLM?

No. The checks are deterministic and make zero LLM calls.

### What exit code signals a security finding?

Exit code 4 is returned for CRITICAL or HIGH findings, which is intended to block a pull request merge.

### How is the remote MCP endpoint priced?

The remote endpoint uses an Apify API token. The local CLI, GitHub Action and self-hosted API are free to run.

### Which agent rules files are scanned?

AGENTS.md, CLAUDE.md, GEMINI.md, .cursorrules, .cursor/rules/*.mdc, .github/copilot-instructions.md and SKILL.md.

### How do I add MCPGuard — MCP Config & AI Agent Rules Security Auditor to Claude Code?

Run this command in your terminal: claude mcp add --transport http mcpguard-kit 'https://mcp.apify.com/?actors=zluowa~mcpguard-security-auditor'

### What are the best alternatives to MCPGuard — MCP Config & AI Agent Rules Security Auditor?

The closest alternatives to MCPGuard — MCP Config & AI Agent Rules Security Auditor are mcp-guard, MCP Security Guard, MCP Config Auditor, MCP Config Auditor and MCP configuration audit.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Status: checked automatically by AIPoweredBot on 29 November 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [mcp-guard](https://ai-powered.com/mcp/mcp-guard): mcp-guard is a free MCP server for security.
- [MCP Security Guard](https://ai-powered.com/mcp/mcp-security-guard): MCP Security Guard is an open-source MCP server for security.
- [MCP Config Auditor](https://ai-powered.com/mcp/mcp-config-auditor): MCP Config Auditor is an open-source MCP server for security.
- [MCP Config Auditor](https://ai-powered.com/mcp/mcp-config-auditor-2): MCP Config Auditor is a free MCP server for security.
- [MCP configuration audit](https://ai-powered.com/mcp/mcp-configuration-audit): MCP configuration audit is an open-source MCP server for security.
- [MCP & Agent Security Auditor](https://ai-powered.com/mcp/mcp-and-agent-security-auditor): MCP & Agent Security Auditor is an open-source MCP server for security.
- [Aguara MCP](https://ai-powered.com/mcp/aguara-mcp-2): Aguara MCP is an open-source MCP server for security.
- [Skill Audit MCP](https://ai-powered.com/mcp/skill-audit-mcp): Skill Audit MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/mcpguard-mcp-config-and-ai-agent-rules-security-auditor
