Lens
Observability and instrumentation layer for the Model Context Protocol π€π
Ask AI about Lens
Powered by Claude Β· Grounded in docs
I know everything about Lens. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Lens
Point. Describe. Ship.
Chrome extension for visual feedback, video direction, and QA assertions on any web page. Click any element, describe what needs to change, and get structured annotation data that routes directly to your AI coding agent via MCP β or copy it to your clipboard.
Quick Start
npm install
npm run build
Then load dist/ into Chrome:
- Go to
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked β select the
dist/folder
MCP Setup
Lens ships with an MCP server that lets any AI coding agent in VS Code read your annotations, reply, and resolve them β all through the standard Model Context Protocol.
VS Code (Copilot, Copilot Chat, any MCP-capable extension)
Zero config. Open this project in VS Code. The .vscode/mcp.json file auto-registers the server. Your AI sees the lens_* tools immediately.
Claude Code
Already configured via .claude/settings.json when you open this project. If you want it globally:
{
"mcpServers": {
"lens": {
"command": "npx",
"args": ["tsx", "src/mcp-bridge/server.ts"],
"cwd": "/path/to/lens"
}
}
}
Add to ~/.claude/settings.json.
Cline / Continue / Roo Code
Add to your extension's MCP config (check each extension's docs for the settings file location):
{
"mcpServers": {
"lens": {
"command": "npx",
"args": ["tsx", "src/mcp-bridge/server.ts"],
"cwd": "/path/to/lens"
}
}
}
Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"lens": {
"command": "npx",
"args": ["tsx", "src/mcp-bridge/server.ts"],
"cwd": "/path/to/lens"
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"lens": {
"command": "npx",
"args": ["tsx", "src/mcp-bridge/server.ts"],
"cwd": "/path/to/lens"
}
}
}
MCP Tools
Once connected, your AI agent has these tools:
| Tool | Description |
|---|---|
lens_get_pending | Get all pending annotations (optionally filter by project_slug) |
lens_get_session | Get a session by ID or URL |
lens_acknowledge | Mark annotation as seen |
lens_resolve | Mark annotation as fixed (with optional message) |
lens_dismiss | Dismiss annotation |
lens_reply | Reply to an annotation thread |
When the AI resolves or replies, the Chrome extension updates in real time via SSE.
Three Modes
Feedback
Click any element to report visual bugs. Lens captures the DOM selector, bounding box, computed styles, and React/Vue/Angular component tree automatically. You describe what's wrong; Lens packages the context.
Video Director
Build cinematic sequences by selecting elements and assigning camera actions (zoom, pan, highlight, crossfade). Each annotation becomes a sequence step with timing, easing, and optional narration. Export as a Remotion composition manifest.
QA Assertion
Click elements and define what should be true about them (exists, visible, text equals, style matches, layout within bounds). Export as a Playwright test file with real selectors.
Usage
Popup Controls
- Activate Lens β Injects the overlay onto the current page
- Open Panel β Opens the side panel for annotation management and export
- Mode Buttons β Switch between Feedback, Video Director, and QA Assertion
Shortcuts (active when Lens is on)
| Key | Action |
|---|---|
ββ§L | Toggle Lens on/off |
F | Feedback mode |
V | Video Director mode |
Q | QA Assertion mode |
C | Copy all annotations to clipboard |
H | Hide/show markers |
Esc | Deactivate Lens |
1-9 | Jump to annotation by number |
Side Panel
- View all annotations in the current session
- Set project context (slug, name, repo) for MCP routing
- Export as Markdown, JSON, Playwright tests, or Remotion manifest
- Copy all feedback to clipboard
- Manage annotation status
Clipboard Export
Press C while Lens is active, or use the side panel's Copy button:
# π Lens Feedback β My App
**Page:** https://example.com/editor
**Date:** Mar 19, 2026
**Items:** 3
## π΄ Blocking (1)
- **[Fix]** Button overlaps the sidebar on mobile
`<button>` β `div.editor-toolbar > button:nth-child(3)`
Component: EditorToolbar β ActionButton
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Chrome Extension (Manifest V3) β
β β
β ββββββββββββββββ ββββββββββββββββ βββββββββββββ β
β β Content Scriptβ β Side Panel β β Popup β β
β β β’ Selection β β β’ Ann. list β β β’ Toggle β β
β β β’ Highlight β β β’ Export β β β’ Mode β β
β β β’ Annotation β β β’ Project β β β’ Panel β β
β β popup β β context β β opener β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ βββββββ¬ββββββ β
β βββββββββββ¬ββββββββ΄βββββββββββββββββ β
β ββββββββββ΄βββββββββ β
β β Service Worker β β
β β β’ IndexedDB β β
β β β’ Session mgmt β β
β β β’ MCP relay β β
β ββββββββββ¬βββββββββ β
βββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β
ββββββββββ΄βββββββββ
β MCP Server β
β (stdio + :4848) β
β β’ MCP tools β
β β’ SSE stream β
ββββββββββ¬βββββββββ
β
ββββββββββ΄βββββββββ
β AI Agent β
β (any MCP client)β
βββββββββββββββββββ
Source Layout
src/
βββ background/
β βββ service-worker.ts # Session persistence, messaging, tab capture
β βββ mcp-server.ts # In-extension MCP tool handler
βββ content/
β βββ content.ts # Main content script entry
β βββ selector-engine.ts # DOM targeting, CSS/XPath generation
β βββ annotation-popup.ts # On-page annotation form
β βββ styles.ts # Injected CSS
βββ sidepanel/
β βββ index.html
β βββ sidepanel.ts # Annotation list, export, project context
β βββ sidepanel.css
βββ popup/
β βββ index.html
β βββ popup.ts # Mode toggle, side panel opener
β βββ popup.css
βββ shared/
β βββ raf-schema.ts # Annotation format types
β βββ constants.ts # Design tokens, message types
β βββ serializers.ts # Markdown, JSON, Remotion, Playwright exporters
β βββ storage.ts # IndexedDB wrapper
βββ mcp-bridge/
β βββ server.ts # MCP stdio server + HTTP listener
βββ icons/
βββ generate-icons.ts # SVG β PNG icon generator
Development
npm run dev # Watch mode
npm run typecheck # Type check
npm run build # Production build
After building, reload the extension in chrome://extensions.
License
MIT
Made with β€ by RenderDraw
