Let AI agents see your UI — point at elements, annotate, and get instant visual context for AI-powered code editing.
Project description
Peek
Point at your UI. Your AI agent sees it.
Why
AI coding agents can edit code, but they can't see your page. You end up describing layouts in words, copy-pasting HTML, or dragging screenshots into chat. It works, but it's tedious.
Peek fixes this. Click a bookmarklet, point at something, and your AI agent instantly gets a screenshot plus the element data (selectors, styles, bounding boxes). You point, it sees.
Quick Start
pip install peek-mcp
playwright install chromium # headless browser for screenshots (~150MB, one-time)
Add Peek to your MCP client (one-time):
Claude Code
# Current project only
claude mcp add peek -- $(which peek) mcp
# Or, all projects (global)
claude mcp add -s user peek -- $(which peek) mcp
$(which peek)resolves to an absolute path, so the MCP server starts correctly even when a project uses a different Python environment.
Cursor / Windsurf / Claude Desktop
Add to your MCP config file (e.g. .cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json, or claude_desktop_config.json):
{
"mcpServers": {
"peek": {
"command": "/absolute/path/to/peek",
"args": ["mcp"]
}
}
}
Run which peek in your terminal to get the absolute path.
Then start Peek and grab the bookmarklet:
peek mcp
Open http://localhost:8899, drag the blue button to your bookmark bar.
Recommended: Add this to your project's CLAUDE.md (or .cursorrules, etc.) so the agent knows your dev server port and uses Peek correctly:
Dev server runs on http://localhost:3000
When using Peek's screenshot tool and you don't know the dev server URL, ask me which port the app is running on before taking a screenshot.
That's it.
Usage
Open any localhost page. Click the bookmarklet. Pick a mode:
| Mode | Shortcut | You do | Agent gets |
|---|---|---|---|
| Region | Alt+R |
Drag a rectangle | Screenshot + elements in that area |
| Element | Alt+S |
Click an element | Screenshot + selector, styles, HTML |
| Annotate | Alt+A |
Draw (pen, box, arrow) | Screenshot + your drawings + elements |
After selecting, tell your agent to look — something like "I captured the button, take a look" or "check what I just selected". The agent will call get_latest_capture() and see your screenshot + element data.
Your agent can also take screenshots on its own — just ask "screenshot localhost:3000" or "take a look at the page". No bookmarklet needed for this; the agent calls screenshot(url) directly.
How It Works
You select something with the bookmarklet
→ Peek grabs the element data, sends it to the local bridge server
→ Bridge server takes a Playwright screenshot of the page
→ Your AI agent calls get_latest_capture() and sees everything
→ "The chart legend overlaps the bars. Fixing the CSS..."
One process, two jobs: MCP server talks to your AI agent over stdio, bridge server receives bookmarklet data on port 8899. peek mcp runs both.
MCP Tools
| Tool | What it does |
|---|---|
get_latest_capture() |
Returns your latest selection — screenshot + element data |
screenshot(url) |
Takes a fresh screenshot (useful after code changes) |
CLI
peek mcp # start everything (recommended)
peek mcp --port 9000 # different bridge port
Tips
Agent screenshots the wrong port? Make sure you added the CLAUDE.md snippet from Quick Start. If you have multiple localhost servers, the agent will guess wrong without it.
Bookmarklet not working? Delete it from your bookmark bar and re-drag from http://localhost:8899.
Limitations
- Localhost only. Bookmarklet and screenshots work with
localhostand127.0.0.1. - No auth. Playwright uses a fresh browser — no cookies, no login state.
- Captures may contain sensitive data. Passwords and hidden inputs are redacted, but visible text and screenshots are saved as-is to
captures/(gitignored by default).
Requirements
- Python 3.10+
- Playwright Chromium (
playwright install chromium)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peek_mcp-0.2.1.tar.gz.
File metadata
- Download URL: peek_mcp-0.2.1.tar.gz
- Upload date:
- Size: 32.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5209c598cde399d8f61d59a7317ac64c1b3c3e3fd00011ae240474f203d0d6fa
|
|
| MD5 |
809df09cbd958cd7b3aea7a20079d21b
|
|
| BLAKE2b-256 |
721a7082640161dbc4004abff156843acc9173cbd84ace550fdbe4ee4dd956b2
|
File details
Details for the file peek_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: peek_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8903c55d71d7f0fa827d9a46a09bd9755533c6c6452cb17df3c97287df8335ac
|
|
| MD5 |
f3efe3a1ba28f3af791a4210fca23553
|
|
| BLAKE2b-256 |
9b4fdd84c3744a36d142ffc68a3b76fe290ab7dfbd6f1b69a4b1672e5db81a38
|