SnapRef
Click on "Install 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., "@SnapRefOpen a headless browser, navigate to example.com, and take a full-page snapshot"
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.
SnapRef
SnapRef is a dependency-light, local-first browser automation core for agents: isolated sessions, interactive snapshots with revision-bound executable refs, typed actuation/assertion, scripts, policy-gated MCP, telemetry receipts, and cross-platform lifecycle gates.
go install github.com/nstranquist/snapref/cmd/snapref@v0.2.0-rc.1
snapref runtime install --runtime chrome-for-testing --channel stable
snapref runtime install --runtime headless-shell --channel stable
snapref self-test
snapref demo mcp-policy
snapref demo ref-integrityself-test checks delayed hydration, open shadow roots, and same-origin
iframes, then clicks all three. demo mcp-policy does not launch Chrome.
demo ref-integrity needs a managed runtime.
GitHub Actions go does not launch Chrome. The Ubuntu self-test job
installs Chrome for Testing and runs snapref self-test plus
snapref demo ref-integrity. demo mcp-policy is covered by go test.
In a source checkout, make init runs the same two runtime installs.
Status: 0.2.0-rc.1 at https://github.com/nstranquist/snapref. Windows
support is not advertised until a physical Windows+Chrome gate passes.
Packages
browser: sessions, CDP, snapshots/refs, actionability, evidence, skills;contract: typed operation/permission/result registry;script: YAML/JSON/Starlark repeatable workflow engine;mcp: policy-gated MCP stdio server;cmd/snapref: standalone CLI and live self-test.
The standalone skill and job-posting commands emit generic typed extraction
only. Host-specific product handoffs are outside this module.
Related MCP server: ChromePlayMCP
Proofs
These two receipts are the public wedge. They are not example.com YAML.
snapref demo mcp-policy
snapref demo ref-integritySee examples/mcp-policy/ and examples/ref-integrity/. Talk about SnapRef
as the kernel under the host adapter, not as a second browser-automation brand.
Golden path
snapref runtime install --runtime chrome-for-testing --channel stable
snapref runtime install --runtime headless-shell --channel stable
snapref runtime verify --all
snapref open demo
snapref exec demo navigate http://localhost:3000
snapref exec demo snapshot --wait-for-selector '[data-test="app-ready"]' --settle 1s
snapref exec demo click 'sr-…:e1'
snapref close demo --purge-profileHeadless is the default. auto uses only verified managed runtimes (or an
explicit SNAPREF_CHROME external override); it never searches or launches
the operator's personal browser installation. Headful and unpacked-extension
work routes to Chrome for Testing. Ordinary headless work uses Headless Shell
only after an exact-version local acceptance benchmark passes; otherwise it
uses managed Chrome for Testing. Runtime installation is explicit and is the
only browser command that downloads.
Named CLI sessions have a crash-safe 10-minute idle
lease; every browser operation renews it. Use --idle-timeout (or
SNAPREF_BROWSER_IDLE_TIMEOUT) for a longer bounded workflow and
--keep-alive only when persistence is intentional. Idle expiry retains the
named profile for cookie/state reuse; snapref gc previews stale dead
sessions and profiles, and snapref gc --apply reclaims them. Snapshot before
acting. Use the newest ref. MCP drive, host-read, host-write, and origin grants
are separate SNAPREF_MCP_* authorities.
Screenshots are full-page by default. YAML/JSON playbooks can declare
screenshot_mode: full-page for archival evidence or
screenshot_mode: viewport for exact fold/focus evidence; an individual step
can override the plan. Full-page capture measures the rendered document but
does not trigger application-specific lazy loading or scroll reveals. Each
script receipt records the effective mode and measured PNG width/height.
Verify
make verify
make verify-releasemake verify runs tests, the race detector, vet, native compilation, Windows
cross-compilation, and release-contract checks.
make verify-release also builds the release artifacts twice. It requires that
every artifact is byte-identical across both builds.
The artifact builder uses only the local module cache. It disables dependency downloads, workspace overrides, user Go settings, and automatic toolchain downloads.
The live snapref self-test verifies hydrated snapshot readiness. It also
verifies ref actuation across open shadow roots and same-origin frames.
That command is a machine receipt (--json). GitHub Actions runs it on
Ubuntu after snapref runtime install --runtime chrome-for-testing. Local
make verify does not launch Chrome.
snapref demo mcp-policy is the drive/origin grant receipt. snapref demo ref-integrity is the stale-ref receipt: snapshot, click sr-…, snapshot
again, old ref fails closed.
make release-dist reproducibly builds CGO-free macOS arm64, Linux amd64, and
Windows amd64 archives with legal/security files and a SHA256SUMS manifest.
It does not publish them.
The release command builds all files in a sibling staging directory. It changes
only the named archives and SHA256SUMS in an existing output directory.
Unrelated output files remain unchanged. The command rejects filesystem roots, the source tree, source-tree ancestors, symbolic-link outputs, and non-regular managed artifacts.
If restoration fails after a publication error, the command prints and keeps the recovery staging directory. Do not delete that directory until you restore or copy the retained artifacts.
Use an operator-controlled output directory. The release transaction does not protect against an untrusted process that changes the directory concurrently.
EXTRACTION.json pins a digest of every shared source path, canonical regular
file mode, and file byte. Windows checkout permissions are normalized to the
repository's required 0644 mode; other platforms fail on permission drift.
A digest mismatch means the checked-out tree drifted from the reviewed source
lock and must be resynchronized before a release.
The versioned public artifact contracts live in schemas/telemetry-v2.schema.json
and schemas/script-run-v2.schema.json. Each release archive includes both
schemas and docs/VERSIONING.md.
Architecture
SnapRef is a local engine, not a hosted browser fleet.
browserowns isolated Chromium sessions, CDP, snapshots, revision-bound refs, actionability, recordings, and managed runtimes.contractis the typed operation and permission registry.scriptruns YAML/JSON/Starlark plans against an open session.mcpis a policy-gated stdio server. Drive, host-read, host-write, and origin grants are separate authorities.cmd/snaprefis the standalone CLI. Host adapters live outside this module.processtreeis a vendored MIT copy used only for bounded subprocess cancellation in release and benchmark tools.
See docs/ARCHITECTURE.md.
Usage
snapref open demo
snapref exec demo navigate https://example.com
snapref exec demo snapshot --wait-for-selector body --settle 1s
snapref exec demo click 'sr-…:e1'
snapref close demo --purge-profile
snapref mcpsnapshot is the discovery default. Act on the newest revision-bound ref.
eval is an escape hatch, not the discovery path. MCP drive, host-read,
host-write, and origin grants are separate explicit authorities.
Configuration
Variable | Purpose |
| Session, profile, recording, and telemetry root (default |
| Skill directory (default |
| Explicit external Chromium path; never a personal-browser search |
| Named-session idle lease (default |
| Hot telemetry rotate threshold (default 64KiB; |
| Compatibility alias for |
| MCP actuation |
| MCP caller-selected playbook reads |
| MCP caller-selected screenshot/pack paths |
| MCP navigate/fetch allowlist |
| Chrome stderr |
Runtime install is the only command that downloads. Recording packs that
encode video or GIF require ffmpeg on PATH; still-shot packs do not.
Troubleshooting
no Chromium-class browser found: runsnapref runtime install --runtime chrome-for-testing --channel stable.Session missing after idle: named sessions expire after 10 minutes; the profile remains until
close --purge-profileorgc --apply.Stale executable ref: take a new
snapshotand use the newestsr-…ref.MCP actuation refused: set
SNAPREF_MCP_ALLOW_DRIVE=1(or--allow-drive) and an origin allowlist if you restrict hosts.already recordingafter a crash: the next in-process start reclaims abandoned in-process state. A detached start that failed before a PID was stamped must be removed: delete$SNAPREF_HOME/recordings/<name>(default~/.snapref/browser/recordings/<name>). If a detached PID is still alive, stop that process first.Video encode fails: install
ffmpeg; still packs do not need it. The CLI prints a bounded ffmpeg stderr on failure.
Apache-2.0. See SECURITY.md, docs/VERSIONING.md, NOTICE,
THIRD_PARTY_NOTICES.md, and the bundled third_party/licenses/ texts
before redistribution.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceObservation-first MCP server for Cockroach Browser, enabling AI agents to snapshot, audit, and propose browser actions through a secure, policy-controlled daemon.3777AGPL 3.0
- Flicense-qualityCmaintenanceA policy-aware Meta-MCP server that orchestrates Playwright and Chrome DevTools for secure, high-level browser automation with origin whitelists and credential redaction.
- AlicenseAqualityAmaintenanceMCP server that lets AI agents drive your real Chromium browser with your existing signed-in sessions, providing visible, local, and inspectable automation for tasks like navigation, clicking, typing, and form filling.251Apache 2.0
- Alicense-qualityBmaintenanceMCP server that lets agents drive your real Chrome browser with existing logins and sessions via an outbound-only WebSocket extension. It exposes Playwright-compatible browser tools for navigation, clicking, typing, and snapshots.Apache 2.0
Related MCP Connectors
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Hosted AgentLux MCP server for marketplace, identity, creator, services, and social flows.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nstranquist/snapref'
If you have feedback or need assistance with the MCP directory API, please join our Discord server