# SUNGLASSES MCP server

> Scans text, files, and tool calls for security threats and credential leaks to act as an input firewall for AI agents.

- Repository: https://github.com/sunglasses-dev/sunglasses
- Page: https://hostedmcp.org/servers/sunglasses-dev/sunglasses
- Transport: stdio
- Stars: 11
- License: MIT
- Latest version: 0.6.24

## Install

### Claude Code

```sh
claude mcp add sunglasses -- uvx sunglasses
```

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

```json
{
  "mcpServers": {
    "sunglasses": {
      "command": "uvx",
      "args": [
        "sunglasses"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "sunglasses": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sunglasses"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"sunglasses","type":"stdio","command":"uvx","args":["sunglasses"]}'
```

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

```json
{
  "mcpServers": {
    "sunglasses": {
      "command": "uvx",
      "args": [
        "sunglasses"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add sunglasses -- uvx sunglasses
```

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

```toml
[mcp_servers.sunglasses]
command = "uvx"
args = ["sunglasses"]
```

### Gemini CLI

```sh
gemini mcp add -s user sunglasses uvx -- sunglasses
```

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

```json
{
  "mcpServers": {
    "sunglasses": {
      "command": "uvx",
      "args": [
        "sunglasses"
      ]
    }
  }
}
```

## Tools (3)

- `scan_text`: Scan text for prompt injection, data exfiltration, credential leaks and other AI agent security threats. Returns findings, a severity, a decision (allow, block, quarantine or allow_redacted) and inspection_complete. The decision is reported to the caller and is not enforced. This tool blocks nothing and returns the matched text of each finding in full, allow_redacted included. isError false means the scan ran, not that the input is clean. Read is_clean and inspection_complete in the result.
- `scan_file`: Scan a file for prompt injection and security threats. Supports text files, images (with OCR), PDFs, and more. For audio/video files, returns a notice that DEEP scan is needed.
- `scanner_info`: Get SUNGLASSES scanner info: version, pattern count, keyword count, supported channels.

## FAQ

### What can SUNGLASSES scan?

It can scan text, code, PDFs, images, QR codes, audio, and video using over 1,500 patterns.

### How does the MCP proxy work?

The proxy mediates the session between the client and the server, refusing tool requests until a human manually approves the server via an interactive terminal.

### Is the scan result a guarantee of safety?

No, a clean result provides a confidence floor but is not a guarantee of absolute safety.
