# flagrix MCP server

> Scans GitHub repositories and profiles for malware and scam signals to provide risk verdicts for AI agents and developers.

- Repository: https://github.com/flagrix-io/flagrix-cli
- Page: https://hostedmcp.org/servers/flagrix-io/flagrix-cli
- Transport: stdio
- Stars: 2
- License: MIT
- Latest version: 0.5.1

## Install

### Claude Code

```sh
claude mcp add --env 'GITHUB_TOKEN=<YOUR_GITHUB_TOKEN>' flagrix-cli -- npx -y flagrix
```

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

```json
{
  "mcpServers": {
    "flagrix-cli": {
      "command": "npx",
      "args": [
        "-y",
        "flagrix"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "flagrix-cli": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "flagrix"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"flagrix-cli","type":"stdio","command":"npx","args":["-y","flagrix"],"env":{"GITHUB_TOKEN":"<YOUR_GITHUB_TOKEN>"}}'
```

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

```json
{
  "mcpServers": {
    "flagrix-cli": {
      "command": "npx",
      "args": [
        "-y",
        "flagrix"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add flagrix-cli --env 'GITHUB_TOKEN=<YOUR_GITHUB_TOKEN>' -- npx -y flagrix
```

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

```toml
[mcp_servers.flagrix-cli]
command = "npx"
args = ["-y", "flagrix"]

[mcp_servers.flagrix-cli.env]
GITHUB_TOKEN = "<YOUR_GITHUB_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'GITHUB_TOKEN=<YOUR_GITHUB_TOKEN>' flagrix-cli npx -- -y flagrix
```

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

```json
{
  "mcpServers": {
    "flagrix-cli": {
      "command": "npx",
      "args": [
        "-y",
        "flagrix"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `GITHUB_TOKEN` | no | yes | Optional GitHub token — raises API rate limits and enables private-repo scans |

## FAQ

### Is my data private when using flagrix?

Yes, the tool is fully local with no telemetry or Flagrix backend; network calls only go to GitHub/npm APIs and the detection rules repository.

### What does exit code 4 mean?

Exit code 4 indicates an incomplete scan where not enough of the repository was read to provide a full verdict, often due to rate limiting.
