# SUNGLASSES

> SUNGLASSES is an open-source MCP server for security. Local input firewall that scans text, files and MCP metadata for prompt injection. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API
- **Website:** https://sunglasses.dev
- **Repository:** https://github.com/sunglasses-dev/sunglasses
- **MCP Registry name:** io.github.sunglasses-dev/sunglasses
- **Categories:** security
- **Listing updated:** 2026-11-14

## About

Sunglasses sits at the point where content turns into model context. It scans prompts, files, repositories, web pages and MCP tool metadata for prompt injection, tool poisoning, credential exfiltration, encoding tricks and memory poisoning, using 1563 patterns across 117 categories. It runs locally with no cloud calls unless you pass a report-to option.

Since v0.4 it also ships an enforcing firewall: sunglasses init installs a Claude Code PreToolUse hook that blocks secrets leaving in outbound tool calls and enforces local policy rules, with audit receipts and descriptor pinning. The site states 97.4% recall on its own benchmark and notes limits, including that nothing is inspected automatically without the local proxy.

The community edition is free and MIT licensed; a fixed-price review is a separate paid offer.

## Features

- **Pattern scanning:** 1563 patterns across 117 attack categories.
- **MCP metadata checks:** Scans tool descriptions and pins descriptor hashes.
- **Enforcing hook:** Claude Code hook blocks secrets in outbound calls.
- **Python API and CI:** Scan repos and pull requests in a pipeline.
- **Audit receipts:** Records what the firewall decided.

## Good for

- Scan a repo for prompt injection before an agent reads it
- Check an MCP server's tool descriptions
- Block secrets leaving in tool calls
- Run scans in CI

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "sunglasses": {
      "command": "uvx",
      "args": [
        "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"
      ]
    }
  }
}
```

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

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

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

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

## FAQ

### Does it send data to a cloud?

No by default; only if you pass --report-to or install the optional audio extra.

### How is it licensed?

MIT, free via pip install sunglasses.

### What is the paid offer?

Boundary Review, $4,000 per workflow, with a $2,500 founding offer for the first five buyers.

### Does it inspect everything automatically?

No; server responses are inspected only with the local proxy (beta).

### Is SUNGLASSES free?

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

### How do I add SUNGLASSES to Claude Code?

Run this command in your terminal: claude mcp add sunglasses -- uvx sunglasses

### What are the best alternatives to SUNGLASSES?

The closest alternatives to SUNGLASSES are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/sunglasses
