AI Guard — Claude Code MCP server: checks and installation
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.
MIT ★ 21 updated 2026-11-14
claude mcp add ai-guard -- npx -y eslint-plugin-ai-guardWhat AI Guard 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.
What it helps with
- 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 for the agent
- 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.
How to install AI Guard
Platform CLI
claude mcp add ai-guard -- npx -y eslint-plugin-ai-guardPlatform CLI
codex mcp add ai-guard -- npx -y eslint-plugin-ai-guardConfig file
{
"mcpServers": {
"ai-guard": {
"command": "npx",
"args": [
"-y",
"eslint-plugin-ai-guard"
]
}
}
}Config file
{
"servers": {
"ai-guard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"eslint-plugin-ai-guard"
]
}
}
}Platform CLI
gemini mcp add ai-guard npx -y eslint-plugin-ai-guardStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about AI Guard
How do I install AI Guard in Claude Code?
Run claude mcp add ai-guard -- npx -y eslint-plugin-ai-guard.
What does AI Guard do?
It exposes tools for checking JavaScript and TypeScript, test and settings integrity, agent configuration, and npm packages.
What does AI Guard need to run?
The MCP server runs with npx -y eslint-plugin-ai-guard; Claude Code registers it with claude mcp add.