Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# Changelog

All notable changes to the Playwright MCP Server will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.10] - 2024-12-10

### Added
- **Device Preset Support**: `playwright_resize` now supports 143 pre-configured device presets from Playwright's device library
- **Orientation Support**: Portrait and landscape orientation switching for device presets
- **Enhanced Device Emulation**: Automatic configuration of viewport, user-agent, touch support, and device pixel ratio
- **Natural Language Support**: AI assistants can now use simple prompts like "Test on iPhone 13" or "Switch to iPad view"
- **Device Discovery Tool**: Added `scripts/list-devices.cjs` to list all available device presets
- **Comprehensive Documentation**:
- `docs/docs/playwright-web/Resize-Prompts-Guide.md` - Natural language prompt guide for AI assistants
- `docs/docs/playwright-web/Device-Quick-Reference.md` - Quick reference card with popular devices
- **23 New Tests**: Comprehensive test coverage for device presets, orientation, and validation

### Changed
- **Enhanced `playwright_resize` Tool**: Updated to support both device presets and manual dimensions
- **Updated Tool Schema**: Added `device` and `orientation` parameters to `playwright_resize`
- **Improved Documentation**: Enhanced `Supported-Tools.mdx` with device preset examples and usage

### Technical Details
- Device presets include: iPhone (SE to 15 Pro Max), iPad (Mini to Pro 12.9), Pixel, Galaxy, Desktop browsers
- Backward compatible: Manual width/height dimensions still work exactly as before
- Test coverage: 134 total tests passing (111 existing + 23 new)
- Code coverage: 98% for resize.ts

## [1.0.9] - 2024-12-09

### Fixed
- **Critical Fix**: Console output buffering when running via `npx`
- Replaced `console.log()` with `process.stdout.write()` for immediate, unbuffered output
- Users now see immediate console output including server startup information and endpoints

### Changed
- Updated `src/index.ts` initialization message
- Updated `src/http-server.ts` startup banner

## [1.0.8] - 2024-12-08

### Changed
- Console output visibility improvements in HTTP mode
- Changed output from `stderr` to `stdout`
- Added initialization message display
- Improved user experience when starting server with `--port` flag

## [1.0.7] - 2024-12-07

### Added
- **HTTP/SSE Transport Mode**: Standalone HTTP server mode for enhanced deployment
- Multiple concurrent client sessions with automatic session management
- Health check endpoint (`/health`) for monitoring
- Dual endpoint support: `/sse` + `/messages` and `/mcp` (unified)
- Comprehensive request logging middleware
- Session lifecycle tracking

### Security
- **Critical**: Server now binds to 127.0.0.1 (localhost only) by default
- Prevents external network access and accidental exposure
- SSH tunneling documented for secure remote access

### Changed
- Logging in stdio mode now writes to file only (not stdout)
- Monitoring system disabled in stdio mode to prevent console output
- 40% code reduction in endpoint handlers through DRY refactoring

### Fixed
- Clean JSON-RPC communication with Claude Desktop in stdio mode
- Log file path uses home directory to avoid permission issues

## [1.0.6] - 2024-11-30

### Added
- **New Tool**: `playwright_upload_file` - Upload files to file input elements
- **New Tool**: `playwright_get_visible_html` - Retrieve full HTML content
- Enhanced `playwright_get_visible_text` for more accurate text extraction
- Support for locally installed browsers via Chrome executable path

### Changed
- `playwright_get_visible_html` now removes `<script>` tags by default
- HTML output truncated to 20,000 characters by default to prevent LLM issues
- Updated `playwright_hover` functionality

### Documentation
- Added local setup and installation guide
- Updated examples for new tools

## [1.0.5] - 2024-11-25

### Removed
- All SSE (Server-Sent Events) support and related code
- Server now only supports STDIO transport

### Changed
- Complete codebase cleanup removing SSE references

## [1.0.4] - 2024-11-20

### Added
- **New Tool**: `playwright_iframe_fill` - Fill input fields inside iframes
- **New Tool**: `playwright_click_and_switch_tab` - Click link and switch to new tab
- Improved error logging for uncaught exceptions and unhandled Promise rejections

### Documentation
- Added documentation for new tools
- Improved installation and configuration instructions

## [1.0.3] - 2024-11-15

