Logo CodingBaby-Browser-MCP

CodingBaby-Browser-MCP

Cộng đồng
buyitsydney

MCP Server allowing AI agents to control Google Chrome via the CodingBaby Extension

Nhà phát hànhbuyitsydney
Kho mãCodingBaby-Browser-MCP
Ngôn ngữJavaScript
Bản fork
5
Sao
29
Công cụ có sẵn
14
Phương thức truyền tảistdio
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    CodingBaby-Browser-MCP 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.

  • 14 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ở

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

CodingBaby-Browser-MCP

Overview

CodingBaby-Browser-MCP is a powerful tool that enables AI assistants like Claude 3.7 Sonnet in Cursor to control Chrome browser for automated tasks. This tool bridges the gap between AI and web browser interaction through a WebSocket-based communication protocol.

Features

  • Browser Automation: Control Chrome browser programmatically to navigate websites, fill forms, and perform clicks
  • Screenshot Capture: Take screenshots of entire pages or specific areas
  • Multi-tab Support: Create, list, select, and close browser tabs
  • Form Interaction: Type text, press keys, and select form elements
  • Batch Commands: Execute multiple browser operations in sequence
  • Viewport Control: Adjust browser window size for responsive testing

Architecture

The project consists of two main components:

  1. MCP Tool Server: A Node.js server that implements the Model Context Protocol (MCP) to communicate with AI assistants in Cursor
  2. Chrome Extension: A browser extension that receives commands from the MCP server and controls the browser

The system uses WebSocket (port 9876 by default) to establish a bidirectional communication channel between the MCP server and the Chrome extension.

Installation

Prerequisites

  • Node.js (v14 or higher)
  • Chrome browser
  • Cursor editor with Claude 3.7 Sonnet

MCP Tool Setup

  1. In Cursor, go to Settings → MCP
  2. Add new global MCP server with the following configuration:
json
{
  "mcpServers": {
    "CodingBaby-Browser-MCP": {
      "command": "npx",
      "args": ["@sydneyassistent/codingbaby-browser-mcp"]
    }
  }
}

Chrome Extension Setup

  1. Install the CodingBaby Extension from the Chrome Web Store
  2. Enable the extension and ensure it has the necessary permissions

Usage

Once installed, you can ask Claude 3.7 in Cursor to control your browser:

Use the browser to navigate to https://example.com

Available Commands

  • navigate: Open a URL in the browser
  • click: Click on elements
  • type: Enter text in form fields
  • pressKey: Simulate keyboard actions
  • scroll: Scroll in any direction
  • takeScreenshot: Capture browser content
  • wait: Pause execution for specified time
  • setViewport: Change browser window dimensions
  • tabNew, tabList, tabSelect, tabClose: Tab management
  • batch: Execute multiple commands in sequence
  • close: Close the browser session

Development and Debugging

If you've downloaded the source code, you can set up the project for development and debugging purposes.

Debugging Chrome Extension

To load and debug the Chrome extension from source code:

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable "Developer mode" by toggling the switch in the top-right corner
  3. Click "Load unpacked" button
  4. Navigate to the chrome-extension directory in the project and select it
  5. The extension will now be loaded in developer mode
  6. You can view console logs by right-clicking the extension icon, selecting "Inspect" and opening the Console tab
  7. Make changes to the extension code and click the refresh icon on the extension card to apply changes

Debugging MCP Server in Cursor

To use the local MCP server code for debugging:

  1. Clone or download the repository to your local machine
  2. Navigate to the project directory and install dependencies:
    bash
    cd Browser-MCP
    npm install
  3. In Cursor, go to Settings → MCP
  4. Add a new MCP server with the following configuration:
    json
    {
      "mcpServers": {
        "CodingBaby-Browser-MCP-Dev": {
          "command": "node",
          "args": ["/absolute/path/to/your/Browser-MCP/index.js"]
        }
      }
    }
    Replace /absolute/path/to/your/ with the actual path to the downloaded project
  5. Click "Refresh" to load the MCP server
  6. You can now make changes to the MCP server code and restart the server by clicking "Refresh" in Cursor's MCP settings

For debugging, you can:

  • Check the Cursor MCP logs by clicking on the MCP status icon
  • Add console.error() statements to the code for more detailed logging
  • Run the MCP server manually from the terminal for full console output

Troubleshooting

  • Port Conflict: If port 9876 is already in use, the tool will attempt to release it automatically
  • Connection Issues: Ensure the Chrome extension is properly installed and enabled

License

MIT

Links

Cài đặt

TypingMind
{
  "mcpServers": {
    "codingbaby-browser-mcp": {
      "command": "npx",
      "args": [
        "@sydneyassistent/codingbaby-browser-mcp"
      ]
    }
  }
}

Công cụ có sẵn

  • navigate

    Navigate to a URL

  • click

    Perform click on a web page

  • type

    Type text into focused element

  • press_key

    Press a key or key combination on the keyboard

  • close

    Close the browser

  • scroll

    Scroll the page in a specified direction

  • set_viewport

    Set the viewport configuration of the browser

  • area_screenshot

    Take a screenshot of a specific area of the current page

  • wait

    Wait for a specified number of seconds, with a screenshot of the current page state after waiting

  • tab_list

    List browser tabs

  • tab_new

    Open a new tab

  • tab_select

    Select a tab by index

  • tab_close

    Close a tab

  • batch

    Execute a batch of browser operations in sequence. This powerful tool allows combining multiple actions (click, type, press_key, etc.) into a single command, reducing round-trip time. Ideal for form filling, search operations, and simple navigation sequences.

Dùng MCP CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP, 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 CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP.
  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": {
    "codingbaby-browser-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@sydneyassistent/codingbaby-browser-mcp"
      ]
    }
  }
}
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 CodingBaby-Browser-MCP, 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 CodingBaby-Browser-MCP.
  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 CodingBaby-Browser-MCP giúp tôi làm việc này không?
CodingBaby-Browser-MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng CodingBaby-Browser-MCP.

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

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

CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP, 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 CodingBaby-Browser-MCP với TypingMind?

CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP cung cấp những công cụ nào trong TypingMind?

CodingBaby-Browser-MCP cung cấp 14 công cụ 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 CodingBaby-Browser-MCP 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 CodingBaby-Browser-MCP 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 👇