chrome-tools-MCP logo

Chrome Tools MCP

by nicholmikey

4 forks
11 stars
Free

What is chrome-tools-MCP

chrome-tools-MCP is a server provided by the company nicholmikey that facilitates advanced interactions with the Google Chrome browser using the DevTools Protocol. This tool allows users to remotely control Chrome tabs, perform actions like executing JavaScript, capturing screenshots, monitoring network traffic, and more. By leveraging this server, users can programmatically manipulate browser states, making it especially useful for tasks that require manual browser configuration before automated interactions.

How to Use chrome-tools-MCP

Using chrome-tools-MCP involves setting up the server to communicate with Google Chrome's remote debugging interface. The process begins with installing the necessary package, followed by configuring environment settings to establish a connection with Chrome.

Installation

To install the server, use the following command:

npm install @nicholmikey/chrome-tools

Configuration

Configure the server via environment variables in your MCP settings, specifying details such as the Chrome debugging URL and connection type. This setup can be tailored for different environments, including native systems, Windows Subsystem for Linux (WSL), and Docker.

Setup Steps

  1. Launch Chrome with Remote Debugging:

    • For Windows, Mac, or Linux, use a command to start Chrome with the --remote-debugging-port=9222 option.
  2. Configure MCP Settings:

    • Define the CHROME_DEBUG_URL and CHROME_CONNECTION_TYPE in your configuration file to match your setup, whether it's direct, via SSH tunnel, or Docker.
  3. Environment Specific Adjustments:

    • For WSL, establish an SSH tunnel.
    • For Docker, run a Chrome container with the appropriate port mapping.

Key Features of chrome-tools-MCP

chrome-tools-MCP offers a suite of powerful features designed to enhance the way you interact with Chrome:

  • List Chrome Tabs: Retrieve a list of all open tabs in Chrome.
  • Execute JavaScript: Run custom JavaScript code within any open tab.
  • Capture Screenshots: Take screenshots of tabs with options for format and quality, optimized for AI model use.
  • Monitor Network Traffic: Capture and analyze network events to understand browser interactions.
  • Navigate Tabs to URLs: Programmatically direct any tab to a desired URL.
  • Query DOM Elements: Extract detailed information from DOM elements using CSS selectors.
  • Click Elements with Console Output Capture: Simulate clicks on elements and capture any console output resulting from these interactions.

These features are essential for developers and AI enthusiasts who need robust control over Chrome for automated testing, data extraction, or enhancing AI tool capabilities. With its comprehensive suite of tools, chrome-tools-MCP serves as a versatile solution for integrating browser control into various applications.

How to Use

To use the chrome-tools-MCP, follow these steps:

  1. Visit https://github.com/nichol...
  2. Follow the setup instructions to create an account (if required)
  3. Connect the MCP server to your Claude Desktop application
  4. Start using chrome-tools-MCP capabilities within your Claude conversations

Additional Information

Created

February 17, 2025

Start building your own MCP Server

Interested in creating your own MCP Server? Check out the official documentation and resources.

Learn More