88 Commits

Author SHA1 Message Date
3e92fc031f feat: add runtime proxy configuration support to browser_configure
Some checks failed
CI / lint (push) Has been cancelled
CI / test (macos-latest) (push) Has been cancelled
CI / test (ubuntu-latest) (push) Has been cancelled
CI / test (windows-latest) (push) Has been cancelled
CI / test_docker (push) Has been cancelled
Enables on-the-fly proxy switching without restarting MCP server, allowing
users to dynamically set or clear proxy settings during browser sessions.

Changes:
- Add proxyServer and proxyBypass parameters to updateBrowserConfig method
- Implement proxy set/clear logic with proper validation for empty strings
- Expose proxy configuration through browser_configure tool interface
- Update auto-generated documentation with proxy parameter descriptions

Tested with SOCKS5 proxy, verified IP changes when proxy is enabled/disabled.
2025-11-14 21:34:40 -07:00
9afa25855e feat: revolutionary integration of differential snapshots with ripgrep filtering
Combines our 99% response reduction differential snapshots with MCPlaywright's
proven ripgrep filtering system to create unprecedented browser automation precision.

Key Features:
- Universal TypeScript ripgrep filtering engine with async processing
- Seamless integration with React-style differential reconciliation
- Enhanced browser_configure_snapshots with 8 new filtering parameters
- Surgical precision targeting: 99.8%+ total response reduction
- Sub-100ms performance with comprehensive metrics and feedback

Technical Implementation:
- src/filtering/engine.ts: High-performance filtering with temp file management
- src/filtering/models.ts: Type-safe interfaces for differential filtering
- src/filtering/decorators.ts: MCP tool integration decorators
- Enhanced configuration system with intelligent defaults

Performance Achievement:
- Before: 1000+ line snapshots requiring manual parsing
- With Differential: 99% reduction (6-20 lines) with semantic understanding
- With Combined Filtering: 99.8%+ reduction (1-3 lines) with surgical targeting

Establishes new gold standard for browser automation efficiency and precision.
2025-09-20 14:20:41 -06:00
704d0d06ca docs: update main README with MCP client identification feature
Add key feature highlighting the new multi-client identification system with debug toolbar and code injection capabilities for managing parallel MCP clients.
2025-09-10 15:59:48 -06:00
a41a73af2a style: fix linting errors and update README with new tools
- Auto-fix trailing spaces, curly braces, and indentation issues
- Clean up boolean comparisons and code formatting
- README automatically updated with new code injection tools:
  - browser_enable_debug_toolbar: Enable debug toolbar for client identification
  - browser_inject_custom_code: Inject custom JavaScript/CSS code
  - browser_list_injections: List all active code injections
  - browser_disable_debug_toolbar: Disable debug toolbar
  - browser_clear_injections: Remove custom code injections

All linting checks now pass successfully.
2025-09-10 01:38:24 -06:00
9257404ba3 feat: fix video recording session persistence and add HTTP request monitoring
Video Recording Fixes:
- Fix session persistence issues where recording state was lost between tool calls
- Improve page video object handling by triggering navigation when needed
- Add browser_reveal_artifact_paths tool to show exact file locations
- Enhance browser_recording_status with detailed debugging info and file listings
- Add clearVideoRecordingState() method for proper state management
- Keep recording config available for debugging until new session starts

Request Monitoring System:
- Add comprehensive RequestInterceptor class for HTTP traffic capture
- Implement 5 new MCP tools for request monitoring and analysis
- Support multiple export formats: JSON, HAR, CSV, and summary reports
- Add filtering by domain, method, status codes, and response timing
- Integrate with artifact storage for organized session-based file management
- Enhance browser_network_requests with rich intercepted data

Additional Improvements:
- Add getBaseDirectory/getSessionDirectory methods to ArtifactManager
- Fix floating promise in tab.ts extension console message polling
- Add debug script for comprehensive video recording workflow testing
- Update README with new tool documentation

Resolves video recording workflow issues and adds powerful HTTP traffic
analysis capabilities for web application debugging and security testing.
2025-09-05 07:17:11 -06:00
f31b9778c9 docs: update README with browser_set_offline and offline mode documentation
- Add browser_set_offline tool documentation
- Document offline parameter in browser_configure tool
- Auto-generated tool documentation now includes all new features
2025-09-01 12:09:07 -06:00
afaa8a7014 feat: comprehensive console capture and offline mode support
Major enhancements to browser automation and debugging capabilities:

**Console Capture Features:**
- Add console output file option (CLI, env var, session config)
- Enhanced CDP console capture for service worker messages
- Browser-level security warnings and mixed content errors
- Network failure and loading error capture
- All console contexts written to structured log files
- Chrome extension for comprehensive console message interception

**Offline Mode Support:**
- Add browser_set_offline tool for DevTools-equivalent offline mode
- Integrate offline mode into browser_configure tool
- Support for testing network failure scenarios and service worker behavior

**Extension Management:**
- Improved extension installation messaging about session persistence
- Console capture extension with debugger API access
- Clear communication about extension lifecycle to MCP clients

