豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit c402b43

Browse files
authored
feat: --slim mode for maximum token savings (#958)
- navigate - run js - take screenshot That's it. Basic functionality for a low (~368) token price.
1 parent 0ccc15e commit c402b43

File tree

11 files changed

+489
-168
lines changed

11 files changed

+489
-168
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,21 @@ Add the following config to your MCP client:
7373
> [!NOTE]
7474
> Using `chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.
7575
76+
If you are intersted in doing only basic browser tasks, use the `--slim` mode:
77+
78+
```json
79+
{
80+
"mcpServers": {
81+
"chrome-devtools": {
82+
"command": "npx",
83+
"args": ["-y", "chrome-devtools-mcp@latest", "--slim", "--headless"]
84+
}
85+
}
86+
}
87+
```
88+
89+
See [Slim tool reference](./docs/slim-tool-reference.md).
90+
7691
### MCP Client configuration
7792

7893
<details>
@@ -532,6 +547,10 @@ The Chrome DevTools MCP server supports the following configuration option:
532547
- **Type:** boolean
533548
- **Default:** `true`
534549

550+
- **`--slim`**
551+
Exposes a "slim" set of 3 tools covering navigation, script execution and screenshots only. Useful for basic browser tasks.
552+
- **Type:** boolean
553+
535554
<!-- END AUTO GENERATED OPTIONS -->
536555

537556
Pass them via the `args` property in the JSON configuration. For example:

docs/slim-tool-reference.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update-->
2+
3+
# Chrome DevTools MCP Slim Tool Reference (~368 cl100k_base tokens)
4+
5+
- **[Navigation automation](#navigation-automation)** (1 tools)
6+
- [`navigate`](#navigate)
7+
- **[Debugging](#debugging)** (2 tools)
8+
- [`evaluate`](#evaluate)
9+
- [`screenshot`](#screenshot)
10+
11+
## Navigation automation
12+
13+
### `navigate`
14+
15+
**Description:** Load URL in the browser
16+
17+
**Parameters:**
18+
19+
- **url** (string) **(required)**: Page URL
20+
21+
---
22+
23+
## Debugging
24+
25+
### `evaluate`
26+
27+
**Description:** [`Evaluate`](#evaluate) a JavaScript function on the last loaded page
28+
29+
**Parameters:**
30+
31+
- **fn** (string) **(required)**: A JavaScript function to be executed on the active page
32+
33+
---
34+
35+
### `screenshot`
36+
37+
**Description:** Take a [`screenshot`](#screenshot) of the active page.
38+
39+
**Parameters:** None
40+
41+
---

0 commit comments

Comments
 (0)