Logo ChromeDP

ChromeDP

Cộng đồng
kepatrick

MCP server for browser automation using chromedp

Nhà phát hànhkepatrick
Kho mãchromedp-mcp
Ngôn ngữGo
Bản fork
3
Sao
13
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    ChromeDP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    13 sao và 3 bản fork từ kho mã được liên kết.

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

Dùng MCP ChromeDP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối ChromeDP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm ChromeDP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của ChromeDP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "chromedp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của ChromeDP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của ChromeDP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng ChromeDP giúp tôi làm việc này không?
ChromeDP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng ChromeDP.

Câu hỏi thường gặp

Máy chủ MCP ChromeDP dùng để làm gì?

ChromeDP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP ChromeDP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng ChromeDP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP ChromeDP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối ChromeDP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP ChromeDP với TypingMind?

ChromeDP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP ChromeDP cung cấp những công cụ nào trong TypingMind?

ChromeDP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP ChromeDP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu ChromeDP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