home / mcp / playwright mcp server
Exposes Playwright-based tools to automate browsing, capture content, and summarize stored notes via an MCP client.
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.
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.
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.
1) 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"
]
}
}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.
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.
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.
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.
Clicks an element on the page using a CSS selector. Requires a selector argument to identify the element.
Fills an input field on the page. Requires a selector to locate the input and a value to insert.
Executes JavaScript code in the browser console. Requires a script argument containing the JavaScript to run.
Clicks an element based on its visible text content. Requires a text argument to identify the element by its text.
Retrieves the text content from all visible elements on the current page, returning a list of strings.
Gets the HTML content of a selected element. Requires a selector to locate the element and returns its HTML structure.