Basic information
About Playwright MCP Project Server
A project to demonstrate Playwright MCP server usage with Jenkins pipeline
Playwright MCP Project is a MCP server in the Browser Automation category listed in the AddMCP.net directory, published by vikaskumarprofessional92. It exposes 30 tools, including browser_close, browser_resize, browser_console_messages, browser_handle_dialog and more. Supported transport: stdio. Runtime: html. License: Apache-2.0. Source code is hosted on github.com. Related topics: automation, jenkins, playwright.
Setup
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--vision"
]
}
}
}
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--vision"
]
}
}
}
{
"servers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--vision"
]
}
}
}
Playwright MCP Project config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--vision"
]
}
}
}
Playwright MCP Project tools
-
browser_close
— Close the page
(no parameters) -
browser_resize
— Resize the browser window
width:number*, height:number* -
browser_console_messages
— Returns all console messages
level:string*, all:boolean, filename:string -
browser_handle_dialog
— Handle a dialog
accept:boolean*, promptText:string -
browser_evaluate
— Evaluate JavaScript expression on page or element
element:string, target:string, function:string*, filename:string -
browser_file_upload
— Upload one or multiple files
paths:array -
browser_drop
— Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.
element:string, target:string*, paths:array, data:object -
browser_find
— Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.
text:string, regex:string -
browser_fill_form
— Fill multiple form fields
fields:array* -
browser_press_key
— Press a key on the keyboard
key:string* -
browser_type
— Type text into editable element
element:string, target:string*, text:string*, submit:boolean, slowly:boolean -
browser_mouse_move_xy
— Move mouse to a given position
x:number*, y:number* -
browser_mouse_click_xy
— Click mouse button at a given position
x:number*, y:number*, button:string, clickCount:number, delay:number -
browser_mouse_drag_xy
— Drag left mouse button to a given position
startX:number*, startY:number*, endX:number*, endY:number* -
browser_mouse_down
— Press mouse down
button:string -
browser_mouse_up
— Press mouse up
button:string -
browser_mouse_wheel
— Scroll mouse wheel
deltaX:number*, deltaY:number* -
browser_navigate
— Navigate to a URL
url:string* -
browser_navigate_back
— Go back to the previous page in the history
(no parameters) -
browser_network_requests
— Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.
static:boolean*, filter:string, filename:string -
browser_network_request
— Returns full details (headers and body) of a single network request, or a single part if `part` is set. Use the number from browser_network_requests.
index:integer*, part:string, filename:string -
browser_run_code_unsafe
— Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.
code:string, filename:string -
browser_take_screenshot
— Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
element:string, target:string, type:string, filename:string, fullPage:boolean, scale:string* -
browser_snapshot
— Capture accessibility snapshot of the current page, this is better than screenshot
target:string, filename:string, depth:number, boxes:boolean -
browser_click
— Perform click on a web page
element:string, target:string*, doubleClick:boolean, button:string, modifiers:array -
browser_drag
— Perform drag and drop between two elements
startElement:string, startTarget:string*, endElement:string, endTarget:string* -
browser_hover
— Hover over element on page
element:string, target:string* -
browser_select_option
— Select an option in a dropdown
element:string, target:string*, values:array* -
browser_tabs
— List, create, close, or select a browser tab.
action:string*, index:number, url:string -
browser_wait_for
— Wait for text to appear or disappear or a specified time to pass
time:number, text:string, textGone:string
Overview
What is Playwright MCP Project?
It is a project that demonstrates using the Playwright MCP server with a Jenkins pipeline. It provides test specifications and CI configuration for running Playwright tests with MCP.
How to use Playwright MCP Project?
Clone the repository, install dependencies with npm install, configure the MCP server in settings.json with the command npx @playwright/mcp@latest --vision, then run tests with npx playwright test.
Key features of Playwright MCP Project
- Demonstrates Playwright MCP server integration
- Includes Jenkins pipeline configuration
- Provides example test specifications
- Uses vision mode for Playwright MCP
- Requires Node.js and npm
Use cases of Playwright MCP Project
- Running automated browser tests in a CI pipeline
- Demonstrating MCP server setup for Playwright
- Testing web application navigation, e.g., Google.ca
Frequently asked questions
1 What are the prerequisites?
Node.js and npm must be installed on your machine.
2 How do I install the dependencies?
Run npm install after cloning the repository.
3 How do I configure the MCP server?
Add the configuration to settings.json with command npx and args ["@playwright/mcp@latest", "--vision"].
4 How do I run the tests?
Use the command npx playwright test.
5 Is there Jenkins integration?
Yes, the project includes a Jenkins pipeline that installs dependencies, runs tests, and generates and publishes test reports.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In