# AI Guard

The AI Guard MCP server for Claude Code checks JavaScript and TypeScript for risky or fragile patterns. It can also flag weakened tests and suspicious npm packages.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 21 repo stars
- Author: ai-guard-dev
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ai-guard-dev/eslint-plugin-ai-guard
- Updated: 2026-11-14
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/ai-guard

## What it does

AI Guard gives agents access to 27 ESLint rules for JavaScript and TypeScript checks. Its 9 MCP tools include checks for changes that weaken tests or settings, scans of agent configuration, and npm package checks. It looks for risky code patterns; it does not try to tell whether a person or an AI wrote the code.

The server communicates with local agent workflows over STDIO. Run it with `npx -y eslint-plugin-ai-guard`. The package also includes a CLI for scanning files and changes, plus a GitHub Action that sends SARIF results to Code Scanning. The MCP server requires `npx`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add ai-guard -- npx -y eslint-plugin-ai-guard
```

### Codex

**Platform CLI**
```bash
codex mcp add ai-guard -- npx -y eslint-plugin-ai-guard
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ai-guard": {
            "command": "npx",
            "args": [
                "-y",
                "eslint-plugin-ai-guard"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ai-guard": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "eslint-plugin-ai-guard"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add ai-guard npx -y eslint-plugin-ai-guard
```

## When to use it
- spot risky patterns in JavaScript and TypeScript
- catch changes that weaken tests or lint settings
- block misspelled and nonexistent npm package names
- scan agent configuration for hidden text and prompt injection

## Example prompts
- Scan these JavaScript changes for unsafe async patterns.
- Check whether this change weakens tests or ESLint settings.
- Check this npm package name for typos or suspicious releases.

## Similar
- [convex-deploy-guard](https://affpapa.org/en/nevibecode/skills/convex-deploy-guard.md) — skill · 46900 installs
- [safety-guard](https://affpapa.org/en/nevibecode/skills/safety-guard.md) — skill · 6200 installs
- [clean-code-guard](https://affpapa.org/en/nevibecode/skills/clean-code-guard.md) — skill · 4900 installs
- [test-guard](https://affpapa.org/en/nevibecode/skills/test-guard.md) — skill · 4400 installs
- [session-guard](https://affpapa.org/en/nevibecode/skills/session-guard.md) — skill · 2800 installs
- [prompt-guard](https://affpapa.org/en/nevibecode/skills/prompt-guard.md) — skill · 1100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
