botbrowser-mcp 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/dist/cli.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * botbrowser-mcp CLI
4
+ * 转发所有参数到 @playwright/mcp
4
5
  */
5
- export {};
6
+ declare const spawn: any;
7
+ declare const child: any;
package/dist/cli.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
2
  /**
4
3
  * botbrowser-mcp CLI
4
+ * 转发所有参数到 @playwright/mcp
5
5
  */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
8
- const index_1 = require("./index");
9
- (async () => {
10
- const server = await (0, index_1.createConnection)();
11
- const transport = new stdio_js_1.StdioServerTransport();
12
- await server.connect(transport);
13
- })();
6
+ const { spawn } = require('child_process');
7
+ // 使用 mcp-server-playwright 命令(@playwright/mcp 的 bin)
8
+ const child = spawn('npx', ['mcp-server-playwright', ...process.argv.slice(2)], {
9
+ stdio: 'inherit'
10
+ });
11
+ child.on('exit', (code) => {
12
+ process.exit(code || 0);
13
+ });
14
14
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AACA;;GAEG;;AAEH,wEAAiF;AACjF,mCAA2C;AAE3C,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAgB,GAAE,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAE3C,qDAAqD;AACrD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,uBAAuB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;IAC9E,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;IACxB,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botbrowser-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Enhanced browser automation MCP server based on Playwright",
5
5
  "author": "tonwe",
6
6
  "license": "Apache-2.0",
package/readme.md CHANGED
@@ -1,13 +1,6 @@
1
1
  # botbrowser-mcp
2
2
 
3
- Enhanced browser automation MCP server based on [@playwright/mcp](https://www.npmjs.com/package/@playwright/mcp).
4
-
5
- ## Features
6
-
7
- - 🤖 **Bot Mode**: Optimized for bot/automation detection avoidance
8
- - 🥷 **Stealth Mode**: Advanced anti-detection features
9
- - 🔧 **Custom Headers**: Easy HTTP header customization
10
- - 📦 **Based on Playwright**: Full Playwright MCP capabilities included
3
+ A wrapper around [@playwright/mcp](https://www.npmjs.com/package/@playwright/mcp).
11
4
 
12
5
  ## Installation
13
6
 
@@ -17,8 +10,6 @@ npm install botbrowser-mcp
17
10
 
18
11
  ## Usage
19
12
 
20
- ### As MCP Server
21
-
22
13
  Add to your MCP client configuration:
23
14
 
24
15
  ```json
@@ -26,63 +17,13 @@ Add to your MCP client configuration:
26
17
  "mcpServers": {
27
18
  "botbrowser": {
28
19
  "command": "npx",
29
- "args": [
30
- "botbrowser-mcp"
31
- ]
32
- }
33
- }
34
- }
35
- ```
36
-
37
- ### With Options
38
-
39
- ```json
40
- {
41
- "mcpServers": {
42
- "botbrowser": {
43
- "command": "npx",
44
- "args": [
45
- "botbrowser-mcp",
46
- "--stealth",
47
- "--bot-mode"
48
- ]
20
+ "args": ["botbrowser-mcp"]
49
21
  }
50
22
  }
51
23
  }
52
24
  ```
53
25
 
54
- ### Programmatic Usage
55
-
56
- ```typescript
57
- import { createConnection } from 'botbrowser-mcp';
58
-
59
- const server = await createConnection({
60
- botMode: true,
61
- stealth: true,
62
- customHeaders: {
63
- 'X-Custom-Header': 'value'
64
- }
65
- });
66
- ```
67
-
68
- ## Configuration Options
69
-
70
- - `botMode`: Enable bot-specific optimizations
71
- - `stealth`: Enable stealth mode (custom user agent, anti-detection)
72
- - `customHeaders`: Add custom HTTP headers
73
-
74
- ## Development
75
-
76
- ```bash
77
- npm install
78
- npm run build
79
- npm run dev # Watch mode
80
- ```
81
-
82
26
  ## License
83
27
 
84
28
  Apache-2.0
85
29
 
86
- ## Based On
87
-
88
- This project extends [@playwright/mcp](https://www.npmjs.com/package/@playwright/mcp) with additional features for bot automation.