Zaza Lens MCP
# Zaza Lens MCP
**Inspect the evidence. Keep the original.** A free local Model Context Protocol (MCP) companion to [Zaza Lens](https://zazalens.vercel.app/) by Buildwithzaza.
This repository is intended for `https://github.com/89joshuaugwu/zazalens-mcp`.
Zaza Lens reads hidden Unicode characters in text and supported metadata in PNG, JPEG and WebP images. A tool name or metadata value is a clue, **not proof that content came from AI**. The server cannot reliably identify AI-written text, detect invisible image watermarks or verify Content Credentials signatures. It does not claim to erase AI fingerprints.
## Install from npm (recommended)
Zaza Lens MCP **v1.4.0 is available on npm** at https://www.npmjs.com/package/zazalens-mcp. Install Node.js 22 or newer, then run **one** command for your assistant:
```powershell
npx -y zazalens-mcp@1.4.0 setup codex
npx -y zazalens-mcp@1.4.0 setup claude
npx -y zazalens-mcp@1.4.0 setup both
```
The version is pinned to avoid silently switching to future code. The installer previews its changes, asks for consent, and backs up existing configurations. Local image-folder access is **OFF by default**. If Zaza Lens is already connected from an older Git clone or ZIP, review the existing MCP entry and append `--replace` only when you want to change it.
Verify the downloaded package without changing your assistant settings:
```powershell
npx -y zazalens-mcp@1.4.0 doctor
npx -y zazalens-mcp@1.4.0 setup both --dry-run
```
To uninstall Zaza Lens entries (other MCP servers remain):
```powershell
npx -y zazalens-mcp@1.4.0 uninstall both
```
## Alternative: permanent local Git clone
For a source-based installation that avoids npm downloads on each MCP startup, install Node.js 22+ and Git, then run in PowerShell:
```powershell
New-Item -ItemType Directory -Force "$HOME\Tools" | Out-Null
cd "$HOME\Tools"
git clone https://github.com/89joshuaugwu/zazalens-mcp.git
cd .\zazalens-mcp
node .\setup\check.mjs
node .\bin\cli.mjs setup both --source local
```
You can replace `both` with `codex` or `claude`. Keep the cloned directory in place, because the assistant launches `mcp/stdio.mjs` from this path. For local-only verification, use `node .\bin\cli.mjs doctor`; for config removal, use `node .\bin\cli.mjs uninstall both`.
The older GitHub-backed `npx -y github:89joshuaugwu/zazalens-mcp ...` command can fail with `EALLOWGIT` on npm 12. **Do not disable npm Git security settings globally** to work around this.
### Verify installation and troubleshoot
```powershell
node --version
npm --version
node .\bin\cli.mjs doctor
```
If Node is not found, reinstall a supported LTS from https://nodejs.org/ and open a fresh terminal. If MCP tools are not visible, restart the connected assistant and inspect its MCP configuration. If you moved the cloned folder, update the Zaza Lens entry with `--replace` only after reviewing the old entry.
## Install it on Windows (manual fallback)
1. Download this repository using **Code > Download ZIP** on GitHub (or use the attached repository release ZIP if one has been officially published).
2. Extract it to a **permanent folder**, for example `C:\Tools\zazalens-mcp`. Do not move the folder after connecting it.
3. Install **Node.js 22 or newer** from https://nodejs.org/ if you have not already. Check with `node --version`.
4. Open the extracted folder and double-click `setup\Setup-Codex.cmd` **or** `setup\Setup-Claude.cmd`. Review the scripts before running them; they only connect the local server to the selected app. They require no administrator permission.
5. Restart the AI app, then ask: **“Use Zaza Lens to inspect the exact hidden characters in this text: Hello World.”** (There is a zero-width space between Hello and World.)
**To test without connecting anything:** open a terminal in the extracted folder and run `node setup/check.mjs`. It should print `PASS`.
**Already use Codex or Claude and prefer commands?** See [SETUP-FOR-EVERYONE.md](SETUP-FOR-EVERYONE.md) and [AGENTS.md](AGENTS.md).
## Install directly from GitHub (requires Git)
```powershell
git clone https://github.com/89joshuaugwu/zazalens-mcp.git
cd zazalens-mcp
node setup/check.mjs
```
No `npm install` is needed for the **local MCP**. It has no paid AI API, database or background service. Compatible assistants start the server automatically through the configured `node mcp/stdio.mjs` command.
> GitHub stores the code. GitHub Pages does not run an MCP server. The local server runs on the user's PC, whereas a hosted MCP endpoint needs a separate service such as a server-capable Next.js deployment.
## What your assistant can call
| Tool | Purpose | Access |
| --- | --- | --- |
| `inspect_text` | Find hidden formatting characters, positions and Unicode codes | Local or hosted |
| `clean_text` | Remove only user-approved finding IDs from original text | Local or hosted |
| `inspect_image` | Inspect base64 PNG/JPEG/WebP metadata (2 MiB limit) | Local or hosted |
| `clean_image` | Export base64 image copy with selected removable metadata omitted | Local or hosted |
| `inspect_image_file` | Scan an image directly from an explicitly allowed folder (8 MiB limit) | Local only; opt in |
| `clean_image_file` | Save a separate cleaned copy (never overwrite existing file) | Local only; opt in |
**Local file access is OFF by default.** To enable the last two tools, re-run the PowerShell install script with an `-AllowedImageFolder` parameter or manually configure `ZAZA_MCP_ALLOWED_DIRS` for a folder you trust. The local server itself makes no outgoing network calls. The AI app may transmit findings to its provider.
No PDF or Word document MCP tools are included yet. The **Zaza Lens website** has separate browser-based PDF/DOCX/TXT inspection and supported export features.
## Tell an AI assistant to set it up
Share this URL with a *coding assistant that can use a terminal*:
`https://github.com/89joshuaugwu/zazalens-mcp`
Suggested message:
> Open the Zaza Lens MCP GitHub repository above. Read `README.md` and `AGENTS.md`, check what the code does, and ask before installing or editing my assistant's configuration. With my approval, clone the repo to a permanent folder, check Node.js 22+, run `node setup/check.mjs`, and connect `mcp/stdio.mjs` as a local MCP. Do not expose my files or enable a public hosted server without asking.
A standard chat window without terminal or filesystem access cannot install programs on your PC. Claude Desktop, Codex, or another suitably enabled agent may be able to do it after you approve the necessary access.
## Developers
```sh
node --version # >=22
node setup/check.mjs # smoke test
node --test tests/*.test.mjs # engine and protocol tests
node mcp/stdio.mjs # waits for an MCP client on stdin/stdout
```
The local implementation supports legacy 2025-11-25 initialization and current 2026-07-28 discovery/metadata requests. It is a dependency-free protocol implementation; not a claim of exhaustive interoperability certification. It should be tested on each client. No npm registry download is necessary for the local server.
**Repository files:** `mcp/` protocol and safe local file tools; `public/inspector/` the shared browser detection rules; `tests/` tests; `setup/` Windows setup and health check; `.github/workflows/` automatic tests.
For the full Next.js website, use the separate `Zaza-Lens-Website-NextJS-MCP.zip` bundle, not this local-MCP-only repository. The website can expose an optional, disabled-by-default, bearer-token-protected `/mcp` endpoint, but production public use requires authentication and abuse prevention. See `SETUP-FOR-EVERYONE.md`.
**Licensing:** The public MCP source is distributed under the [MIT License](LICENSE). Other bundled projects, including the private website, may use different notices or terms.
**Safety/privacy:** The scanner does not prove AI authorship or make content immune to provenance checks. Review individual metadata changes and keep required disclosures. Never give an untrusted MCP access to confidential files without reviewing its code and permissions.
## December 2026 image-inspection update
This release expands recognition of explicit model/tool names in readable metadata and includes regression tests for Gemini, Imagen, OpenAI, Adobe Firefly, Midjourney and open-source generators. The website also shows the uploaded image even when a non-removable C2PA marker is the only finding, and explains why there is no “fixed” image. Read [PROVIDER_COVERAGE.md](PROVIDER_COVERAGE.md) for exactly what is and is not verified.
TDQS
Scored across 4 tools
The four tools form two clean inspect/clean pairs split by resource type (text vs. image), and each description explicitly states its role and its partner tool. An agent can pick the right tool from the name alone, with no overlapping behavior.
All four names follow a strict verb_noun pattern (inspect_text, clean_text, inspect_image, clean_image) with the same two verbs paired across the same two nouns. This is a textbook consistent convention.
Four tools is the minimum complete set for the stated purpose (inspect + clean for each of two media types). Nothing is redundant and nothing feels missing at the count level.
Both domains get a full inspect-to-clean lifecycle, so there are no dead ends; cleaning correctly depends on IDs from inspection. Minor gaps exist, such as no re-verification step after cleaning and no way to batch or handle multiple inputs in one call.