Chrome Debug MCP server

Provides powerful browser control capabilities through Chrome DevTools Protocol and Puppeteer, enabling advanced web automation, scraping, and testing tasks.
Back to servers
Setup instructions
Provider
Robert Headley
Release date
Mar 06, 2025
Language
TypeScript
Stats
34 stars

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.

Installation

To install the server, run:

npm install chrome-debug-mcp-playwright

Basic Usage

Launching a Browser

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.

Managing Tabs

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

Working with Web Pages

Page Interaction

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"

Greasemonkey API Support

Injecting Styles

Add custom CSS to web pages:

tool browser gm_addStyle --css "body { background: #f0f0f0; }"

Data Storage

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"

Cross-Origin Requests

Make requests to different domains:

tool browser gm_xmlhttpRequest --url "https://api.example.com/data" --method "GET"

Notifications and Clipboard

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"

Network Control

Intercepting Requests

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"}}

Debugging

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.

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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": []
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later