Skip to content

armgit / iris

Public Imported from GitHub
0

Screenshots of live websites. Minimal interface, powerful engine.

Document agent setup and benchmarks

Bridger Tower8c6a426b47f9
diff --git a/README.md b/README.md
index 66a1163..79c9672 100644
--- a/README.md
+++ b/README.md
@@ -72,6 +72,55 @@ The server exposes one tool, `capture`, which returns the image inline with stru
Bare localhost, `.localhost`, and loopback addresses use HTTP automatically. Other bare hosts use HTTPS. Run `iris mcp --help` to select a Chrome binary for the server.
+MCP clients may need a fresh agent task before the newly registered `capture` tool appears.
+
+<details>
+<summary>Give this setup prompt to your coding agent</summary>
+
+```text
+Set up Iris as your visual camera in this coding environment.
+
+Goal: install Iris, connect its local MCP server to this agent client, and prove
+both the CLI and MCP paths work. Do not modify the application repository.
+
+1. Check for an installed Chrome-family browser, `iris --version`, and an
+ existing Iris MCP configuration.
+2. If Iris is missing or outdated, install it with:
+
+ curl -fsSL https://raw.githubusercontent.com/brijr/iris/main/install.sh | sh
+
+ Or, when Rust is available:
+
+ cargo install iris-screenshot
+
+ Make sure the resulting `iris` command is on PATH.
+3. Register the stdio MCP server without duplicating an existing entry.
+
+ For Codex:
+
+ codex mcp add iris -- iris mcp
+ codex mcp get iris
+
+ For another MCP client, configure command `iris` with args `["mcp"]`.
+4. Prove the CLI works:
+
+ iris https://example.com --selector h1 --padding 8 --scale 1 --json \
+ -o /tmp/iris-smoke.png
+
+ Confirm `status: ok` and a readable, non-empty PNG.
+5. Reload the MCP configuration or start a fresh agent task if required. Call
+ Iris's `capture` tool once for `https://example.com`, selecting the first
+ `h1` with 8px padding and scale 1. Confirm an inline PNG and structured
+ dimensions are returned.
+6. Report the installed Iris version, MCP configuration, CLI smoke result, MCP
+ smoke result, and any remaining blocker.
+
+Do not claim MCP success from the CLI test alone. Do not add browser automation,
+interaction scripting, or review tooling; use Iris only as the camera.
+```
+
+</details>
+
## What it does for you
- Renders with your real installed Chrome, driven over the DevTools Protocol
@@ -90,6 +139,32 @@ Element capture is intentionally CSS-selector based: Iris captures the first mat
{"status":"ok","url":"https://example.com/","output":"/absolute/example.com.png","mode":"element","selector":"h1","padding":24,"css_width":180,"css_height":72,"scale":2.0,"format":"png","bytes":14231}
```
+## Benchmarking
+
+Capture time includes navigation and Iris's correctness waits, so compare the same URL, capture mode, viewport, scale, Chrome version, and hardware. Prefer a deterministic local page when comparing releases; public URLs add network and server variance.
+
+For a repeatable one-shot CLI benchmark from this repository, install [hyperfine](https://github.com/sharkdp/hyperfine) and run:
+
+```sh
+cargo build --release
+hyperfine --warmup 1 --runs 10 \
+ './target/release/iris file://$PWD/tests/fixtures/precise-capture.html \
+ --selector .capture-target --padding 24 --scale 1 \
+ -o /tmp/iris-benchmark.png'
+```
+
+The CLI starts a Chrome process for every invocation. MCP keeps one Chrome process alive for the server's lifetime, so benchmark it separately: initialize once, record the first `capture`, then report the median and p95 of at least ten identical subsequent calls. Measure from JSON-RPC request to complete tool response and exclude model time.
+
+Reference results (not a performance guarantee):
+
+| Iris | Machine | Chrome | Workload | Result |
+| --- | --- | --- | --- | --- |
+| 0.4.1 | Apple M2 Max, macOS 26.5.2 | 151.0.7922.138 | One-shot CLI, 10 runs after one warmup | 1.00 s median |
+| 0.4.1 | Apple M2 Max, macOS 26.5.2 | 151.0.7922.138 | MCP first capture | 965 ms |
+| 0.4.1 | Apple M2 Max, macOS 26.5.2 | 151.0.7922.138 | MCP next 10 captures | 366 ms median, 383 ms p95 |
+
+All reference runs used the local `precise-capture.html` fixture, `.capture-target`, 24px padding, PNG, and scale 1. Record `iris --version`, the Chrome version, and the exact command with any published result.
+
## Flags
```