# Soulfield Lens MCP server

> Provides an outside-in validation gate for AI-generated text using a separate model to check outputs for accuracy and PII leaks.

- Repository: https://github.com/mrhpython/lens-mcp
- Page: https://hostedmcp.org/servers/mrhpython/lens-mcp
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 1.1.1

## Install

### Claude Code

```sh
claude mcp add --env SOULFIELD_API_KEY=<YOUR_SOULFIELD_API_KEY> lens-mcp -- npx -y @soulfield/lens-mcp
```

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

```json
{
  "mcpServers": {
    "lens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@soulfield/lens-mcp"
      ],
      "env": {
        "SOULFIELD_API_KEY": "<YOUR_SOULFIELD_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "lens-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@soulfield/lens-mcp"
      ],
      "env": {
        "SOULFIELD_API_KEY": "<YOUR_SOULFIELD_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "lens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@soulfield/lens-mcp"
      ],
      "env": {
        "SOULFIELD_API_KEY": "<YOUR_SOULFIELD_API_KEY>"
      }
    }
  }
}
```

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

```toml
[mcp_servers.lens-mcp]
command = "npx"
args = ["-y", "@soulfield/lens-mcp"]

[mcp_servers.lens-mcp.env]
SOULFIELD_API_KEY = "<YOUR_SOULFIELD_API_KEY>"
```

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

```json
{
  "mcpServers": {
    "lens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@soulfield/lens-mcp"
      ],
      "env": {
        "SOULFIELD_API_KEY": "<YOUR_SOULFIELD_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SOULFIELD_API_KEY` | no | yes | API key for validate_content and scrub_pii. Get one free, self-serve, no card, at https://api.soulfield.one/pricing#signup. lens_health needs no key. |
| `SOULFIELD_API_BASE` | no | no | Lens API base URL. Use https://api.soulfield.one for the hosted service. |

## Tools (10)

- `validate_content`
- `scrub_pii`
- `lens_health`
- `validate_artifact`
- `lens_consistency_leaks`
- `lens_consistency_numbers`
- `lens_consistency_markers`
- `lens_catches_relevant`
- `lens_catches_add`
- `lens_catches_stats`

## FAQ

### How does the validation process differ from standard LLM self-correction?

Unlike standard methods where a model checks its own work, Soulfield Lens uses a separate model to run a fixed gate over the output.

### Does the server send my local files to the API?

No, the hosted API only receives the finished artifact text. Local file paths and evidence are handled locally to prevent file-disclosure vectors.

### Can I use the tool without an API key?

Yes, the lens_health tool works without a key, and the keyless demo endpoint allows a few runs per day per IP.
