ChromeDPのロゴ

ChromeDP

コミュニティ
kepatrick

MCP server for browser automation using chromedp

公開者kepatrick
リポジトリchromedp-mcp
言語Go
フォーク
3
スター
13
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    ChromeDPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには13件のスターと3件のフォークがあります。

chromedp-mcp

A Model Context Protocol (MCP) server that provides browser automation capabilities using chromedp. This server enables AI assistants to interact with web pages, manage browser instances, and perform various web automation tasks.

⚠️ Development Status

This project is currently under development. Some features may be incomplete, unstable, or contain bugs. Use with caution and please report any issues you encounter.

Features

  • Multi-instance Chrome Management: Create and manage multiple Chrome browser instances with extensive configuration options (headless mode, security settings, performance optimization)
  • Complete Page Navigation: Navigate to URLs, browser history navigation (back/forward)
  • Element Interaction: Find, click, and interact with web page elements using various selectors
  • Form Operations: Input text, set values directly
  • Cookie Management: Set and manage browser cookies for session handling
  • File Operations: Download files and images from web pages
  • PDF Generation: Convert web pages or HTML content to PDF documents
  • Keyboard Simulation: Send keyboard events, key combinations, and modifier keys with comprehensive key support
  • Screen Capture: Take screenshots of web pages for visual analysis
  • DOM Tree Extraction: Get clean DOM structures without scripts/styles for analysis

LLM Decision Support

chromedp-mcp provides web page information to LLMs, enabling AI to make decisions:

Visual Information

Provided through screenshot tool:

  • Complete page screenshots: Actual visual representation of web pages including layout, colors, images
  • Element positioning: LLMs can see exact positions and appearance of buttons, links, forms and other elements
  • Page state identification: Detect loading states, popups, error messages and other visual indicators
  • Responsive layout understanding: Comprehend page presentation across different viewport sizes

Structured Information

Provided through DOM-related tools:

  • Clean DOM structure (get-all-elements): Pure HTML structure with scripts and styles removed
  • Specific element details (select-element): Element tree structure at specified depth
  • Text content extraction (get-element-withtext): Element information containing specific text
  • Element attribute data: ID, class, data-* and other attribute values

Available Tools

For detailed tool specifications,and parameters, see Tools Specification

Instance Management

  • create-chrome-instance - Create a new Chrome browser instance with extensive configuration options (headless mode, security settings, performance options)
  • close - Close a specific Chrome browser instance

Page Navigation

  • navigate - Navigate to a specified URL and return clean DOM structure
  • navigate-back - Navigate to previous page in browser history
  • navigate-forward - Navigate to next page in browser history

Element Operations

  • get-element-withtext - Find and retrieve information about a specific element with text content
  • get-all-elements - Get all elements of current page as clean DOM tree structure
  • select-element - Select element by CSS selector and return clean DOM structure at specified depth
  • click-element - Click on an element with support for different click types (left, right, double)

Visual Information Access

  • screenshot - Capture screenshots of web pages for visual analysis and layout understanding

Input Operations

  • send-key - Send keyboard input to specified elements
  • set-value - Directly set the value of form elements
  • key-event - Send specific keyboard events and combinations with modifier keys

Cookie Management

  • set-cookie - Set HTTP cookies with full control over domain, path, security, and expiration settings

File Operations

  • download-file - Download files by clicking download links or buttons
  • download_image - Download images from URL or by selector

Document Generation

  • generate_pdf - Generate PDF from HTML content or URL

Other

  • tips - Important usage tips and best practices for Chrome automation tools (recommended to check first)

Requirements

  • Chrome/Chromium Browser: Must be installed and accessible in system PATH
  • Go: Version 1.19 or higher for building from source

Environment Configuration

The following environment variables can be configured for Chrome management:

VariableDescriptionDefault
CHROME_MAXIMUM_INSTANCEMaximum concurrent Chrome instances5
CHROME_TTLInstance time-to-live in minutes15
CHROME_EXE_TIMEOUTOperation timeout in seconds300

These can be configured through your MCP client configuration or environment variables.

Setup

1. Clone the repository:

bash
git clone https://github.com/KePatrick/chromedp-mcp.git

cd chromedp-mcp

2. Build the project:

Windows

bash
go build -o chromedp-mcp.exe .\cmd\chromedp-mcp\main.go

Linux/MacOs

bash
go build -o chromedp-mcp ./cmd/chromedp-mcp/main.go

3. MCP Client Configuration

Configure your MCP-compatible client to use this server:

Basic Configuration:

json
{
  "mcpServers": {
    "chromedp-mcp": {
      "command": "/path/to/chromedp-mcp",
      "args": []
    }
  }
}

With Environment Variables:

json
{
  "mcpServers": {
    "chromedp-mcp": {
      "command": "/path/to/chromedp-mcp",
      "args": [],
      "env": {
        "CHROME_MAXIMUM_INSTANCE": "10",
        "CHROME_TTL": "30",
        "CHROME_EXE_TIMEOUT": "600"
      }
    }
  }
}

Important Notes

  • Always close instances when done to free resources
  • Respect website terms of service and robots.txt
  • Some websites may have anti-automation measures

ChromeDPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度ChromeDPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

ChromeDPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. ChromeDPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "chromedp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてChromeDPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. ChromeDPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
ChromeDPを使ってこのタスクを手伝ってもらえますか?
ChromeDP
はい、読みました。
ChromeDPで調べた結果をお伝えします。

よくある質問

ChromeDP MCPサーバーは何に使いますか?

ChromeDPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでChromeDP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでChromeDPを利用できます。

TypingMindでChromeDP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。ChromeDPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

ChromeDP MCPをTypingMindに接続するにはどうすればよいですか?

ChromeDPはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでChromeDP MCPのどのようなツールを利用できますか?

ChromeDPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

ChromeDP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。ChromeDPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