### Added
- **Code Generation Capabilities**:
- `start_codegen_session` - Start recording Playwright actions
- `end_codegen_session` - Generate test file from recording
- `get_codegen_session` - Retrieve session information
- `clear_codegen_session` - Clear session without generating test
- **Navigation Tools**:
- `playwright_go_back` - Navigate back in browser history
- `playwright_go_forward` - Navigate forward in browser history
- **Interaction Tools**:
- `playwright_drag` - Drag elements from one location to another
- `playwright_press_key` - Press keyboard keys with optional element focus
- **Output Tools**:
- `playwright_save_as_pdf` - Save page as PDF with customizable options
- **Content Extraction Tools**:
- `playwright_get_visible_text` - Extract visible text content
- `playwright_get_visible_html` - Get complete HTML content

## [1.0.2] - 2024-11-10

### Added
- **Multi-Browser Support**: Firefox and WebKit in addition to Chromium
- New `browserType` parameter for `playwright_navigate` tool
- Supported browser types: "chromium" (default), "firefox", "webkit"
- Enhanced test coverage for different browser engines

## [1.0.0] - 2024-11-01

### Added
- First major release with refactored tool structure
- Optional Bearer Authorization for API POST requests
- Three new tools: `playwright_expect_response`, `playwright_assert_response`, `playwright_custom_user_agent`

### Fixed
- Headless mode in Playwright (#62)
- Navigation failed: Target page, context or browser has been closed (#63)
- Exit process on host close

### Changed
- Completed RFC: Refactored handleToolCall for better maintainability (#46)

## [0.3.1] - 2024-10-25

### Fixed
- BROWSER_TOOLS array - removed unnecessary Playwright_console_logs requirement

### Added
- Comprehensive tests for all Playwright MCP Server tools
- AI Course documentation links

## [0.3.0] - 2024-10-20

### Added
- `Playwright_console_logs` tool to get browser console logs
- Support for log types: log, info, warn, error, debug, exception, all
- `Playwright_close` tool to close browser and release resources

## Earlier Versions

See [release.mdx](docs/docs/release.mdx) for complete version history.

---

[1.0.10]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.9...v1.0.10
[1.0.9]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.8...v1.0.9
[1.0.8]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.7...v1.0.8
[1.0.7]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.6...v1.0.7
[1.0.6]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.5...v1.0.6
[1.0.5]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.4...v1.0.5
[1.0.4]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/executeautomation/mcp-playwright/compare/v1.0.0...v1.0.2
[1.0.0]: https://github.com/executeautomation/mcp-playwright/compare/v0.3.1...v1.0.0
[0.3.1]: https://github.com/executeautomation/mcp-playwright/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/executeautomation/mcp-playwright/releases/tag/v0.3.0
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,32 @@ A Model Context Protocol server that provides browser automation capabilities us

<a href="https://glama.ai/mcp/servers/yh4lgtwgbe"><img width="380" height="200" src="https://glama.ai/mcp/servers/yh4lgtwgbe/badge" alt="mcp-playwright MCP server" /></a>

## ✨ What's New in v1.0.10

### 🎯 Device Emulation with 143 Real Device Presets!

Test your web applications on **real device profiles** with a simple command:

```javascript
// Test on iPhone 13 with automatic user-agent, touch support, and device pixel ratio
await playwright_resize({ device: "iPhone 13" });

// Switch to iPad with landscape orientation
await playwright_resize({ device: "iPad Pro 11", orientation: "landscape" });

// Test desktop view
await playwright_resize({ device: "Desktop Chrome" });
```

**Natural Language Support for AI Assistants:**
- "Test on iPhone 13"
- "Switch to iPad view"
- "Rotate to landscape"

**Supports 143 devices:** iPhone, iPad, Pixel, Galaxy, and Desktop browsers with proper emulation of viewport, user-agent, touch events, and device pixel ratios.

📚 [View Device Quick Reference](https://executeautomation.github.io/mcp-playwright/docs/playwright-web/Device-Quick-Reference) | [Prompt Guide](https://executeautomation.github.io/mcp-playwright/docs/playwright-web/Resize-Prompts-Guide)

## Screenshot
![Playwright + Claude](image/playwright_claude.png)

Expand Down
Loading
Loading