@extension.dev/mcp 4.2.2 → 4.3.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 +30 -0
- package/CHANGELOG.md +31 -0
- package/README.md +13 -1
- package/bin/extension-mcp.js +0 -1
- package/dist/module.js +91 -25
- 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 +4 -0
- package/dist/src/lib/exec.d.ts +0 -11
- package/dist/src/lib/session-browser.d.ts +0 -1
- package/dist/src/lib/validate-input.d.ts +0 -5
- package/dist/src/tools/doctor.d.ts +22 -0
- package/package.json +12 -4
- 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.3.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,30 @@
|
|
|
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.3.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": ["-y", "@extension.dev/mcp"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.3.0
|
|
4
|
+
|
|
5
|
+
Diagnosis + version-skew release: a 29th tool that turns "an act tool
|
|
6
|
+
errored, now what" into one call, and a CI that tests the engine
|
|
7
|
+
versions users actually run.
|
|
8
|
+
|
|
9
|
+
- New tool `extension_doctor`. Wraps `extension doctor --output json`:
|
|
10
|
+
walks the dev session's control-channel legs (ready contract,
|
|
11
|
+
dev-server process, control-port agreement, control channel, eval
|
|
12
|
+
token, executor, browser liveness) and returns one
|
|
13
|
+
`{check, status, detail, remediation?}` entry per leg in dependency
|
|
14
|
+
order. Detail and remediation prose are rewritten to MCP-speak like
|
|
15
|
+
every other act-verb error. Engines that predate the `doctor` verb get
|
|
16
|
+
a clean CliError with a hint instead of a crash.
|
|
17
|
+
- Browser-family classification now has ONE copy
|
|
18
|
+
(`src/lib/browser-family.ts`). Fixes real drift: `browsers:
|
|
19
|
+
["chromium"]` ran ZERO family checks in `extension_manifest_validate`
|
|
20
|
+
(an MV2 manifest validated "fine"), and `chromium` was still missing
|
|
21
|
+
from the `extension_build` / `extension_dev` / `extension_preview` /
|
|
22
|
+
`extension_start` schema enums.
|
|
23
|
+
- CI version-skew matrix: every push builds and tests against the
|
|
24
|
+
engine canary, the latest stable, and the vendored floor (deduped),
|
|
25
|
+
plus a nightly run that exercises the real `npx extension@<pin>` path
|
|
26
|
+
end-to-end (`RUN_CLI_SMOKE=1`). A red canary cell now surfaces engine
|
|
27
|
+
regressions the day they publish instead of on the next unrelated PR.
|
|
28
|
+
- Legacy ready-contract compatibility suite: fixtures pin the contract
|
|
29
|
+
shapes older engines wrote (no `cdpPort`, no `pid`), so a 4.0.6-era
|
|
30
|
+
session stays visible to browser defaulting and `resolveCdpPort`
|
|
31
|
+
refuses to adopt an unrelated developer Chrome instead of probing a
|
|
32
|
+
bogus port.
|
|
33
|
+
|
|
3
34
|
## 4.2.2
|
|
4
35
|
|
|
5
36
|
Agent-ergonomics release from the 4.2.1 fresh-eyes walk: the two changes
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
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. 29 MCP tools that scaffold, run, inspect, debug, and publish cross-browser extensions.
|
|
11
11
|
|
|
12
12
|
<img alt="Logo" align="right" src="https://avatars.githubusercontent.com/u/106714027" width="20%" />
|
|
13
13
|
|
|
@@ -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,6 +107,7 @@ 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 |
|
package/bin/extension-mcp.js
CHANGED
package/dist/module.js
CHANGED
|
@@ -45,6 +45,12 @@ __webpack_require__.d(dev_namespaceObject, {
|
|
|
45
45
|
handler: ()=>dev_handler,
|
|
46
46
|
schema: ()=>dev_schema
|
|
47
47
|
});
|
|
48
|
+
var doctor_namespaceObject = {};
|
|
49
|
+
__webpack_require__.r(doctor_namespaceObject);
|
|
50
|
+
__webpack_require__.d(doctor_namespaceObject, {
|
|
51
|
+
handler: ()=>doctor_handler,
|
|
52
|
+
schema: ()=>doctor_schema
|
|
53
|
+
});
|
|
48
54
|
var dom_inspect_namespaceObject = {};
|
|
49
55
|
__webpack_require__.r(dom_inspect_namespaceObject);
|
|
50
56
|
__webpack_require__.d(dom_inspect_namespaceObject, {
|
|
@@ -183,7 +189,7 @@ __webpack_require__.d(whoami_namespaceObject, {
|
|
|
183
189
|
handler: ()=>whoami_handler,
|
|
184
190
|
schema: ()=>whoami_schema
|
|
185
191
|
});
|
|
186
|
-
var package_namespaceObject = JSON.parse('{"rE":"4.
|
|
192
|
+
var package_namespaceObject = JSON.parse('{"rE":"4.3.0","El":{"OP":"^4.0.8"}}');
|
|
187
193
|
const create_schema = {
|
|
188
194
|
name: "extension_create",
|
|
189
195
|
description: "Create a new browser extension project from a template in the extension.dev template catalog. Use extension_list_templates to see available options.",
|
|
@@ -371,6 +377,7 @@ const build_schema = {
|
|
|
371
377
|
type: "string",
|
|
372
378
|
enum: [
|
|
373
379
|
"chrome",
|
|
380
|
+
"chromium",
|
|
374
381
|
"edge",
|
|
375
382
|
"firefox",
|
|
376
383
|
"chromium-based",
|
|
@@ -528,6 +535,7 @@ const dev_schema = {
|
|
|
528
535
|
type: "string",
|
|
529
536
|
enum: [
|
|
530
537
|
"chrome",
|
|
538
|
+
"chromium",
|
|
531
539
|
"edge",
|
|
532
540
|
"firefox",
|
|
533
541
|
"chromium-based",
|
|
@@ -617,6 +625,7 @@ const start_schema = {
|
|
|
617
625
|
type: "string",
|
|
618
626
|
enum: [
|
|
619
627
|
"chrome",
|
|
628
|
+
"chromium",
|
|
620
629
|
"edge",
|
|
621
630
|
"firefox",
|
|
622
631
|
"chromium-based",
|
|
@@ -687,6 +696,7 @@ const preview_schema = {
|
|
|
687
696
|
type: "string",
|
|
688
697
|
enum: [
|
|
689
698
|
"chrome",
|
|
699
|
+
"chromium",
|
|
690
700
|
"edge",
|
|
691
701
|
"firefox",
|
|
692
702
|
"chromium-based",
|
|
@@ -902,6 +912,23 @@ async function get_template_source_handler(args) {
|
|
|
902
912
|
} : {}
|
|
903
913
|
});
|
|
904
914
|
}
|
|
915
|
+
const CHROMIUM_FAMILY = new Set([
|
|
916
|
+
"chrome",
|
|
917
|
+
"chromium",
|
|
918
|
+
"edge",
|
|
919
|
+
"chromium-based"
|
|
920
|
+
]);
|
|
921
|
+
const GECKO_FAMILY = new Set([
|
|
922
|
+
"firefox",
|
|
923
|
+
"gecko-based",
|
|
924
|
+
"firefox-based"
|
|
925
|
+
]);
|
|
926
|
+
function isChromiumFamily(browser) {
|
|
927
|
+
return CHROMIUM_FAMILY.has(browser);
|
|
928
|
+
}
|
|
929
|
+
function isGeckoFamily(browser) {
|
|
930
|
+
return GECKO_FAMILY.has(browser);
|
|
931
|
+
}
|
|
905
932
|
const manifest_validate_schema = {
|
|
906
933
|
name: "extension_manifest_validate",
|
|
907
934
|
description: "Validate a manifest.json file for correctness across browsers. Reports missing fields, invalid permissions, and cross-browser compatibility issues.",
|
|
@@ -961,15 +988,8 @@ async function manifest_validate_handler(args) {
|
|
|
961
988
|
const chromiumManifest = filterKeysForThisBrowser(manifest, "chrome");
|
|
962
989
|
if (!chromiumManifest.manifest_version) result.errors.push('Missing manifest_version. Use "chromium:manifest_version": 3 and "firefox:manifest_version": 2 for cross-browser support.');
|
|
963
990
|
for (const browser of browsers){
|
|
964
|
-
const isChromium =
|
|
965
|
-
|
|
966
|
-
"edge",
|
|
967
|
-
"chromium-based"
|
|
968
|
-
].includes(browser);
|
|
969
|
-
const isFirefox = [
|
|
970
|
-
"firefox",
|
|
971
|
-
"gecko-based"
|
|
972
|
-
].includes(browser);
|
|
991
|
+
const isChromium = isChromiumFamily(browser);
|
|
992
|
+
const isFirefox = isGeckoFamily(browser);
|
|
973
993
|
const effective = filterKeysForThisBrowser(manifest, browser);
|
|
974
994
|
const issues = [];
|
|
975
995
|
if (isChromium) {
|
|
@@ -1749,13 +1769,7 @@ async function source_inspect_handler(args) {
|
|
|
1749
1769
|
"console"
|
|
1750
1770
|
]);
|
|
1751
1771
|
const maxBytes = args.maxBytes ?? 262144;
|
|
1752
|
-
|
|
1753
|
-
"chrome",
|
|
1754
|
-
"chromium",
|
|
1755
|
-
"edge",
|
|
1756
|
-
"chromium-based"
|
|
1757
|
-
].includes(browser);
|
|
1758
|
-
if (!isChromium) return JSON.stringify({
|
|
1772
|
+
if (!isChromiumFamily(browser)) return JSON.stringify({
|
|
1759
1773
|
error: `Source inspection for ${browser} uses RDP (Remote Debug Protocol). Currently only Chromium CDP is supported.`,
|
|
1760
1774
|
hint: 'Pass browser: "chrome" (against a Chromium-family dev session).'
|
|
1761
1775
|
});
|
|
@@ -1868,13 +1882,7 @@ const list_extensions_schema = {
|
|
|
1868
1882
|
};
|
|
1869
1883
|
async function list_extensions_handler(args) {
|
|
1870
1884
|
const { browser } = resolveSessionBrowser(args.projectPath, args.browser, "chrome");
|
|
1871
|
-
|
|
1872
|
-
"chrome",
|
|
1873
|
-
"chromium",
|
|
1874
|
-
"edge",
|
|
1875
|
-
"chromium-based"
|
|
1876
|
-
].includes(browser);
|
|
1877
|
-
if (!isChromium) return JSON.stringify({
|
|
1885
|
+
if (!isChromiumFamily(browser)) return JSON.stringify({
|
|
1878
1886
|
error: `Listing extensions for ${browser} uses RDP (Remote Debug Protocol). Currently only Chromium CDP is supported.`,
|
|
1879
1887
|
hint: 'Pass browser: "chrome" (against a Chromium-family dev session).'
|
|
1880
1888
|
});
|
|
@@ -3544,6 +3552,63 @@ async function detect_browsers_handler(args) {
|
|
|
3544
3552
|
hint: missing.length ? `Missing browser(s): ${missing.map((d)=>d.browser).join(", ")}. Use extension_install_browser to install them.` : "All requested browsers are available."
|
|
3545
3553
|
});
|
|
3546
3554
|
}
|
|
3555
|
+
const doctor_schema = {
|
|
3556
|
+
name: "extension_doctor",
|
|
3557
|
+
description: "Diagnose a dev session end-to-end: ready contract, dev-server process, control-port agreement, control channel, eval token, executor, and browser liveness. Returns one {check, status, detail, remediation?} entry per leg in dependency order — a 'skip' names the check that blocked it and is NOT a pass. Run this first when any act tool (storage/reload/eval/open) errors unexpectedly. Wraps `extension doctor`.",
|
|
3558
|
+
inputSchema: {
|
|
3559
|
+
type: "object",
|
|
3560
|
+
properties: {
|
|
3561
|
+
projectPath: {
|
|
3562
|
+
type: "string",
|
|
3563
|
+
description: "Path to the extension project root"
|
|
3564
|
+
},
|
|
3565
|
+
browser: {
|
|
3566
|
+
type: "string",
|
|
3567
|
+
description: "Browser session to diagnose. Defaults to the active dev session's browser for this project."
|
|
3568
|
+
}
|
|
3569
|
+
},
|
|
3570
|
+
required: [
|
|
3571
|
+
"projectPath"
|
|
3572
|
+
]
|
|
3573
|
+
}
|
|
3574
|
+
};
|
|
3575
|
+
async function doctor_handler(args) {
|
|
3576
|
+
const { browser } = resolveSessionBrowser(args.projectPath, args.browser);
|
|
3577
|
+
const { code, stdout, stderr } = await runExtensionCli([
|
|
3578
|
+
"doctor",
|
|
3579
|
+
args.projectPath,
|
|
3580
|
+
"--browser",
|
|
3581
|
+
browser,
|
|
3582
|
+
"--output",
|
|
3583
|
+
"json"
|
|
3584
|
+
], {
|
|
3585
|
+
cwd: args.projectPath
|
|
3586
|
+
});
|
|
3587
|
+
const out = stdout.trim();
|
|
3588
|
+
try {
|
|
3589
|
+
const checks = JSON.parse(out);
|
|
3590
|
+
if (!Array.isArray(checks)) throw new Error("not a check array");
|
|
3591
|
+
for (const check of checks){
|
|
3592
|
+
if ("string" == typeof check.detail) check.detail = toMcpSpeak(check.detail);
|
|
3593
|
+
if ("string" == typeof check.remediation) check.remediation = toMcpSpeak(check.remediation);
|
|
3594
|
+
}
|
|
3595
|
+
return JSON.stringify({
|
|
3596
|
+
browser,
|
|
3597
|
+
healthy: 0 === code,
|
|
3598
|
+
checks
|
|
3599
|
+
});
|
|
3600
|
+
} catch {
|
|
3601
|
+
const message = stderr.trim() || `extension exited with code ${code}`;
|
|
3602
|
+
return JSON.stringify({
|
|
3603
|
+
ok: false,
|
|
3604
|
+
error: {
|
|
3605
|
+
name: "CliError",
|
|
3606
|
+
message: toMcpSpeak(message),
|
|
3607
|
+
hint: "extension doctor requires a recent extension CLI — the project's local install may predate it."
|
|
3608
|
+
}
|
|
3609
|
+
});
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3547
3612
|
function typeOf(value) {
|
|
3548
3613
|
if (Array.isArray(value)) return "array";
|
|
3549
3614
|
if (null === value) return "null";
|
|
@@ -3636,7 +3701,8 @@ const tools = [
|
|
|
3636
3701
|
logout_namespaceObject,
|
|
3637
3702
|
install_browser_namespaceObject,
|
|
3638
3703
|
list_browsers_namespaceObject,
|
|
3639
|
-
detect_browsers_namespaceObject
|
|
3704
|
+
detect_browsers_namespaceObject,
|
|
3705
|
+
doctor_namespaceObject
|
|
3640
3706
|
];
|
|
3641
3707
|
const toolMap = new Map();
|
|
3642
3708
|
for (const tool of tools)toolMap.set(tool.schema.name, tool);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function writeModernContract(projectPath: string, browser: string, overrides?: Record<string, unknown>): string;
|
|
2
|
+
export declare function writeLegacyContract(projectPath: string, browser: string, overrides?: Record<string, unknown>): string;
|
|
3
|
+
export declare function writeErrorContract(projectPath: string, browser: string): string;
|
|
4
|
+
export declare function writeLegacyEngineState(projectPath: string, browser: string): {
|
|
5
|
+
legacyPortFile: string;
|
|
6
|
+
legacyTokenFile: string;
|
|
7
|
+
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -8,11 +8,4 @@ export interface ToolModule {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const tools: ToolModule[];
|
|
10
10
|
export declare function startServer(): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Human-facing subcommands for `extension-mcp <cmd>`. Unlike the MCP tools
|
|
13
|
-
* (which must return promptly and so resume across calls), the bin blocks on
|
|
14
|
-
* the device flow because there is a person watching the terminal. Returns a
|
|
15
|
-
* process exit code. All console output goes to stderr so it never pollutes a
|
|
16
|
-
* machine-readable stdout if a script captures it.
|
|
17
|
-
*/
|
|
18
11
|
export declare function runCli(cmd: string, args: string[]): Promise<number>;
|
package/dist/src/lib/act.d.ts
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Translate CLI-speak in an error message into the MCP tool surface
|
|
3
|
-
* (fresh-eyes walk, friction #2). The CLI's hints say things like
|
|
4
|
-
* "Run `extension dev --browser=chromium --allow-control` first" — correct
|
|
5
|
-
* for a human at a terminal, a dead end for an agent that only has the MCP
|
|
6
|
-
* tools. Rewrite flags to their tool-argument names so the hint is actionable
|
|
7
|
-
* on the surface the caller is actually using. Result data is never touched —
|
|
8
|
-
* only error/hint prose.
|
|
9
|
-
*/
|
|
10
1
|
export declare function toMcpSpeak(text: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* Run an `extension <verb> … --output json` act command and return its result
|
|
13
|
-
* JSON as a string (the MCP tool payload). The CLI prints the control-channel
|
|
14
|
-
* result frame to stdout (for ok and !ok alike); connection/no-session failures
|
|
15
|
-
* go to stderr with a non-zero exit. Either way we return a JSON object.
|
|
16
|
-
*
|
|
17
|
-
* Per lockstep invariant #1 the act tools wrap the CLI verb rather than talking
|
|
18
|
-
* to the control WS directly — so MCP behavior can never drift from the CLI.
|
|
19
|
-
* Error PROSE is the one exception: hints are rewritten from CLI flags to MCP
|
|
20
|
-
* tool arguments before returning (see toMcpSpeak).
|
|
21
|
-
*/
|
|
22
2
|
export declare function runActVerb(args: string[], projectPath: string, timeoutMs?: number): Promise<string>;
|
|
23
|
-
/** Shared input fields for act tools. */
|
|
24
3
|
export interface ActArgs {
|
|
25
4
|
projectPath: string;
|
|
26
5
|
browser?: string;
|
|
@@ -29,5 +8,4 @@ export interface ActArgs {
|
|
|
29
8
|
tab?: number;
|
|
30
9
|
timeout?: number;
|
|
31
10
|
}
|
|
32
|
-
/** Build the trailing CLI flags common to act verbs. */
|
|
33
11
|
export declare function commonFlags(args: ActArgs): string[];
|
package/dist/src/lib/exec.d.ts
CHANGED
|
@@ -4,17 +4,6 @@ export interface CliResult {
|
|
|
4
4
|
stdout: string;
|
|
5
5
|
stderr: string;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Resolve how to invoke the `extension` CLI for a given project.
|
|
9
|
-
*
|
|
10
|
-
* Preference order:
|
|
11
|
-
* 1. The project's own `node_modules/.bin/extension` — the version the project
|
|
12
|
-
* pinned is the single source of behavior for that project (lockstep
|
|
13
|
-
* invariant), and spawning it needs no network.
|
|
14
|
-
* 2. `npx extension@<pinned>` — pinned to the extension-develop version this
|
|
15
|
-
* package vendors, never a floating `latest`, so MCP behavior stays
|
|
16
|
-
* reproducible even without a project-local install.
|
|
17
|
-
*/
|
|
18
7
|
export declare function resolveExtensionInvocation(projectDir?: string): {
|
|
19
8
|
command: string;
|
|
20
9
|
prefixArgs: string[];
|
|
@@ -2,6 +2,5 @@ export interface ResolvedBrowser {
|
|
|
2
2
|
browser: string;
|
|
3
3
|
source: "explicit" | "session" | "contract" | "fallback";
|
|
4
4
|
}
|
|
5
|
-
/** Browsers with a live session for this project (registry + disk contracts). */
|
|
6
5
|
export declare function knownSessionBrowsers(projectPath: string): string[];
|
|
7
6
|
export declare function resolveSessionBrowser(projectPath: string, explicit: string | undefined, fallback?: string): ResolvedBrowser;
|
|
@@ -2,10 +2,5 @@ export interface InputIssue {
|
|
|
2
2
|
path: string;
|
|
3
3
|
message: string;
|
|
4
4
|
}
|
|
5
|
-
/**
|
|
6
|
-
* Validate tools/call arguments against a tool inputSchema. Returns an empty
|
|
7
|
-
* array when the args are acceptable.
|
|
8
|
-
*/
|
|
9
5
|
export declare function validateToolInput(inputSchema: Record<string, unknown>, args: Record<string, unknown>): InputIssue[];
|
|
10
|
-
/** Frozen-style error envelope for input validation failures. */
|
|
11
6
|
export declare function inputValidationError(toolName: string, issues: InputIssue[]): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const schema: {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: "object";
|
|
6
|
+
properties: {
|
|
7
|
+
projectPath: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
browser: {
|
|
12
|
+
type: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
required: string[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare function handler(args: {
|
|
20
|
+
projectPath: string;
|
|
21
|
+
browser?: string;
|
|
22
|
+
}): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extension.dev/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
5
|
-
"description": "MCP server that lets AI agents build, run, inspect, and publish browser extensions.
|
|
4
|
+
"version": "4.3.0",
|
|
5
|
+
"description": "MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor, Copilot, Codex) build, run, inspect, and publish browser extensions. 29 tools for scaffolding, live DOM inspection, log streaming, and store-ready builds across Chrome, Edge, and Firefox. Powered by extension.dev and Extension.js.",
|
|
6
|
+
"mcpName": "io.github.extensiondev/mcp",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"author": {
|
|
8
9
|
"name": "Cezar Augusto",
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
"bugs": {
|
|
17
18
|
"url": "https://github.com/extensiondev/mcp/issues"
|
|
18
19
|
},
|
|
19
|
-
"homepage": "https://
|
|
20
|
+
"homepage": "https://extension.dev",
|
|
20
21
|
"engines": {
|
|
21
22
|
"node": ">=20.18"
|
|
22
23
|
},
|
|
@@ -35,6 +36,8 @@
|
|
|
35
36
|
"dist",
|
|
36
37
|
"bin",
|
|
37
38
|
"claude",
|
|
39
|
+
".claude-plugin",
|
|
40
|
+
"server.json",
|
|
38
41
|
"README.md",
|
|
39
42
|
"CHANGELOG.md",
|
|
40
43
|
"LICENSE"
|
|
@@ -45,6 +48,7 @@
|
|
|
45
48
|
},
|
|
46
49
|
"keywords": [
|
|
47
50
|
"mcp",
|
|
51
|
+
"mcp-server",
|
|
48
52
|
"model-context-protocol",
|
|
49
53
|
"ai-agent",
|
|
50
54
|
"agents",
|
|
@@ -52,14 +56,18 @@
|
|
|
52
56
|
"claude-code",
|
|
53
57
|
"claude-desktop",
|
|
54
58
|
"cursor",
|
|
59
|
+
"github-copilot",
|
|
60
|
+
"codex",
|
|
55
61
|
"browser-extension",
|
|
56
62
|
"chrome-extension",
|
|
57
63
|
"firefox-addon",
|
|
64
|
+
"edge-extension",
|
|
58
65
|
"manifest-v3",
|
|
59
66
|
"webextension",
|
|
60
67
|
"cross-browser",
|
|
61
68
|
"developer-tools",
|
|
62
|
-
"extension.dev"
|
|
69
|
+
"extension.dev",
|
|
70
|
+
"extension.js"
|
|
63
71
|
],
|
|
64
72
|
"dependencies": {
|
|
65
73
|
"@extension.dev/core": "^0.2.0",
|
package/server.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
|
|
3
|
+
"name": "io.github.extensiondev/mcp",
|
|
4
|
+
"description": "Build, run, inspect, and publish browser extensions from any MCP client. 29 tools for scaffolding, live DOM inspection, log streaming, and store-ready builds across Chrome, Edge, and Firefox.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/extensiondev/mcp",
|
|
7
|
+
"source": "github"
|
|
8
|
+
},
|
|
9
|
+
"websiteUrl": "https://extension.dev",
|
|
10
|
+
"version": "4.3.0",
|
|
11
|
+
"packages": [
|
|
12
|
+
{
|
|
13
|
+
"registryType": "npm",
|
|
14
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
15
|
+
"identifier": "@extension.dev/mcp",
|
|
16
|
+
"version": "4.3.0",
|
|
17
|
+
"runtimeHint": "npx",
|
|
18
|
+
"transport": {
|
|
19
|
+
"type": "stdio"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|