playwright-stealth-mcp-server 0.0.1 → 0.0.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 CHANGED
@@ -62,11 +62,12 @@ Add to your Claude Desktop config file:
62
62
 
63
63
  ### Environment Variables
64
64
 
65
- | Variable | Description | Default |
66
- | -------------- | ------------------------------------------------ | ------- |
67
- | `STEALTH_MODE` | Enable stealth mode with anti-detection measures | `false` |
68
- | `HEADLESS` | Run browser in headless mode | `true` |
69
- | `TIMEOUT` | Default execution timeout in milliseconds | `30000` |
65
+ | Variable | Description | Default |
66
+ | -------------------- | -------------------------------------------------------------------------- | ------- |
67
+ | `STEALTH_MODE` | Enable stealth mode with anti-detection measures | `false` |
68
+ | `HEADLESS` | Run browser in headless mode | `true` |
69
+ | `TIMEOUT` | Default timeout for Playwright actions (click, fill, etc.) in milliseconds | `30000` |
70
+ | `NAVIGATION_TIMEOUT` | Default timeout for page navigation (goto, reload, etc.) in milliseconds | `60000` |
70
71
 
71
72
  ## Available Tools
72
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-stealth-mcp-server",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Local implementation of Playwright Stealth MCP server",
5
5
  "mcpName": "com.pulsemcp.servers/playwright-stealth",
6
6
  "main": "build/index.js",
@@ -67,5 +67,6 @@ export function createMockPlaywrightClient() {
67
67
  stealthMode: false,
68
68
  headless: true,
69
69
  timeout: 30000,
70
+ navigationTimeout: 60000,
70
71
  });
71
72
  }
package/shared/server.js CHANGED
@@ -44,6 +44,9 @@ export class PlaywrightClient {
44
44
  : undefined,
45
45
  });
46
46
  this.page = await this.context.newPage();
47
+ // Apply timeout configuration to Playwright
48
+ this.page.setDefaultTimeout(this.config.timeout);
49
+ this.page.setDefaultNavigationTimeout(this.config.navigationTimeout);
47
50
  // Capture console messages
48
51
  this.page.on('console', (msg) => {
49
52
  this.consoleMessages.push(`[${msg.type()}] ${msg.text()}`);
@@ -139,10 +142,12 @@ export function createMCPServer() {
139
142
  (() => {
140
143
  const headless = process.env.HEADLESS !== 'false';
141
144
  const timeout = parseInt(process.env.TIMEOUT || '30000', 10);
145
+ const navigationTimeout = parseInt(process.env.NAVIGATION_TIMEOUT || '60000', 10);
142
146
  activeClient = new PlaywrightClient({
143
147
  stealthMode,
144
148
  headless,
145
149
  timeout,
150
+ navigationTimeout,
146
151
  });
147
152
  return activeClient;
148
153
  });
package/shared/types.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface PlaywrightConfig {
5
5
  stealthMode: boolean;
6
6
  headless: boolean;
7
7
  timeout: number;
8
+ navigationTimeout: number;
8
9
  }
9
10
  export interface ExecuteResult {
10
11
  success: boolean;