Playwright MCP Server
A microservice that exposes Playwright browser automation capabilities through the MCP (Microservice Communication Protocol) interface.
Features
- Launch browser pages with specified URLs
- Take screenshots of web pages
- Manage multiple browser instances
- Clean browser resources efficiently
- Get page titles and other information
Installation
From PyPI
pip install playwright-mcp-server
From Source
git clone https://github.com/yourusername/playwright-mcp-server.git
cd playwright-mcp-server
pip install -e .
After installation, you'll need to install the Playwright browser binaries:
playwright install
Usage
As a Command Line Tool
After installation, you can run the server directly from the command line:
playwright-mcp-server
As a Library
from playwright_mcp_server import run_server
# Start the server
run_server()
Available Tools
The MCP server exposes the following tools:
- launch_page(webPageURL): Launch a new page with the given URL
- close_page(page_id): Close the page with the given ID
- take_screenshot(page_id, screenshotPath): Take a screenshot of the page
- get_page_title(page_id): Get the title of the page
- get_active_pages(): Get information about all active pages
- cleanup(): Clean up all Playwright resources
Project Structure
playwright-mcp-server/
├── playwright_mcp_server/
│ ├── __init__.py
│ ├── main.py
│ └── playwrightHandler.py
├── setup.py
└── README.md
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for playwright-mcp-server 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| playwright_mcp_server-0.1.0.tar.gz | 7.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| playwright_mcp_server-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / playwright_mcp_server-0.1.0.tar.gz
| Download URL | playwright_mcp_server-0.1.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a59ab703c843f7a2be22059f157b2f66c8048027d73fccd004f88a36b08f4029
|
|
BLAKE2b-256 checksum How to use checksums |
7ccd02d5635c98feff4c57ee21372a0e7c62ce4fcc255bf9010279cb95f6df05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.1
|
Release files / playwright_mcp_server-0.1.0-py3-none-any.whl
| Download URL | playwright_mcp_server-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
645a4e0d3da20855b39801d020a31b12353325ec852f807a9c5359890856809d
|
|
BLAKE2b-256 checksum How to use checksums |
301c6f5bcadf5846525ab54dca92c61d6bdcb983c7c864913aba9678bf20163d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.1
|
Security for playwright-mcp-server 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.