playwright mcp server
Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.
Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.
English | 日本語
This project is a server that provides Playwright web page content retrieval functionality using the Model Context Protocol (MCP).
To install Playwright MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @showfive/playwright-mcp-server --client claude
npm install
npm run build
npm start
The following tools are available:
navigate
{ url: string }
Returns: Navigation result
get_all_content
Returns: All text content from the page
get_visible_content
{ minVisiblePercentage?: number }
Returns: Visible text content
get_interactive_elements
Returns: Coordinates and boundary information of interactive elements
move_mouse
{ x: number, y: number }
Returns: Operation result
mouse_click
{ x: number, y: number, button?: "left" | "right" | "middle", clickCount?: number }
Returns: Click operation result
mouse_wheel
{ deltaY: number, deltaX?: number }
Returns: Scroll operation result
drag_and_drop
{ sourceX: number, sourceY: number, targetX: number, targetY: number }
Returns: Drag and drop operation result
echo
{ message: string }
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
tools/*.test.ts
: Function tests for each toolmcp-server.test.ts
: MCP server function testsProper HTML parsing
Interaction
Drag and drop support
Error Handling
Invalid URL detection
Configuration Flexibility
ISC