- Home
- MCP servers
- Playwright
Playwright
- python
175
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"blackwhite084-playwright-plus-python-mcp": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\xxxxx\\Documents\\project\\python\\mcp\\playwright-server",
"run",
"playwright-server"
]
}
}
}This MCP server provides a programmable interface around Playwright tooling, enabling you to store notes, generate summaries, and automate browser actions through clear, scriptable endpoints. It exposes a simple note storage resource and a set of Playwright-based tools that you can invoke from your MCP client to navigate pages, take screenshots, fill forms, and extract content.
How to use
You connect to this MCP server from your MCP client and use the exposed tools to interact with web pages and manage notes. The available tools perform common browser automation tasks and return results you can use in your workflow. For example, you can navigate to a URL, capture a screenshot, click elements by CSS selectors, fill inputs, and evaluate JavaScript in the page context. You can also request summaries of all stored notes.
A typical usage flow looks like this: 1) Navigate to a page URL, 2) Interact with the page by clicking or filling fields, 3) Take a screenshot for verification, 4) Retrieve text content or HTML from elements, and 5) Generate a summary of stored notes to keep your notes organized.
How to install
Prerequisites: You need the MCP runtime environment available on your system. This server is configured to run as a stdio MCP server, so you will start it as a local process and connect to it from your MCP client.
- Add the server configuration to your MCP client under mcpServers. Use the provided stdio configuration for a local server. 2) Start the server using the runtime command shown in the configuration snippet. 3) Connect your MCP client to the started server and begin issuing tool calls.
"mcpServers": {
"playwright_server": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"C:\\Users\\xxxxx\\Documents\\project\\python\\mcp\\playwright-server",
"run",
"playwright-server"
]
}
}
Notes and how to get started quickly
If you are using the published MCP configuration, you can start the server with the runtime command that corresponds to the published setup. For example, with a published configuration you can start the server using the runtime command and arguments that point to the server name in your environment.
A quick reference for common commands used with this server is provided in the configuration examples above. If you are developing locally, you can switch to the development startup snippet which uses a directory path to the server source and runs the server via the development runtime.
Notes on configuration and security
Keep your MCP client configuration secure and limit access to the server to trusted environments. The server exposes automated browser actions, which can interact with authenticated sessions and sensitive data on visited pages.
Available tools
playwright_navigate
Navigates to a specified URL and automatically creates a new session if there is no active session. Requires a url argument that provides the target URL.
playwright_screenshot
Takes a screenshot of the current page or a specific element. Requires a name argument for the screenshot file and an optional selector to target an element; omitting the selector captures a full-page screenshot.
playwright_click
Clicks an element on the page using a CSS selector. Requires a selector argument to identify the element.
playwright_fill
Fills an input field on the page. Requires a selector to locate the input and a value to insert.
playwright_evaluate
Executes JavaScript code in the browser console. Requires a script argument containing the JavaScript to run.
playwright_click_text
Clicks an element based on its visible text content. Requires a text argument to identify the element by its text.
playwright_get_text_content
Retrieves the text content from all visible elements on the current page, returning a list of strings.
playwright_get_html_content
Gets the HTML content of a selected element. Requires a selector to locate the element and returns its HTML structure.