Playwright MCP
Playwright wrapper for MCP that enables LLM-powered clients to control a browser for automation tasks.
README
playwright-mcp
Playwright wrapper for MCP (Model Context Protocol). This server enables LLM-powered clients to control a browser for automation tasks.
Components
Resources
The server exposes resources for accessing browser screenshots:
- Screenshot resource URI:
screenshot://{page_id} - Screenshot resources are automatically available for all open pages
Prompts
The server provides a prompt to help clients interpret web pages:
interpret-page: Analyzes the current web page content and structure- Optional
page_idargument to select which page to interpret - Optional
focusargument to focus on specific aspects (full, forms, navigation, text) - Returns both text analysis and a screenshot of the page
- Optional
Tools
The server implements a comprehensive set of browser automation tools:
-
Browser navigation
navigate: Go to a specific URLnew_page: Create a new browser page with a specific IDswitch_page: Switch to a different browser pageget_pages: List all available browser pages
-
Page interaction
click: Click on an element using CSS selectortype: Type text into an input elementwait_for_selector: Wait for an element to appear on the page
-
Content extraction
get_text: Get text content from an elementget_page_content: Get the entire page HTMLtake_screenshot: Capture visual state of the page or element
Configuration
Install Dependencies
uv add playwright
playwright install chromium
Quickstart
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
<details> <summary>Development/Unpublished Servers Configuration</summary>
"mcpServers": {
"playwright-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/shannon/Workspace/artivus/playwright-mcp",
"run",
"playwright-mcp"
]
}
}
</details>
<details> <summary>Published Servers Configuration</summary>
"mcpServers": {
"playwright-mcp": {
"command": "uvx",
"args": [
"playwright-mcp"
]
}
}
</details>
Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
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 /Users/shannon/Workspace/artivus/playwright-mcp run playwright-mcp
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.