extension_preview_web
Preview an in-progress extension in the web emulator, with no real browser.
Quick start
Share this build with my designer
How the agent uses it
This builds the project (unless build:false) and previews dist/<browser>. Pass share:true unless you are working inside the extension.dev monorepo: it uploads the build and returns a link anyone can open, with no install, sign-in or dev server, and it is the only lane that works from an npm install of this server. Sharing also serves the build as a zip, so it hands over the built code; read the share property before using it. The default lane instead returns a deep link over the dev-only preview://build scheme, which resolves only against a preview.extension.dev dev server on this machine, so it is for people developing extension.dev itself. Call extension_shares to list and revoke every link shared this way, so one never vanishes with this response.
Reference
| Group | platform, on with --features=local,platform (private alpha) |
| Tier | Platform |
| Needs | the server started with --features=local,platform; sharing needs a login |
| Read only | no |
| Destructive | no |
| Idempotent | no |
| Reaches the open web | yes |
Inputs
| Input | Type | Required | Default | What it does |
|---|---|---|---|---|
projectPath | string | yes | Extension project root | |
project | string | no | Which stored login to use, as '<workspace>/<project>' (or a project slug that matches one login), when extension_auth has signed in to more than one project on this machine. Omitted, the most recent login is used, after EXTENSION_DEV_TOKEN when that is set. Named, it outranks EXTENSION_DEV_TOKEN. extension_auth (action: status) lists the stored logins. | |
browser | "chrome" | "chromium" | "edge" | "brave" | "opera" | "vivaldi" | "yandex" | "firefox" | "waterfox" | "librewolf" | "zen" | "floorp" | "safari" | no | "chrome" | Which dist/<browser> output to preview. The emulator renders it as mocked Chrome either way. |
build | boolean | no | true | Build first. false previews the existing dist/<browser> as-is. |
distPath | string | no | Preview this built directory instead of dist/<browser> under projectPath. Implies build:false. | |
hostUrl | string | no | Origin of the running preview.extension.dev dev server (default http://localhost:3110). | |
probe | boolean | no | true | Fetch the surface's dev middleware first to confirm the artifact loads on the local host. With share:true it also checks the shared link the way a browser would, following the zip's redirects and asserting the final response allows the preview origin, and reports that as share.browserLoadable. |
open | boolean | no | false | Also open the deep link in a running session's browser, in a focus-safe background tab. Needs a live extension_dev/extension_start session. |
openIn | "chrome" | "chromium" | "edge" | "brave" | "opera" | "vivaldi" | "yandex" | "firefox" | "waterfox" | "librewolf" | "zen" | "floorp" | "safari" | no | Which session's browser to open it in. Defaults to browser. | |
share | boolean | no | false | Upload the built dist and return a public link (share.previewUrl) that renders those exact bytes for anyone: no install, sign-in or dev server. Uploading is metered against your plan's allowance on extension.dev; left false, the result's share property says what the local deepLink needs, what share:true spends, and the exact call to get a shareable link. It also serves the build as a zip (share.zipUrl), so sharing hands over the code. Needs a token scoped to an extension.dev project (extension_auth or EXTENSION_DEV_TOKEN); without one you get a login hint and the local preview still succeeds. Live until share.expiresAt; DELETE share.revokeUrl to kill it sooner. Revocation is permanent, and re-sharing an unchanged build returns the same link unless it was revoked, so each share is also appended to the project's gitignored .extension.dev/shared-previews.json. |
When it fails
- The tool is missing from the client's list. Start the server with
--features=local,platform; see Platform tools. - The platform refuses the call. Log in first with
extension_auth. - The answer reads
status: "platform-held". extension.dev is not open to the public yet, so nothing ran on its machines. Creating, running and building an extension still work on your machine; see Use the platform from your agent. - The answer depends on the network. This tool reaches the open web, so a refusal can be the network, not the project.
Next
- MCP server: install, the two groups and the session gates
- Install in your client
extension_auth: Sign this machine in to extension.dev, report that login, or clear it.extension_builds: Read, rebuild and configure the platform's builds of the logged-in project on extension.dev.extension_project_create: Create an extension.dev project for an extension that does not have one yet, without opening the console.extension_publish: Publish the project your stored token is scoped to (extension_auth, or EXTENSION_DEV_TOKEN) to extension.dev, and return its shareable URL.extension_release_promote: Promote a built extension to a release channel (stable, preview, beta, …) on extension.dev, headless.extension_release_status: Read where a project stands on extension.dev, from the public registry (registry.extension.land).extension_shares: List, create and revoke the public preview links this token has shared, which is what extension_preview_web share:true hands out.extension_submit: Submit a built extension for store REVIEW through extension.dev, which holds your store credentials and dispatches from your project's mirror CI: the Chrome Web Store, Firefox A...extension_workspace: Read the extension.dev workspace a stored login belongs to: its plan and limits, its projects, and its usage.extension_workspace_create: Create an extension.dev workspace that does not exist yet, without opening the console.