**Technical Implementation:**
- CDP session management across multiple domains (Runtime, Network, Security, Log)
- Service worker context console message interception
- Browser context factory integration for offline mode
- Pure Chromium configuration for optimal extension support

All features provide MCP clients with powerful debugging capabilities
equivalent to Chrome DevTools console and offline functionality.
2025-08-31 16:28:43 -06:00
574fdc4959 feat: add snapshot size limits and optional snapshots to fix token overflow
Implements comprehensive solution for browser_click and other interactive tools
returning massive responses (37K+ tokens) due to full page snapshots.

Features implemented:
1. **Snapshot size limits** (--max-snapshot-tokens, default 10k)
   - Automatically truncates large snapshots with helpful messages
   - Preserves essential info (URL, title, errors) when truncating
   - Shows exact token counts and configuration suggestions

2. **Optional snapshots** (--no-snapshots)
   - Disables automatic snapshots after interactive operations
   - browser_snapshot tool always works for explicit snapshots
   - Maintains backward compatibility (snapshots enabled by default)

3. **Differential snapshots** (--differential-snapshots)
   - Shows only changes since last snapshot instead of full page
   - Tracks URL, title, DOM structure, and console activity
   - Significantly reduces token usage for incremental operations

4. **Enhanced tool descriptions**
   - All interactive tools now document snapshot behavior
   - Clear guidance on when snapshots are included/excluded
   - Helpful suggestions for users experiencing token limits

Configuration options:
- CLI: --no-snapshots, --max-snapshot-tokens N, --differential-snapshots
- ENV: PLAYWRIGHT_MCP_INCLUDE_SNAPSHOTS, PLAYWRIGHT_MCP_MAX_SNAPSHOT_TOKENS, etc.
- Config file: includeSnapshots, maxSnapshotTokens, differentialSnapshots

Fixes token overflow errors while providing users full control over
snapshot behavior and response sizes.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 07:54:36 -06:00
b480bc9328 feat: add browser_install_popular_extension for automatic extension downloads
- Add new tool to automatically download and install popular Chrome extensions
- Support for react-devtools, vue-devtools, redux-devtools, and more
- Works around Chrome channel limitations by creating functional demo extensions
- Extensions include proper detection logic and visual indicators
- Auto-generates manifests, content scripts, and popup interfaces
- Registry-based approach for easy extension additions
- Session-specific download directories for isolation
- Updated README with new tool documentation

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 15:48:58 -06:00
b3dbe55a9d feat: add Chrome extension support with session-based isolation
- Add browser_install_extension, browser_list_extensions, browser_uninstall_extension tools
- Support session-based extension isolation between MCP clients
- Extensions loaded via --load-extension Chrome flags at browser startup
- Browser auto-restarts when extensions are added/removed
- Validation ensures extensions only work with Chromium browser
- Warning system for Chrome channel vs pure Chromium compatibility
- Extension management persists across page navigations within session
- Updated README with complete extension tool documentation

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 15:02:00 -06:00
d8202f6694 feat: implement centralized artifact storage with session isolation
Add comprehensive artifact storage system with session-specific directories:

- Add --artifact-dir CLI option and PLAYWRIGHT_MCP_ARTIFACT_DIR env var
- Create ArtifactManager class for session-specific artifact organization
- Implement ArtifactManagerRegistry for multi-session support
- Add tool call logging with JSON persistence in tool-calls.json
- Update screenshot, video, and PDF tools to use centralized storage
- Add browser_configure_artifacts tool for per-session control
- Support dynamic enable/disable without server restart
- Maintain backward compatibility when artifact storage not configured

Directory structure: {artifactDir}/{sessionId}/[artifacts, videos/, tool-calls.json]

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-15 06:42:16 -06:00
e846cd509c feat: add video recording tools for browser sessions
Add three new MCP tools for recording browser automation:
- browser_start_recording: Enable video recording with configurable size/filename
- browser_stop_recording: Stop recording and return video file paths
- browser_recording_status: Check recording status and configuration

Key features:
- Automatic video saving when pages/contexts close
- Configurable video size and output directory
- Enhanced LLM guidance with clear workflow instructions
- Integration with existing browser context management

