lenses-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lenses-mcpRun booklens audit on ~/Documents/book.epub and summarize any errors."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lenses-mcp
MCP server for the Lens suite.
by svx · MIT Licensed
A Model Context Protocol server that exposes the five Lens-suite CLI tools to any MCP client (Claude Desktop, Cursor, etc.).
The Lens CLIs audit files entirely offline and return stable JSON. This server spawns the CLI, appends --json, captures stdout/stderr, and returns the parsed JSON as MCP text content. It never throws raw: non-zero exits come back as isError: true with the CLI's stderr and, when present, the parsed JSON.
Tools
Tool | Inputs | CLI |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Exit codes from the CLIs: 0 ok, 1 findings, 2 bad input, 3 I/O. Any non-zero code is surfaced as an MCP error result.
iconlenscan read SVG from stdin in a terminal (iconlens -), but stdin is reserved by the MCP stdio transport, so over MCP always pass a file path.
Related MCP server: repo-verifier
Install
Nothing to install — run it straight from GitHub with Bun:
bunx github:srivtx/lenses-mcp#mainOr clone it and run from source:
git clone https://github.com/srivtx/lenses-mcp
cd lenses-mcp
bun installUse with an MCP client
Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"lenses": {
"command": "bunx",
"args": ["github:srivtx/lenses-mcp#main"]
}
}
}Cursor
Add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"lenses": {
"command": "bunx",
"args": ["github:srivtx/lenses-mcp#main"]
}
}
}To run from a local clone instead, use "command": "bun" with "args": ["run", "/absolute/path/to/lenses-mcp/src/index.ts"].
Any MCP client
Run bunx github:srivtx/lenses-mcp#main as a stdio server. It speaks newline-delimited JSON-RPC on stdin/stdout; all logs go to stderr.
Command resolution and env overrides
By default each tool runs:
bunx github:srivtx/<tool>#mainThe #main ref is required — a bare github: spec resolves whatever commit bunx has cached, which goes stale. The first call fetches the package over the network.
Set a LENSES_*_BIN variable to point at a binary you installed yourself (e.g. with the tool's install.sh) and skip the network entirely:
Variable | Tool |
|
|
|
|
|
|
|
|
|
|
When set, the override replaces the whole bunx … invocation:
{
"mcpServers": {
"lenses": {
"command": "lenses-mcp",
"args": [],
"env": {
"LENSES_BOOKLENS_BIN": "/usr/local/bin/booklens",
"LENSES_WAXSEAL_BIN": "/usr/local/bin/waxseal"
}
}
}
}An override that is an executable script (e.g. a local .ts CLI with a #!/usr/bin/env bun shebang) works too. A blank/whitespace value falls back to the bunx default.
Development
bun test # unit tests for the command builders + validation
bun run typecheck # tsc --noEmit
bun run start # run the stdio serverSmoke-test the MCP handshake and one tool call by piping newline-delimited JSON-RPC into the server. Set the override to a local checkout so the call does not hit GitHub:
LENSES_ICONLENS_BIN=../svg-a11y/src/cli.ts bun run src/index.ts <<'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0.0.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"iconlens_audit","arguments":{"path":"/absolute/path/to/icon.svg","fail_on":"none"}}}
EOFThe server prints one JSON-RPC response per request line (the initialize result reports serverInfo.name: "lenses-mcp", and the tools/call result carries the CLI's JSON). Calling a missing file returns "isError": true with the CLI's stderr. All diagnostics go to stderr, never stdout.
Layout
src/tools.ts tool catalog, input validation, pure command builders
src/index.ts stdio MCP server (Server + StdioServerTransport)
tests/ bun test unit testsThis server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for C2PA intake verifier MCP, structured receipts, audit logs, and reviewer-ready evidenc
PDF accessibility checks (veraPDF PDF/UA-1), auto-fix and Markdown conversion. EU-hosted.
Audit public webpages and supplied markup for HTML, CSS, SEO, JSON-LD, and link issues.
Remote MCP: JSON repair, JSON Schema validation, JSON to TypeScript, CSV to JSON and JSON to CSV.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables local static analysis of deployed AI model artifacts over MCP, exposing audit, diff, capabilities, and rule-explanation tools without uploading model bytes.199 npm2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools for local code validation with execution evidence, enabling users to run planned checks on projects and receive JSON results that distinguish passing, failing, and incomplete outcomes.230 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables creating, reading, editing, and verifying PDF, Word, Excel, and PowerPoint documents through MCP tools that return structured results. It preserves source files by default for edits and supports local stdio operation without network requests.MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP clients to run deterministic, read-only local repository audits for risky GitHub workflows, undocumented environment variables, possible credentials, and conflicting dependency configuration, returning structured findings without sending source code to a service.63 npmMIT