# Import Guardian

> Import Guardian is an open-source MCP server. Catch AI-hallucinated (slopsquatted) npm imports in generated code before npm install. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/baneado98/import-guardian
- **MCP Registry name:** io.github.Baneado98/import-guardian
- **Listing updated:** 2026-11-13

## About

Catch AI-hallucinated (slopsquatted) npm imports in generated code before npm install.

## Install

### Claude Code (Terminal)

```sh
claude mcp add import-guardian -- npx -y import-guardian-mcp
```

### Claude Desktop (claude_desktop_config.json)

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

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

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

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

```json
{
  "servers": {
    "import-guardian": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "import-guardian-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

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

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

## FAQ

### Is Import Guardian free?

Yes. Import Guardian is open source, so you can use and self-host it for free.

### How do I add Import Guardian to Claude Code?

Run this command in your terminal: claude mcp add import-guardian -- npx -y import-guardian-mcp

## Where this comes from

- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.

---
Source: https://ai-powered.com/mcp/import-guardian