Videos are saved as .webm files in {outputDir}/videos/ directory.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 18:27:54 -06:00
christian-lms
288f1b863b
docs: Add LM Studio installation instructions (#688) 2025-07-23 08:22:13 -07:00
Pavel Feldman
b1a0f775cf
chore: save session log (#740) 2025-07-22 20:06:03 -07:00
Pavel Feldman
29711d07d3
chore: use streamable http by default (#716)
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-07-18 18:31:00 -07:00
Copilot
1eee30fd45
feat: add fullPage mode to browser_take_screenshot (#704) 2025-07-18 13:56:43 -07:00
Adam Gastineau
9f8441daa5
chore(docs): make VSCode match other README sections (#706) 2025-07-18 11:21:29 -07:00
Pavel Feldman
c97bc6e2ae
chore: allow right click (#687)
Fixes https://github.com/microsoft/playwright-mcp/issues/467
2025-07-17 13:24:05 -07:00
Pavel Feldman
9526910864
chore: sort install sections (#682) 2025-07-17 09:06:10 -07:00
Pavel Feldman
95454735bf
chore: remove image reply special case in cursor (#680) 2025-07-16 18:32:07 -07:00
Pavel Feldman
e9f6433241
chore: remove server experiment (#681) 2025-07-16 18:05:47 -07:00
Pavel Feldman
d61aa16fee
chore: turn vision into capability (#679)
Fixes https://github.com/microsoft/playwright-mcp/issues/420
2025-07-16 16:40:00 -07:00
Pavel Feldman
012c906500
chore: introduce browser_evaluate (#678)
Fixes https://github.com/microsoft/playwright-mcp/issues/424
2025-07-16 15:02:47 -07:00
Pavel Feldman
825a97d66e
chore: remove generate_test tool for now - it adds no value (#675) 2025-07-16 13:33:05 -07:00
Pavel Feldman
59f1d67a4e
feat(dblclick): add double click (#654)
Fixes https://github.com/microsoft/playwright-mcp/issues/652
2025-07-11 16:45:39 -07:00
おがどら
1600ba6645
docs: Update README about imageResponses option. (#646) 2025-07-09 17:40:22 -07:00
Joah Gerstenberg
127c996e86
docs: add instructions to install in Goose (#580) 2025-07-09 17:39:41 -07:00
Sandor Major
4bd39c07e9
docs: adding installation steps for Gemini CLI (#625)
I just tried it out with Gemini CLI and it works like a charm, thanks
for creating this MCP server!
2025-07-09 17:37:29 -07:00
Mehul Raheja
875bd3b6ec
fix(docs): Fix typo of windsurf in readme (#620) 2025-07-02 09:54:36 +02:00
jito(지토)
1dc4977ff9
docs: add Claude Code installation instructions (#553)
Add installation instructions for Claude Code CLI to the README.
2025-06-16 13:35:46 +02:00
Dan O'Brien
7dae68de78
docs: add instructions for MCP server in Qodo Gen (#530) 2025-06-08 10:38:24 -07:00
Peter Goldstein
60495ed9b0
docs: include Cursor One-Click in README.md (#531) 2025-06-08 10:37:48 -07:00
cranemont
0aaef661b1
docs(readme): fix connection method call in programmatic usage example (#532) 2025-06-08 10:36:27 -07:00
Pavel Feldman
0fb9646c4d
chore: experimental agent mode (#516) 2025-06-04 09:14:50 -07:00
nabepa
3cd74a824a
docs: fixed typo in README.md (#487) 2025-05-27 20:33:36 -07:00
Simon Knott
45f493da6c
chore: make library test run under older Node versions (#479) 2025-05-27 13:19:25 -07:00
Pavel Feldman
aa6ac51f92
feat(trace): allow saving trajectory as trace (#426) 2025-05-14 18:08:44 -07:00
Pavel Feldman
ab20175826
chore: generate readme options (#411) 2025-05-13 15:52:30 -07:00
Pavel Feldman
c506027aec
chore: run w/ sandbox by default (#412) 2025-05-13 15:30:02 -07:00
Pavel Feldman
7be0c8872e
feat(args): allow configuring proxy, UA, viewport, https errors (#410) 2025-05-13 14:40:03 -07:00
Pavel Feldman
ce72367208
feat(storage): allow passing storage state for isolated contexts (#409)
Fixes https://github.com/microsoft/playwright-mcp/issues/403
Ref https://github.com/microsoft/playwright-mcp/issues/367
2025-05-13 13:14:04 -07:00
Pavel Feldman
949f956378
feat(ephemeral): allow for non-persistent context operation (#405)
Ref: https://github.com/microsoft/playwright-mcp/issues/367
Ref: https://github.com/microsoft/playwright-mcp/issues/393
2025-05-12 18:18:53 -07:00
Pavel Feldman
a1eee8351e
chore: collapse readme (#404) 2025-05-12 16:42:47 -07:00
Taiga Mikami
65a229c79f
Fix import in README from createServer to createConnection (#396)
Probably, `createServer` is not from `@playwright/mcp`.
2025-05-12 08:46:21 -07:00
Pavel Feldman
c28b480b51
feat(wait): allow waiting for given text (#390)
Fixes https://github.com/microsoft/playwright-mcp/issues/389
2025-05-09 15:35:28 -07:00
Max Schmitt
65716b60dd
fix: createConnection() via public API (#384)
Fixes https://github.com/microsoft/playwright-mcp/issues/382
2025-05-09 21:50:38 +02:00
Max Schmitt
75f74a54bc
docs: reference to new Docker image (#380) 2025-05-09 21:01:10 +02:00
おがどら
85c85bd2fb
chore: support custom filename in screenshot function (#349) 2025-05-08 11:04:18 -07:00
Pavel Feldman
e95b5b1dd6
chore: get rid of connection factory (#362)
Drive-by User-Agent sniffing and disabling of image type in Cursor.
2025-05-06 14:27:28 -07:00
Pavel Feldman
d01aa19ffa
chore: annotate tools (#351)
Fixes https://github.com/microsoft/playwright-mcp/issues/215
2025-05-05 17:38:22 -07:00