@comecaramelos/dsh-chrome-mcp 0.0.1
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/LICENSE.md +21 -0
- package/README.md +115 -0
- package/cordis.patch.yml +5 -0
- package/lib/client.js +585 -0
- package/lib/index.js +647 -0
- package/package.json +40 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ComeCaramelos
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# @comecaramelos/dsh-chrome-mcp
|
|
2
|
+
|
|
3
|
+
DSH plugin that connects the **Chrome DevTools MCP server**
|
|
4
|
+
([`chrome-devtools-mcp`](https://github.com/ChromeDevTools/chrome-devtools-mcp),
|
|
5
|
+
launched as `npx -y chrome-devtools-mcp@latest [extraFlags]`) as an MCP
|
|
6
|
+
server, with an **extra-flags editor in the Web GUI** — instead of hardcoding
|
|
7
|
+
`extraFlags` in the config row.
|
|
8
|
+
|
|
9
|
+
Architecture notes, hard constraints and internals: see `AGENTS.md`.
|
|
10
|
+
|
|
11
|
+
## Prerequisite: Google Chrome must be installed
|
|
12
|
+
|
|
13
|
+
The upstream server does **not** download Chrome — it drives the Google Chrome
|
|
14
|
+
already installed on the machine (<https://www.google.com/chrome/?platform=linux>).
|
|
15
|
+
The standard system locations are auto-discovered; pin a non-standard install
|
|
16
|
+
with `chromePath` (one executable) or `chromePaths` (candidate list). When
|
|
17
|
+
nothing is found, the card's status dot turns red with "Chrome executable not
|
|
18
|
+
found".
|
|
19
|
+
|
|
20
|
+
**WSL users:** install the Chrome for **Linux inside the distro** — the
|
|
21
|
+
Windows-side `chrome.exe` cannot be driven across the WSL boundary (see
|
|
22
|
+
"Running under WSL").
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
From npm:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
dsh plugin --profile web add @comecaramelos/dsh-chrome-mcp
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
That installs the package and activates its bundle patch layer, which inserts
|
|
33
|
+
the bridge row for you (bundle layers apply before the profile's own
|
|
34
|
+
`cordis.patch.yml`, and a later row with the same `id` wins):
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
- insert:
|
|
38
|
+
- id: mcp-chrome
|
|
39
|
+
name: '@comecaramelos/dsh-chrome-mcp'
|
|
40
|
+
config:
|
|
41
|
+
serverName: chrome
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The row ships with the defaults (`serverName: chrome`, `extraFlags` =
|
|
45
|
+
`--no-usage-statistics`, `--no-performance-crux`). Set `chromePath` /
|
|
46
|
+
`chromePaths` on the row only if the automatic discovery is not enough — the
|
|
47
|
+
Settings card edits `extraFlags` live.
|
|
48
|
+
|
|
49
|
+
Overriding the bundle row: keep your own row in
|
|
50
|
+
`$DSH_HOME/profiles/web/cordis.patch.yml` with `id: mcp-chrome`. It replaces
|
|
51
|
+
the bundle row completely (full-config replacement, no deep merge) — e.g.
|
|
52
|
+
switching a machine-wide bridge to connect mode:
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
- id: mcp-chrome
|
|
56
|
+
name: '@comecaramelos/dsh-chrome-mcp'
|
|
57
|
+
config:
|
|
58
|
+
serverName: chrome
|
|
59
|
+
extraFlags: ['--browserUrl=http://127.0.0.1:9222']
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Fallback (WSL + Windows pnpm, where `dsh plugin add` fails to symlink the
|
|
63
|
+
package into the profile's `node_modules`):
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
mkdir -p ~/.dsh/profiles/web/node_modules/@comecaramelos
|
|
67
|
+
ln -s /path/to/dsh-chrome-mcp ~/.dsh/profiles/web/node_modules/@comecaramelos/dsh-chrome-mcp
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then list the package in the profile manifest
|
|
71
|
+
(`~/.dsh/profiles/web/package.json`) alongside the other bundles — this is
|
|
72
|
+
exactly what `dsh plugin add` records:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"dsh": {
|
|
77
|
+
"profile": {
|
|
78
|
+
"bundles": [
|
|
79
|
+
"@deepseek-ai/dsh-base",
|
|
80
|
+
"@deepseek-ai/dsh-web-app",
|
|
81
|
+
"@comecaramelos/dsh-chrome-mcp"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Do **not** add a `dependencies` entry for the checkout here: a `file:` spec
|
|
89
|
+
makes the Windows-side pnpm re-link the package and fail with `
|
|
90
|
+
ERR_PNPM_PACKAGE_MANAGER_SYMLINK_FAILED`. With only the bundle entry, the
|
|
91
|
+
`mcp-chrome` row above applies unchanged.
|
|
92
|
+
|
|
93
|
+
## Why this over the default config
|
|
94
|
+
|
|
95
|
+
- **Extra-flags editor in Settings** — one flag per line, saved per user;
|
|
96
|
+
invalid entries are rejected by the host and shown on the card. Defaults:
|
|
97
|
+
`--no-usage-statistics`, `--no-performance-crux`.
|
|
98
|
+
- **Hot reconnect** — saving flags re-launches the bridge in place; no
|
|
99
|
+
restart needed.
|
|
100
|
+
- **Status dot** — the card's single error surface: a red dot whose tooltip
|
|
101
|
+
holds the full last error (missing executable, bridge connection failure,
|
|
102
|
+
failed browser tool call). It clears itself once the bridge is healthy
|
|
103
|
+
again, and lights up on a Chrome-less machine at startup without any user
|
|
104
|
+
action.
|
|
105
|
+
- **Chrome version + Re-check** — the last discovered version line, plus a
|
|
106
|
+
button to re-run the executable probe / discovery.
|
|
107
|
+
- **Configuration guide** — the upstream docs message with its link:
|
|
108
|
+
[configuration](https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/configuration.md).
|
|
109
|
+
- **Flags precedence**: UI selection > `DSH_CHROME_MCP_FLAGS` env var >
|
|
110
|
+
row config `extraFlags` > defaults. Seed a machine default via env,
|
|
111
|
+
switch per-run from the UI.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
[`CONTRIBUTING`](CONTRIBUTING.md) | [`LICENSE`](LICENSE.md)
|