Automate web browsers and perform web scraping tasks using the Playwright framework.
\A MCP server with playwright tools\
The server implements a simple note storage system with:
The server provides a single prompt:
The server implements the following tools:
playwright_navigate
: Navigates to a specified URL. This operation will automatically create a new session if there is no active session.
url
argument (string).playwright_screenshot
: Takes a screenshot of the current page or a specific element.
name
argument (string) for the screenshot file name.selector
argument (string) to specify a CSS selector for the element to screenshot. If no selector is provided, a full-page screenshot is taken.playwright_click
: Clicks an element on the page using a CSS selector.
selector
argument (string) to specify the CSS selector for the element to click.playwright_fill
: Fills out an input field.
selector
argument (string) to specify the CSS selector for the input field.value
argument (string) to specify the value to fill.playwright_evaluate
: Executes JavaScript code in the browser console.
script
argument (string) to specify the JavaScript code to execute.playwright_click_text
: Clicks an element on the page by its text content.
text
argument (string) to specify the text content of the element to click.playwright_get_text_content
: Get the text content of all visiable elements.playwright_get_html_content
: Get the HTML content of the page.
selector
argument (string) to specify the CSS selector for the element.[TODO: Add configuration details specific to your implementation]
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
To prepare the package for distribution:
uv sync
uv build
This will create source and wheel distributions in the dist/
directory.
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
--token
or UV_PUBLISH_TOKEN
--username
/UV_PUBLISH_USERNAME
and --password
/UV_PUBLISH_PASSWORD
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm
with this command:
npx @modelcontextprotocol/inspector uv --directory C:\Users\YUNYING\Documents\project\python\mcp\playwright-server run playwright-server
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Execute XPath queries on XML content.
Fetch Bilibili video comments in bulk, including nested replies. Requires a Bilibili cookie for authentication.
Attaches to existing browser sessions using the Chrome DevTools Protocol for automation and interaction.
Control a browser for web automation tasks using Playwright on Cloudflare Workers.
High-quality screenshot capture optimized for Claude Vision API. Automatically tiles full pages into 1072x1072 chunks (1.15 megapixels) with configurable viewports and wait strategies for dynamic content.
An automated tool to search notes, retrieve content, and post comments on Xiaohongshu (RedBook) using Playwright.
Secure fetch to prevent access to local resources
AI tools for web scraping, crawling, browser control, and web search via the Oxylabs AI Studio API.
Extract web data with Firecrawl
Fetches cigarette data and information from Yanyue.cn.