@ada-mcp/mcp-server 0.1.0 → 0.1.2
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/README.md +79 -6
- package/dist/cli.cjs +975 -889
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -6,17 +6,90 @@ ADA MCP server package that supports:
|
|
|
6
6
|
- Remote HTTP mode (`server`) with API key authentication
|
|
7
7
|
- MCP **Streamable HTTP** on `POST|GET|DELETE /mcp` (same port as legacy REST), with optional SSE per MCP spec (`@modelcontextprotocol/sdk` transport)
|
|
8
8
|
|
|
9
|
-
## Run with
|
|
9
|
+
## Run with pnpm(推荐,尤其 Windows)
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
pnpm dlx @ada-mcp/mcp-server
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
也可用 npm:
|
|
16
|
+
|
|
15
17
|
```bash
|
|
16
|
-
|
|
18
|
+
npx -y @ada-mcp/mcp-server
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 启动时自动安装依赖(默认仅 Playwright)
|
|
22
|
+
|
|
23
|
+
进程启动前会按配置自动执行 `install-deps`(日志在 stderr):
|
|
24
|
+
|
|
25
|
+
| 配置 | 含义 |
|
|
26
|
+
|------|------|
|
|
27
|
+
| (未配置) | 仅安装 **Playwright + 浏览器** |
|
|
28
|
+
| `playwright` | 同上 |
|
|
29
|
+
| `playwright,selenium` | Playwright + GeckoDriver/ChromeDriver |
|
|
30
|
+
| `appium` | Appium 包 + 配置中的移动端驱动 |
|
|
31
|
+
| `all` | 上述全部 |
|
|
32
|
+
| `none` / `skip` | 不自动安装 |
|
|
33
|
+
|
|
34
|
+
**环境变量**
|
|
35
|
+
|
|
36
|
+
- `ADA_MCP_INSTALL_DEPS`:范围,如 `playwright`、`playwright,selenium`、`all`、`none`
|
|
37
|
+
- `ADA_MCP_SKIP_INSTALL_DEPS=1`:跳过自动安装
|
|
38
|
+
- `ADA_MCP_INSTALL_DEPS_FORCE=1`:强制重装
|
|
39
|
+
- `ADA_MCP_GECKODRIVER_VERSION` / `ADA_MCP_CHROMEDRIVER_VERSION`:Selenium 驱动版本
|
|
40
|
+
|
|
41
|
+
**CLI 参数**(写在 MCP `args` 末尾)
|
|
42
|
+
|
|
43
|
+
- `--install-deps=playwright,selenium`
|
|
44
|
+
- `--skip-install-deps`
|
|
45
|
+
- `--install-deps-force`
|
|
46
|
+
- `--geckodriver-version=latest` `--chromedriver-version=match-chrome`
|
|
47
|
+
|
|
48
|
+
示例:安装全部依赖后再连 MCP:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"ada-mcp": {
|
|
54
|
+
"command": "pnpm",
|
|
55
|
+
"args": ["dlx", "@ada-mcp/mcp-server", "--install-deps=all"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
仅 Playwright(默认,可省略 `env`):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"ada-mcp": {
|
|
67
|
+
"command": "pnpm",
|
|
68
|
+
"args": ["dlx", "@ada-mcp/mcp-server"],
|
|
69
|
+
"env": {
|
|
70
|
+
"ADA_MCP_INSTALL_DEPS": "playwright"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Cursor MCP 配置(本地 stdio)
|
|
78
|
+
|
|
79
|
+
**推荐(pnpm):**
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"mcpServers": {
|
|
84
|
+
"ada-mcp": {
|
|
85
|
+
"command": "pnpm",
|
|
86
|
+
"args": ["dlx", "@ada-mcp/mcp-server"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
17
90
|
```
|
|
18
91
|
|
|
19
|
-
|
|
92
|
+
Windows 若找不到 `pnpm`,可写完整路径,例如 `C:\\Users\\<你>\\AppData\\Roaming\\npm\\pnpm.cmd`,或改用 npx:
|
|
20
93
|
|
|
21
94
|
```json
|
|
22
95
|
{
|
|
@@ -46,7 +119,7 @@ $env:ADA_MCP_REMOTE_API_KEY="your_token"
|
|
|
46
119
|
Then run:
|
|
47
120
|
|
|
48
121
|
```bash
|
|
49
|
-
ada-mcp server --host=127.0.0.1 --port=8787 --allow-risky=true --risky-mode=whitelist --risky-commands=custom
|
|
122
|
+
pnpm dlx @ada-mcp/mcp-server server --host=127.0.0.1 --port=8787 --allow-risky=true --risky-mode=whitelist --risky-commands=custom
|
|
50
123
|
```
|
|
51
124
|
|
|
52
125
|
### Streamable HTTP (`/mcp`)
|
|
@@ -59,5 +132,5 @@ ada-mcp server --host=127.0.0.1 --port=8787 --allow-risky=true --risky-mode=whit
|
|
|
59
132
|
When listening on all interfaces (e.g. `--host=0.0.0.0`), set allowed Host headers to satisfy DNS rebinding checks:
|
|
60
133
|
|
|
61
134
|
```bash
|
|
62
|
-
ada-mcp server --host=0.0.0.0 --port=8787 --api-key=your_token --allowed-hosts=localhost,127.0.0.1
|
|
135
|
+
pnpm dlx @ada-mcp/mcp-server server --host=0.0.0.0 --port=8787 --api-key=your_token --allowed-hosts=localhost,127.0.0.1
|
|
63
136
|
```
|