Get the FREE Ultimate OpenClaw Setup Guide →

chrome-debug

An MCP server to allow you to debug webpages using LLMs

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio robertheadley-chrome-debug-mcp node path/to/server.js \
  --env DEBUG="true" \
  --env LOG_LEVEL="info"

How to use

Chrome Debug MCP Server provides a Playwright-based MCP implementation for controlling Chrome with debugging capabilities, Greasemonkey-style API support, and extension integration. It exposes commands to launch and manage browser instances, open and switch tabs, and perform page interactions like navigation, element interaction, and screenshot capture. The included Greasemonkey API support lets you store persistent values, inject CSS, perform cross-origin requests, and interact with the clipboard, enabling richer scriptable automation workflows. You can also configure request interception and logging to monitor network activity and apply custom blocking or modification rules. Use the provided tool commands to drive browser actions and GM-like operations in a scripted MCP context.

To use it, start the MCP server and issue tool browser commands via the MCP interface. For example, launch a browser session, create new tabs, and navigate to a URL. Then leverage GM-like functions to persist data (GM_setValue/GM_getValue), inject styles (GM_addStyle), or perform GM_xmlhttpRequest calls. You can also set up request interception patterns to block or log resources such as images or CSS, enabling controlled testing or automation scenarios within a Chromium-based browser context.

How to install

Prerequisites:

  • Node.js 14 or higher (Node.js 16+ recommended)
  • npm (comes with Node.js)
  • Internet access to install dependencies

Installation steps:

  1. Optional: clone the repository or install via npm if published as a package

  2. Install dependencies

    • npm install
  3. Start the MCP server (example using npm scripts or direct node invocation)

    • npm run start or
    • node path/to/server.js
  4. Verify the server is running by checking logs or hitting the MCP endpoint as documented in the repository.

  5. Connect your MCP client to the running server and begin issuing commands such as launching the browser, managing tabs, and using Greasemonkey-style APIs.

Additional notes

Tips and notes:

  • Ensure your Node.js version matches the minimum prerequisite stated in the README (Node.js 14+ recommended).
  • If you encounter permission or path issues, verify that the server entry point (path/to/server.js) exists and is executable.
  • The MCP server provides Greasemonkey API support; use GM_setValue/GM_getValue for persistent storage across sessions and GM_addStyle for CSS injection on loaded pages.
  • When configuring intercept_requests, provide patterns matching resource types you want to block or log (e.g., [".jpg", ".css"]).
  • For troubleshooting, enable verbose logs (LOG_LEVEL or DEBUG env vars) and check the logs directory for timestamped entries.
  • If using extensions, confirm Chrome/Chromium paths and user data directories are correctly set up to avoid conflicts with default profiles.

Related MCP Servers

Sponsor this space

Reach thousands of developers