@extension.dev/mcp 4.2.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +22 -0
- package/.claude-plugin/plugin.json +33 -0
- package/CHANGELOG.md +61 -0
- package/LICENSE +1 -1
- package/README.md +20 -7
- package/bin/extension-mcp.js +7 -1
- package/claude/CLAUDE.md +29 -39
- package/claude/commands/extension-debug.md +2 -3
- package/claude/rules/mcp-tools.md +68 -18
- package/dist/module.js +422 -41
- package/dist/src/__tests__/fixtures/ready-contract.d.ts +7 -0
- package/dist/src/index.d.ts +0 -7
- package/dist/src/lib/act.d.ts +0 -22
- package/dist/src/lib/browser-family.d.ts +5 -0
- package/dist/src/lib/exec.d.ts +0 -11
- package/dist/src/lib/launch-flags.d.ts +43 -0
- package/dist/src/lib/session-browser.d.ts +0 -1
- package/dist/src/lib/validate-input.d.ts +0 -5
- package/dist/src/tools/build.d.ts +24 -0
- package/dist/src/tools/dev.d.ts +45 -7
- package/dist/src/tools/doctor.d.ts +22 -0
- package/dist/src/tools/preview.d.ts +44 -1
- package/dist/src/tools/start.d.ts +44 -1
- package/dist/src/tools/uninstall-browser.d.ts +24 -0
- package/package.json +30 -16
- package/server.json +23 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "extensiondev-mcp",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Cezar Augusto",
|
|
5
|
+
"email": "boss@cezaraugusto.net",
|
|
6
|
+
"url": "https://extension.dev"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "extension-mcp",
|
|
11
|
+
"source": "./",
|
|
12
|
+
"description": "MCP tools for browser extension development: scaffold from 60+ templates, run the dev server with HMR, inspect the live DOM and logs, and publish store-ready builds for Chrome, Edge, and Firefox.",
|
|
13
|
+
"version": "4.4.0",
|
|
14
|
+
"category": "development",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Cezar Augusto"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/extensiondev/mcp",
|
|
19
|
+
"strict": false
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "extension-mcp",
|
|
3
|
+
"description": "MCP tools for browser extension development: scaffold from 60+ templates, run the dev server with HMR, inspect the live DOM and logs, and publish store-ready builds for Chrome, Edge, and Firefox. Ships /extension, /extension-add, /extension-debug, and /extension-publish commands.",
|
|
4
|
+
"version": "4.4.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Cezar Augusto",
|
|
7
|
+
"email": "boss@cezaraugusto.net",
|
|
8
|
+
"url": "https://cezaraugusto.com"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/extensiondev/mcp",
|
|
11
|
+
"repository": "https://github.com/extensiondev/mcp",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"mcp",
|
|
15
|
+
"browser-extension",
|
|
16
|
+
"chrome-extension",
|
|
17
|
+
"firefox-addon",
|
|
18
|
+
"edge-extension",
|
|
19
|
+
"manifest-v3",
|
|
20
|
+
"webextension",
|
|
21
|
+
"cross-browser"
|
|
22
|
+
],
|
|
23
|
+
"commands": "./claude/commands",
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"extension-dev": {
|
|
26
|
+
"command": "npx",
|
|
27
|
+
"args": [
|
|
28
|
+
"-y",
|
|
29
|
+
"@extension.dev/mcp"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.4.0
|
|
4
|
+
|
|
5
|
+
Browser-matrix parity release: the tool surface now mirrors the engine
|
|
6
|
+
CLI flag for flag, and a 30th tool cleans up the managed browser cache.
|
|
7
|
+
|
|
8
|
+
- New tool `extension_uninstall_browser`. Removes a managed browser
|
|
9
|
+
binary from the Extension.js cache (or every one with `all: true`).
|
|
10
|
+
Only touches the managed cache, never system-installed browsers.
|
|
11
|
+
- Full Extension.js browser matrix in `extension_detect_browsers`: all
|
|
12
|
+
eleven supported browsers (chrome, chromium, edge, brave, opera,
|
|
13
|
+
vivaldi, yandex, firefox, waterfox, librewolf, safari) are probed,
|
|
14
|
+
each reported with its engine family and whether the managed
|
|
15
|
+
installer can provision it.
|
|
16
|
+
- Shared browser-launch flags on `extension_dev`, `extension_start`,
|
|
17
|
+
and `extension_preview`: `profile` (path, or `"false"` to reuse the
|
|
18
|
+
default user profile), `startingUrl`, `chromiumBinary` /
|
|
19
|
+
`geckoBinary` custom binaries, `host` / `publicHost` for Docker and
|
|
20
|
+
devcontainer splits, and companion `extensions` loaded alongside the
|
|
21
|
+
project.
|
|
22
|
+
- `extension_build` closes its gaps against the engine CLI:
|
|
23
|
+
`zipFilename`, `polyfill`, `silent`, and `mode`
|
|
24
|
+
(development/production/none, also sets NODE_ENV).
|
|
25
|
+
- Engine dependencies bumped to ^4.0.11.
|
|
26
|
+
- The shipped debugging docs are rewritten around the live inspect
|
|
27
|
+
surface.
|
|
28
|
+
- Release plumbing: npm publishes now carry provenance from a
|
|
29
|
+
changelog-backed GitHub workflow, the npm README renders the logo at
|
|
30
|
+
the right width via pack hooks, and the Safari web extension keyword
|
|
31
|
+
aids npm discovery.
|
|
32
|
+
|
|
33
|
+
## 4.3.0
|
|
34
|
+
|
|
35
|
+
Diagnosis + version-skew release: a 29th tool that turns "an act tool
|
|
36
|
+
errored, now what" into one call, and a CI that tests the engine
|
|
37
|
+
versions users actually run.
|
|
38
|
+
|
|
39
|
+
- New tool `extension_doctor`. Wraps `extension doctor --output json`:
|
|
40
|
+
walks the dev session's control-channel legs (ready contract,
|
|
41
|
+
dev-server process, control-port agreement, control channel, eval
|
|
42
|
+
token, executor, browser liveness) and returns one
|
|
43
|
+
`{check, status, detail, remediation?}` entry per leg in dependency
|
|
44
|
+
order. Detail and remediation prose are rewritten to MCP-speak like
|
|
45
|
+
every other act-verb error. Engines that predate the `doctor` verb get
|
|
46
|
+
a clean CliError with a hint instead of a crash.
|
|
47
|
+
- Browser-family classification now has ONE copy
|
|
48
|
+
(`src/lib/browser-family.ts`). Fixes real drift: `browsers:
|
|
49
|
+
["chromium"]` ran ZERO family checks in `extension_manifest_validate`
|
|
50
|
+
(an MV2 manifest validated "fine"), and `chromium` was still missing
|
|
51
|
+
from the `extension_build` / `extension_dev` / `extension_preview` /
|
|
52
|
+
`extension_start` schema enums.
|
|
53
|
+
- CI version-skew matrix: every push builds and tests against the
|
|
54
|
+
engine canary, the latest stable, and the vendored floor (deduped),
|
|
55
|
+
plus a nightly run that exercises the real `npx extension@<pin>` path
|
|
56
|
+
end-to-end (`RUN_CLI_SMOKE=1`). A red canary cell now surfaces engine
|
|
57
|
+
regressions the day they publish instead of on the next unrelated PR.
|
|
58
|
+
- Legacy ready-contract compatibility suite: fixtures pin the contract
|
|
59
|
+
shapes older engines wrote (no `cdpPort`, no `pid`), so a 4.0.6-era
|
|
60
|
+
session stays visible to browser defaulting and `resolveCdpPort`
|
|
61
|
+
refuses to adopt an unrelated developer Chrome instead of probing a
|
|
62
|
+
bogus port.
|
|
63
|
+
|
|
3
64
|
## 4.2.2
|
|
4
65
|
|
|
5
66
|
Agent-ergonomics release from the 4.2.1 fresh-eyes walk: the two changes
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) Cezar Augusto and the extension.dev collaborators
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
[npm-version-image]: https://img.shields.io/npm/v/%40extension.dev%2Fmcp.svg?color=
|
|
1
|
+
[npm-version-image]: https://img.shields.io/npm/v/%40extension.dev%2Fmcp.svg?color=26FFB8
|
|
2
2
|
[npm-version-url]: https://www.npmjs.com/package/@extension.dev/mcp
|
|
3
|
-
[npm-downloads-image]: https://img.shields.io/npm/dm/%40extension.dev%2Fmcp.svg?color=
|
|
3
|
+
[npm-downloads-image]: https://img.shields.io/npm/dm/%40extension.dev%2Fmcp.svg?color=26FFB8
|
|
4
4
|
[npm-downloads-url]: https://www.npmjs.com/package/@extension.dev/mcp
|
|
5
|
-
[discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=
|
|
5
|
+
[discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=26FFB8
|
|
6
6
|
[discord-url]: https://discord.gg/v9h2RgeTSN
|
|
7
7
|
|
|
8
8
|
# @extension.dev/mcp [![Version][npm-version-image]][npm-version-url] [![Downloads][npm-downloads-image]][npm-downloads-url] [![Discord][discord-image]][discord-url]
|
|
9
9
|
|
|
10
|
-
> Give your AI agent hands for browser extension development.
|
|
10
|
+
> Give your AI agent hands for browser extension development. 30 MCP tools that scaffold, run, inspect, debug, and publish cross-browser extensions.
|
|
11
11
|
|
|
12
|
-
<img alt="Logo" align="right" src="https://
|
|
12
|
+
<img alt="Logo" align="right" src="https://media.extension.land/brand/extension-dev/logo-dock.png" width="20.7%" />
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
claude mcp add extension-dev npx @extension.dev/mcp
|
|
@@ -26,7 +26,7 @@ Extensions fail silently: content scripts that never inject, panels that never o
|
|
|
26
26
|
These tools give agents eyes on the live browser, so they debug from evidence instead of guessing:
|
|
27
27
|
|
|
28
28
|
- **Scaffold** from the 60+ template catalog behind [templates.extension.dev](https://templates.extension.dev), or add a popup, sidebar, or content script to an existing project
|
|
29
|
-
- **Run** the dev server with HMR in Chrome, Edge, Firefox, or any
|
|
29
|
+
- **Run** the dev server with HMR in Chrome, Edge, Firefox, Safari, Brave, Opera, Vivaldi, Yandex, Waterfox, LibreWolf, or any Chromium- or Gecko-based binary, no build config
|
|
30
30
|
- **See** the live DOM, unified logs from every extension context, `chrome.storage` contents, and the loaded-extension list
|
|
31
31
|
- **Act**: evaluate code in any context, trigger the action button and commands, reload the extension, replay events
|
|
32
32
|
- **Ship**: validate the manifest cross-browser, build for production, publish a shareable preview, and promote builds to release channels headlessly
|
|
@@ -41,6 +41,17 @@ Built on [Extension.js](https://extension.js.org), the open-source cross-browser
|
|
|
41
41
|
claude mcp add extension-dev npx @extension.dev/mcp
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
Or install it as a plugin — the MCP server plus the `/extension`, `/extension-add`, `/extension-debug`, and `/extension-publish` commands in one step:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
/plugin marketplace add extensiondev/mcp
|
|
48
|
+
/plugin install extension-mcp@extensiondev-mcp
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Cursor
|
|
52
|
+
|
|
53
|
+
[](https://cursor.com/en/install-mcp?name=extension-dev&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZXh0ZW5zaW9uLmRldi9tY3AiXX0%3D)
|
|
54
|
+
|
|
44
55
|
### Claude Desktop / `.mcp.json`
|
|
45
56
|
|
|
46
57
|
```json
|
|
@@ -96,11 +107,13 @@ cp node_modules/@extension.dev/mcp/claude/commands/*.md ~/my-extension/.claude/c
|
|
|
96
107
|
| see | `extension_dom_inspect` | CDP-free DOM snapshot |
|
|
97
108
|
| see | `extension_list_extensions` | List loaded extensions (Chromium) |
|
|
98
109
|
| see | `extension_logs` | Stream logs from every context |
|
|
110
|
+
| see | `extension_doctor` | Diagnose the dev session leg by leg (ready contract, ports, token, executor, browser) |
|
|
99
111
|
| act | `extension_eval` | Evaluate in a context (needs `allowEval: true` on `extension_dev`) |
|
|
100
112
|
| act | `extension_storage` | Read/write `chrome.storage` |
|
|
101
113
|
| act | `extension_reload` | Reload extension or tab |
|
|
102
114
|
| act | `extension_open` | Open a surface / trigger `action`, `command` |
|
|
103
115
|
| browsers | `extension_install_browser` | Install a managed browser binary |
|
|
116
|
+
| browsers | `extension_uninstall_browser` | Remove a managed browser binary |
|
|
104
117
|
| browsers | `extension_list_browsers` | List managed browsers |
|
|
105
118
|
| browsers | `extension_detect_browsers` | Detect system browsers |
|
|
106
119
|
| platform | `extension_login` | GitHub device-code login, stored token |
|
|
@@ -133,4 +146,4 @@ All of it rides on [Extension.js](https://github.com/extension-js/extension.js),
|
|
|
133
146
|
|
|
134
147
|
## License
|
|
135
148
|
|
|
136
|
-
MIT (c) Cezar Augusto and the
|
|
149
|
+
MIT (c) Cezar Augusto and the extension.dev collaborators
|
package/bin/extension-mcp.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// ███╗ ███╗ ██████╗██████╗
|
|
3
|
+
// ████╗ ████║██╔════╝██╔══██╗
|
|
4
|
+
// ██╔████╔██║██║ ██████╔╝
|
|
5
|
+
// ██║╚██╔╝██║██║ ██╔═══╝
|
|
6
|
+
// ██║ ╚═╝ ██║╚██████╗██║
|
|
7
|
+
// ╚═╝ ╚═╝ ╚═════╝╚═╝
|
|
8
|
+
// MIT License (c) Cezar Augusto and the extension.dev collaborators
|
|
2
9
|
import {startServer, runCli} from '../dist/module.js'
|
|
3
10
|
|
|
4
11
|
const [, , cmd, ...rest] = process.argv
|
|
@@ -11,6 +18,5 @@ if (cmd && ['login', 'logout', 'whoami', 'release'].includes(cmd)) {
|
|
|
11
18
|
process.exit(1)
|
|
12
19
|
})
|
|
13
20
|
} else {
|
|
14
|
-
// No subcommand: run as the MCP stdio server (the default and primary mode).
|
|
15
21
|
startServer()
|
|
16
22
|
}
|
package/claude/CLAUDE.md
CHANGED
|
@@ -170,52 +170,42 @@ https://github.com/extension-js/examples/tree/main/examples/<slug>/src
|
|
|
170
170
|
|
|
171
171
|
## When debugging
|
|
172
172
|
|
|
173
|
-
###
|
|
173
|
+
### Live DOM inspection (`extension inspect` / MCP inspect tools)
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
Two ways to see inside a running extension. Both need an active dev session.
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
# Basic: see injected HTML after content scripts run
|
|
179
|
-
npm run dev -- --source https://example.com
|
|
177
|
+
**Agent bridge (CDP-free, localhost): `extension inspect`.** Requires the session to be started with `--allow-control` (or `allowControl: true` on the `extension_dev` MCP tool). Sees open shadow roots but not closed ones.
|
|
180
178
|
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
```bash
|
|
180
|
+
# Structured summary of the content-script DOM in a tab
|
|
181
|
+
extension inspect --tab 1
|
|
183
182
|
|
|
184
|
-
#
|
|
185
|
-
|
|
183
|
+
# Inspect an open extension surface instead of a tab
|
|
184
|
+
extension inspect --context popup
|
|
186
185
|
|
|
187
|
-
#
|
|
188
|
-
|
|
186
|
+
# Include byte-capped HTML plus the last 20 console lines
|
|
187
|
+
extension inspect --tab 1 --include summary,html --with-console 20
|
|
189
188
|
```
|
|
190
189
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
| `--
|
|
196
|
-
| `--
|
|
197
|
-
| `--
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
- `page_html` — full injected HTML
|
|
212
|
-
- `page_html_summary` — root/script/style/link counts
|
|
213
|
-
- `page_meta` — readyState, viewport, frame count
|
|
214
|
-
- `dom_snapshot` — structured tree (tag, id, classes, role, max 500 nodes)
|
|
215
|
-
- `dom_diff` — added/removed/changed between rebuilds
|
|
216
|
-
- `console_summary` — error/warn counts + top 5 unique messages
|
|
217
|
-
- `selector_probe` — per-selector element counts and samples
|
|
218
|
-
- `extension_root_tree` — extension root elements with reinject generations
|
|
190
|
+
| Flag | Default | Purpose |
|
|
191
|
+
| -------------------- | ------- | ---------------------------------------------------------------------------------------------- |
|
|
192
|
+
| `--context <name>` | content | `content`/`page` (needs `--tab`) or an open surface: `popup`, `options`, `sidebar`, `devtools` |
|
|
193
|
+
| `--tab <id>` | - | Tab id to inspect (required for content/page) |
|
|
194
|
+
| `--include <list>` | summary | Comma-separated: `summary`, `html` (html is byte-capped) |
|
|
195
|
+
| `--max-bytes <n>` | 262144 | Cap on returned HTML bytes |
|
|
196
|
+
| `--with-console [n]` | 20 | Also include the last n console lines for the target |
|
|
197
|
+
|
|
198
|
+
The `extension_dom_inspect` MCP tool wraps this verb one-to-one.
|
|
199
|
+
|
|
200
|
+
**Debugging protocol (Chromium CDP): `extension_source_inspect` MCP tool.** Connects directly to the running session's debug port. Use it when the bridge is not enough: closed shadow roots (`deepDom`), selector probes, DOM snapshots, console summaries, or navigating the tab to a URL before inspecting. Returns structured events:
|
|
201
|
+
|
|
202
|
+
- `page_html` - full injected HTML (after content scripts run)
|
|
203
|
+
- `page_html_summary` - root/script/style/link counts
|
|
204
|
+
- `page_meta` - readyState, viewport, frame count
|
|
205
|
+
- `dom_snapshot` - structured tree (tag, id, classes, role, max 500 nodes)
|
|
206
|
+
- `console_summary` - error/warn counts + top 5 unique messages
|
|
207
|
+
- `selector_probe` - per-selector element counts and samples
|
|
208
|
+
- `extension_root_tree` - extension root elements with reinject generations
|
|
219
209
|
|
|
220
210
|
### Unified logging (`--logs`)
|
|
221
211
|
|
|
@@ -20,9 +20,8 @@ Debug the currently running extension dev session. The user said: $ARGUMENTS
|
|
|
20
20
|
- Report the results in a structured way
|
|
21
21
|
|
|
22
22
|
If MCP is not available:
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- Report the port and suggest Chrome DevTools inspection
|
|
23
|
+
- If the session was started with `--allow-control`, suggest the CLI equivalent: `npx extension inspect --tab <id> --include summary,html --with-console 20`
|
|
24
|
+
- Otherwise read `dist/extension-js/chrome/ready.json` to get the CDP port and suggest Chrome DevTools inspection
|
|
26
25
|
|
|
27
26
|
3. **Exercise event handlers (when the bug is in an action / command / shortcut)**
|
|
28
27
|
If the session was started with `--allow-control`, fire the events a user would, without clicking:
|
|
@@ -164,7 +164,7 @@ These map directly to existing programmatic APIs and provide immediate value.
|
|
|
164
164
|
},
|
|
165
165
|
"browser": {
|
|
166
166
|
"type": "string",
|
|
167
|
-
"enum": ["chrome", "edge", "firefox", "chromium-based", "gecko-based"],
|
|
167
|
+
"enum": ["chrome", "chromium", "edge", "brave", "opera", "vivaldi", "yandex", "firefox", "waterfox", "librewolf", "safari", "chromium-based", "gecko-based", "firefox-based", "webkit-based"],
|
|
168
168
|
"default": "chrome",
|
|
169
169
|
"description": "Target browser"
|
|
170
170
|
},
|
|
@@ -186,6 +186,8 @@ These map directly to existing programmatic APIs and provide immediate value.
|
|
|
186
186
|
|
|
187
187
|
**Returns:** `{ outputPath, duration, zipPath?, warnings[] }`
|
|
188
188
|
|
|
189
|
+
`extension_build` also accepts `zipFilename` (string), `polyfill` (boolean, default false), `silent` (boolean), and `mode` (`development` | `production` | `none`, default `production`).
|
|
190
|
+
|
|
189
191
|
---
|
|
190
192
|
|
|
191
193
|
#### `extension_dev`
|
|
@@ -207,7 +209,7 @@ These map directly to existing programmatic APIs and provide immediate value.
|
|
|
207
209
|
},
|
|
208
210
|
"browser": {
|
|
209
211
|
"type": "string",
|
|
210
|
-
"enum": ["chrome", "edge", "firefox", "chromium-based", "gecko-based"],
|
|
212
|
+
"enum": ["chrome", "chromium", "edge", "brave", "opera", "vivaldi", "yandex", "firefox", "waterfox", "librewolf", "safari", "chromium-based", "gecko-based", "firefox-based", "webkit-based"],
|
|
211
213
|
"default": "chrome"
|
|
212
214
|
},
|
|
213
215
|
"port": {
|
|
@@ -218,7 +220,21 @@ These map directly to existing programmatic APIs and provide immediate value.
|
|
|
218
220
|
"type": "boolean",
|
|
219
221
|
"default": false,
|
|
220
222
|
"description": "Start dev server without launching browser"
|
|
221
|
-
}
|
|
223
|
+
},
|
|
224
|
+
"polyfill": {
|
|
225
|
+
"type": "boolean",
|
|
226
|
+
"default": true,
|
|
227
|
+
"description": "Apply cross-browser polyfill"
|
|
228
|
+
},
|
|
229
|
+
"profile": { "type": "string", "description": "Browser profile path, or \"false\" for the default user profile" },
|
|
230
|
+
"startingUrl": { "type": "string", "description": "URL the browser opens on launch" },
|
|
231
|
+
"chromiumBinary": { "type": "string", "description": "Custom Chromium-based binary path" },
|
|
232
|
+
"geckoBinary": { "type": "string", "description": "Custom Gecko/Firefox binary path" },
|
|
233
|
+
"host": { "type": "string", "description": "Bind host (0.0.0.0 for Docker); default 127.0.0.1" },
|
|
234
|
+
"publicHost": { "type": "string", "description": "Connectable host for HMR/reload when it differs from the bind host" },
|
|
235
|
+
"extensions": { "type": "array", "items": { "type": "string" }, "description": "Companion extension paths or store URLs" },
|
|
236
|
+
"allowControl": { "type": "boolean", "default": false, "description": "Enable the agent-bridge control channel" },
|
|
237
|
+
"allowEval": { "type": "boolean", "default": false, "description": "Additionally enable extension_eval" }
|
|
222
238
|
},
|
|
223
239
|
"required": ["projectPath"]
|
|
224
240
|
}
|
|
@@ -248,7 +264,7 @@ These map directly to existing programmatic APIs and provide immediate value.
|
|
|
248
264
|
},
|
|
249
265
|
"browser": {
|
|
250
266
|
"type": "string",
|
|
251
|
-
"enum": ["chrome", "edge", "firefox", "chromium-based", "gecko-based"],
|
|
267
|
+
"enum": ["chrome", "chromium", "edge", "brave", "opera", "vivaldi", "yandex", "firefox", "waterfox", "librewolf", "safari", "chromium-based", "gecko-based", "firefox-based", "webkit-based"],
|
|
252
268
|
"default": "chrome"
|
|
253
269
|
},
|
|
254
270
|
"polyfill": {
|
|
@@ -274,6 +290,8 @@ These map directly to existing programmatic APIs and provide immediate value.
|
|
|
274
290
|
|
|
275
291
|
**Returns:** When `wait: true`, returns the `ready.json` contract: `{ status, browser, port, pid, distPath, manifestPath, compiledAt }`. Otherwise returns `{ pid, browser }`.
|
|
276
292
|
|
|
293
|
+
Both `extension_start` and `extension_preview` also accept `port`, `noBrowser`, and the shared launch flags: `profile`, `startingUrl`, `chromiumBinary`, `geckoBinary`, `host`, `publicHost`, `extensions` (same shapes as on `extension_dev`).
|
|
294
|
+
|
|
277
295
|
**Why this is distinct from dev:** `dev` uses HMR and watches files. `start` builds once in production mode and launches — what you'd use to verify a production build works before publishing.
|
|
278
296
|
|
|
279
297
|
---
|
|
@@ -297,7 +315,7 @@ These map directly to existing programmatic APIs and provide immediate value.
|
|
|
297
315
|
},
|
|
298
316
|
"browser": {
|
|
299
317
|
"type": "string",
|
|
300
|
-
"enum": ["chrome", "edge", "firefox", "chromium-based", "gecko-based"],
|
|
318
|
+
"enum": ["chrome", "chromium", "edge", "brave", "opera", "vivaldi", "yandex", "firefox", "waterfox", "librewolf", "safari", "chromium-based", "gecko-based", "firefox-based", "webkit-based"],
|
|
301
319
|
"default": "chrome"
|
|
302
320
|
}
|
|
303
321
|
},
|
|
@@ -390,7 +408,7 @@ The `similarTemplates` field lists templates from the catalog with similar surfa
|
|
|
390
408
|
|
|
391
409
|
#### `extension_inspect`
|
|
392
410
|
|
|
393
|
-
**Source:** New tool
|
|
411
|
+
**Source:** New tool; static analysis of the built `dist/` output
|
|
394
412
|
|
|
395
413
|
**Purpose:** Analyze a built extension's structure, size, and entry points.
|
|
396
414
|
|
|
@@ -474,7 +492,7 @@ The `similarTemplates` field lists templates from the catalog with similar surfa
|
|
|
474
492
|
|
|
475
493
|
**Source:** `programs/extension/browsers/` → CDP/RDP source inspection system
|
|
476
494
|
|
|
477
|
-
**Purpose:** Live-inspect a running extension's DOM, console, and content script injection state. This
|
|
495
|
+
**Purpose:** Live-inspect a running extension's DOM, console, and content script injection state over the debugging protocol. It gives Claude _eyes_ into the running extension. (This grew out of the engine's old `dev --source` CLI flags, which are no longer registered; the MCP connects to the CDP port directly.)
|
|
478
496
|
|
|
479
497
|
```json
|
|
480
498
|
{
|
|
@@ -500,7 +518,7 @@ The `similarTemplates` field lists templates from the catalog with similar surfa
|
|
|
500
518
|
"type": "array",
|
|
501
519
|
"items": {
|
|
502
520
|
"type": "string",
|
|
503
|
-
"enum": ["html", "summary", "meta", "dom_snapshot", "console", "
|
|
521
|
+
"enum": ["html", "summary", "meta", "dom_snapshot", "console", "extension_roots"]
|
|
504
522
|
},
|
|
505
523
|
"default": ["summary", "meta", "console"],
|
|
506
524
|
"description": "What data to return"
|
|
@@ -537,17 +555,17 @@ The `similarTemplates` field lists templates from the catalog with similar surfa
|
|
|
537
555
|
}
|
|
538
556
|
```
|
|
539
557
|
|
|
540
|
-
**Returns:**
|
|
558
|
+
**Returns:** One JSON object; keys appear based on `include` selection:
|
|
541
559
|
|
|
542
|
-
|
|
|
543
|
-
|
|
|
544
|
-
| `
|
|
545
|
-
| `
|
|
546
|
-
| `
|
|
547
|
-
| `
|
|
548
|
-
| `
|
|
549
|
-
| `
|
|
550
|
-
| `
|
|
560
|
+
| Key | What it contains |
|
|
561
|
+
| ---------------- | ------------------------------------------------------------------------------------------ |
|
|
562
|
+
| `html` | Full injected HTML (after content scripts run), `htmlTruncated` flag when capped |
|
|
563
|
+
| `summary` | Compact stats: html length, script/style/link counts, extension root + body child counts |
|
|
564
|
+
| `meta` | readyState, viewport dimensions, frame count |
|
|
565
|
+
| `domSnapshot` | Structured tree: tag, id, classes, role, text length, child count (max 500 nodes, depth 6) |
|
|
566
|
+
| `console` | error/warn/info/log/debug counts + top 5 unique messages |
|
|
567
|
+
| `extensionRoots` | Extension root elements with reinject generations |
|
|
568
|
+
| `probes` | Per-selector: count + element samples (when `probe` selectors are passed) |
|
|
551
569
|
|
|
552
570
|
**Implementation:**
|
|
553
571
|
|
|
@@ -744,6 +762,38 @@ The `similarTemplates` field lists templates from the catalog with similar surfa
|
|
|
744
762
|
|
|
745
763
|
---
|
|
746
764
|
|
|
765
|
+
#### `extension_uninstall_browser`
|
|
766
|
+
|
|
767
|
+
**Source:** `extension-install` → `extensionUninstall()`
|
|
768
|
+
|
|
769
|
+
**Purpose:** Remove a managed browser binary from the Extension.js cache (never system-installed browsers).
|
|
770
|
+
|
|
771
|
+
```json
|
|
772
|
+
{
|
|
773
|
+
"name": "extension_uninstall_browser",
|
|
774
|
+
"inputSchema": {
|
|
775
|
+
"type": "object",
|
|
776
|
+
"properties": {
|
|
777
|
+
"browser": {
|
|
778
|
+
"type": "string",
|
|
779
|
+
"enum": ["chrome", "chromium", "edge", "firefox"],
|
|
780
|
+
"description": "Managed browser to remove"
|
|
781
|
+
},
|
|
782
|
+
"all": {
|
|
783
|
+
"type": "boolean",
|
|
784
|
+
"default": false,
|
|
785
|
+
"description": "Remove every managed browser binary"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"required": []
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
**Returns:** `{ status, target, duration }`
|
|
794
|
+
|
|
795
|
+
---
|
|
796
|
+
|
|
747
797
|
## Where each tool lives in the codebase
|
|
748
798
|
|
|
749
799
|
| MCP Tool | Program | Source API | Data source | Needs new code? |
|