# ai-code-scanner MCP server

> Scans codebases for security vulnerabilities in LLM and AI integrations, such as prompt injection, data privacy leaks, and unsafe output handling.

- Repository: https://github.com/GuardBee/guardbee-mcp
- Page: https://hostedmcp.org/servers/guardbee/ai-code-scanner
- Transport: stdio
- Stars: 2
- License: MIT
- Latest version: 0.3.2

## Install

### Claude Code

```sh
claude mcp add ai-code-scanner -- npx -y @guardbee/mcp-ai-code-scanner
```

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

```json
{
  "mcpServers": {
    "ai-code-scanner": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-ai-code-scanner"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "ai-code-scanner": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-ai-code-scanner"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"ai-code-scanner","type":"stdio","command":"npx","args":["-y","@guardbee/mcp-ai-code-scanner"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "ai-code-scanner": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-ai-code-scanner"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add ai-code-scanner -- npx -y @guardbee/mcp-ai-code-scanner
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.ai-code-scanner]
command = "npx"
args = ["-y", "@guardbee/mcp-ai-code-scanner"]
```

### Gemini CLI

```sh
gemini mcp add -s user ai-code-scanner npx -- -y @guardbee/mcp-ai-code-scanner
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "ai-code-scanner": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-ai-code-scanner"
      ]
    }
  }
}
```

## Tools (4)

- `scan_text`
- `scan_file`
- `scan_directory`
- `list_patterns`

## FAQ

### What kind of security risks does it detect?

It identifies patterns like client-side API key exposure, unsafe execution of model output, excessive agent agency, PII in prompts, and prompt injection.

### Does it perform full AST analysis?

No, it uses heuristic static text-pattern scanning rather than full AST analysis.

### Can I add my own security rules?

Yes, you can extend detection with organization-specific patterns using custom JSON rule packs.

### Is telemetry enabled by default?

No, telemetry is turned off by default.
