The Chrome Debug MCP Playwright server is a browser automation tool built on the Model Context Protocol. It enables browser control with Playwright and offers Greasemonkey API compatibility for enhanced web page interaction.
To install the server, run:
npm install chrome-debug-mcp-playwright
To start a new browser session:
tool browser launch_browser --url "https://example.com" --browserType "chromium"
The command launches a Chromium browser and navigates to the specified URL.
You can create and manage multiple tabs:
// Create a new tab
tool browser create_tab --url "https://example.com"
// Switch between tabs
tool browser switch_tab --index 1
The server provides tools for interacting with web pages:
// Click elements
tool browser click --selector "#submit-button"
// Type text
tool browser type --selector "#search-input" --text "search query"
// Take screenshots
tool browser screenshot --path "screenshot.png"
Add custom CSS to web pages:
tool browser gm_addStyle --css "body { background: #f0f0f0; }"
Store and retrieve data:
// Save a value
tool browser gm_setValue --key "setting" --value "test"
// Retrieve a value
tool browser gm_getValue --key "setting"
// Delete a value
tool browser gm_deleteValue --key "setting"
Make requests to different domains:
tool browser gm_xmlhttpRequest --url "https://api.example.com/data" --method "GET"
Display notifications and access clipboard:
// Show a notification
tool browser gm_notification --text "Download complete" --title "Status"
// Copy to clipboard
tool browser gm_setClipboard --text "Copied text"
Control network requests to block resources or modify content:
// Block image loading
tool browser intercept_requests --patterns ["*.jpg", "*.png"] --action "block"
// Log all CSS requests
tool browser intercept_requests --patterns ["*.css"] --action "log"
// Modify request headers
tool browser intercept_requests --patterns ["api.example.com/*"] --action "modify" --modifications {"headers": {"Authorization": "Bearer token"}}
The server includes a comprehensive logging system that organizes debug information in timestamped log files, keeping the interface output clean while maintaining detailed records for troubleshooting.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "chrome-debug" '{"command":"node","args":["path/to/chrome-debug-mcp/build/index.js"],"disabled":false,"alwaysAllow":[]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"chrome-debug": {
"command": "node",
"args": [
"path/to/chrome-debug-mcp/build/index.js"
],
"disabled": false,
"alwaysAllow": []
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"chrome-debug": {
"command": "node",
"args": [
"path/to/chrome-debug-mcp/build/index.js"
],
"disabled": false,
"alwaysAllow": []
}
}
}
3. Restart Claude Desktop for the changes to take effect