mcp-server-playwright
@hdcola
关于 mcp-server-playwright
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-server-playwright": {
"command": "bun",
"args": [
"yourpath/mcp-server-playwright/src/index.ts"
],
"env": {
"CHROME_PATH": "",
"MUSER_DATA_DIR": ""
}
}
}
}工具
6browser(url) : Open a browser with the specified URL(option).
page(pageNumber: int) : Close a desiginated page in current browser.
browser() : Close the browser.
page(url) : Navigate to the specified URL.
page(url) : Open a page in a new tab.
content() : Get the readability content of the current page.
概览
What is mcp-server-playwright?
mcp-server-playwright is an experimental MCP server that uses Playwright to control a browser, enabling AI-driven browser automation. It provides a set of tools to open, close, and navigate browser pages programmatically.
How to use mcp-server-playwright?
Install dependencies with pnpm install (requires bun and pnpm). Configure your MCP client with the JSON shown in the README, setting the CHROME_PATH and MUSER_DATA_DIR environment variables. Then invoke the available tools through your MCP client.
Key features of mcp-server-playwright
- Open a browser with an optional URL.
- Close a specific page by page number.
- Close the entire browser.
- Navigate to a specified URL.
- Open a new page in a new tab.
- Get readability content of the current page.
Use cases of mcp-server-playwright
- Automate web browsing tasks via AI assistants.
- Extract readable content from web pages programmatically.
- Control multiple browser tabs for testing or scraping.
- Integrate browser actions into MCP-powered workflows.
FAQ from mcp-server-playwright
What runtime dependencies does it require?
It requires bun and pnpm installed on your system. The server is run with bun.
How do I configure the Chrome browser path?
Set the CHROME_PATH environment variable in the MCP configuration to the path of your Chrome executable. Also set MUSER_DATA_DIR to your Chrome user data directory.
What tools are available?
Tools include: open-browser, close-page, close-browser, navigate-to-page, open-new-page, and get-page-content. Each tool has its own parameters as described in the README.
Is this project production-ready?
No, it is described as an experimental project aimed at implementing browser control through AI.
Where does the browser data live?
The user data directory is specified via the MUSER_DATA_DIR environment variable, which points to the Chrome user data path on your local machine.
浏览器自动化 分类下的更多 MCP 服务器
mcp-browser-use: MCP server for browser-use
vinayak-mehtaMCP server for browser-use
Puppeteer Vision Mcp Server
djannotUmut Naci
firecrawlThe API to search, scrape, and interact with the web at scale. 🔥
BrowserTools MCP
AgentDeskAIMonitor browser logs directly from Cursor and other MCP compatible IDEs.
评论