@ada-mcp/mcp-server 0.1.1 → 0.1.3

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.
Files changed (3) hide show
  1. package/README.md +60 -0
  2. package/dist/cli.cjs +965 -868
  3. package/package.json +1 -4
package/README.md CHANGED
@@ -18,6 +18,66 @@ pnpm dlx @ada-mcp/mcp-server
18
18
  npx -y @ada-mcp/mcp-server
19
19
  ```
20
20
 
21
+ ## 启动时自动安装依赖(默认仅 Playwright)
22
+
23
+ 进程启动前会按配置自动执行 `install-deps`(日志在 stderr):
24
+
25
+ | 配置 | 含义 |
26
+ |------|------|
27
+ | (未配置) | 仅安装 **Playwright + 浏览器** |
28
+ | `playwright` | 同上 |
29
+ | `playwright` | 仅 Playwright(显式写法,与默认相同) |
30
+ | `selenium` | **仅** Selenium 原生驱动(GeckoDriver/ChromeDriver) |
31
+ | `appium` | **仅** Appium 包 + 移动端驱动 |
32
+ | `playwright,selenium` | 组合(逗号连接多类) |
33
+ | `all` | 上述全部 |
34
+ | `none` / `skip` | 不自动安装 |
35
+
36
+ **环境变量**
37
+
38
+ - `ADA_MCP_INSTALL_DEPS`:范围,如 `playwright`、`playwright,selenium`、`all`、`none`
39
+ - `ADA_MCP_SKIP_INSTALL_DEPS=1`:跳过自动安装
40
+ - `ADA_MCP_INSTALL_DEPS_FORCE=1`:强制重装
41
+ - `ADA_MCP_GECKODRIVER_VERSION` / `ADA_MCP_CHROMEDRIVER_VERSION`:Selenium 驱动版本
42
+ - `ADA_PLAYWRIGHT_INSTALL_TIMEOUT_MS`:浏览器下载超时(默认 15 分钟,`0.1.2` 仅 20s 易报错)
43
+ - `ADA_INSTALL_STRATEGY_TIMEOUT_MS`:npm 装包超时(默认 2 分钟)
44
+
45
+ **CLI 参数**(写在 MCP `args` 末尾)
46
+
47
+ - `--install-deps=playwright,selenium`
48
+ - `--skip-install-deps`
49
+ - `--install-deps-force`
50
+ - `--geckodriver-version=latest` `--chromedriver-version=match-chrome`
51
+
52
+ 示例:安装全部依赖后再连 MCP:
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "ada-mcp": {
58
+ "command": "pnpm",
59
+ "args": ["dlx", "@ada-mcp/mcp-server", "--install-deps=all"]
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ 仅 Playwright(默认,可省略 `env`):
66
+
67
+ ```json
68
+ {
69
+ "mcpServers": {
70
+ "ada-mcp": {
71
+ "command": "pnpm",
72
+ "args": ["dlx", "@ada-mcp/mcp-server"],
73
+ "env": {
74
+ "ADA_MCP_INSTALL_DEPS": "playwright"
75
+ }
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
21
81
  ## Cursor MCP 配置(本地 stdio)
22
82
 
23
83
  **推荐(pnpm):**