Skip to main content
Glama

GPM Browser — Antigravity (agy) MCP Plugin

Plugin MCP đa nền tảng cho Antigravity (agy) tích hợp GPMLogin Local API v3 và điều khiển trình duyệt anti-detect qua Playwright CDP.

Thiết kế tương thích mọi máy:

  • Không gắn cứng đường dẫn cục bộ: dùng PLUGIN_ROOT và src/bootstrap.mjs.

  • Tự động cài thư viện lần đầu: khi cài trực tiếp từ GitHub bằng agy plugin install, src/bootstrap.mjs tự chạy npm ci --omit=dev (không tải thêm trình duyệt Playwright thừa) ngay lần khởi chạy đầu tiên.

  • Tự dò cổng GPMLogin: ưu tiên GPM_API_URL → GPM_PORT_FILE → %LOCALAPPDATA%\Programs\GPMLogin\api_port.dat → mặc định http://127.0.0.1:19995.

  • Hỗ trợ điều khiển qua mạng LAN (macOS / Linux → Windows GPMLogin): tự động ánh xạ remote_debugging_address (127.0.0.1:<port>) sang host trong GPM_API_URL (hoặc GPM_CDP_HOST).

  • Bảo mật proxy mặc định: tự động che mật khẩu trong raw_proxy.


Yêu cầu

  • Node.js ≥ 20 (có sẵn npm)

  • Antigravity (agy) (CLI hoặc Antigravity Desktop)

  • GPMLogin đang chạy và bật Local API v3 (trên cùng máy Windows, hoặc máy Windows trong mạng LAN)


Related MCP server: camoufox-mcp

Cài đặt nhanh (mọi máy)

Cách 1: Cài trực tiếp từ GitHub bằng 1 lệnh (Khuyên dùng)

agy plugin install https://github.com/luonghieu184/agy-gpm-mcp

Lưu ý trên Windows: Nếu đang mở Antigravity Desktop và gặp lỗi Access is denied ở bước rename vào ~/.gemini/config/plugins, hãy tạm đóng Antigravity Desktop, chạy lại lệnh trên rồi mở lại.

Ở lần khởi chạy đầu tiên, src/bootstrap.mjs sẽ tự động cài 3 gói runtime (@modelcontextprotocol/sdk, playwright-core, zod) vào thư mục plugin. Các lần sau khởi chạy tức thì.

Cách 2: Clone repo & chạy script cài tự động

Windows (PowerShell):

git clone https://github.com/luonghieu184/agy-gpm-mcp.git
cd agy-gpm-mcp
.\scripts\install.ps1
# Hoặc tự động tạm tắt + mở lại Antigravity Desktop nếu bị khoá thư mục plugins:
.\scripts\install.ps1 -RestartAntigravity

macOS / Linux:

git clone https://github.com/luonghieu184/agy-gpm-mcp.git
cd agy-gpm-mcp
chmod +x scripts/install.sh
./scripts/install.sh

Kiểm tra sau khi cài

agy plugin list

Kết quả mong đợi:

Installed plugins:
- gpm-browser (enabled, 1.0.0)
    Source:     antigravity
    Components: 1 skill, 1 rule, 1 MCP server

Cấu hình kết nối GPMLogin

Biến môi trường

Mặc định

Mô tả

GPM_API_URL

(tự dò)

URL GPMLogin API v3, vd http://127.0.0.1:19995 hoặc http://192.168.1.50:19995 (LAN)

GPM_PORT_FILE

%LOCALAPPDATA%\Programs\GPMLogin\api_port.dat

Đường dẫn tuỳ chỉnh tới tệp api_port.dat của GPMLogin

GPM_CDP_HOST

(theo host của GPM_API_URL)

Ghi đè host khi kết nối CDP qua mạng LAN / SSH tunnel


Danh sách 21 MCP Tools

1. Quản lý GPMLogin (API v3 — 10 tools)

  • gpm_status — Kiểm tra kết nối GPMLogin API, nguồn port và các phiên CDP đang mở

  • gpm_list_groups — Liệt kê các group

  • gpm_list_profiles — Liệt kê / tìm kiếm / phân trang profile (ẩn mật khẩu proxy mặc định)

  • gpm_get_profile — Xem chi tiết 1 profile

  • gpm_create_profile — Tạo profile mới (proxy, browser core, fingerprint, OS, WebRTC, ghi chú)

  • gpm_update_profile — Cập nhật tên, group, proxy, startup URLs, ghi chú, user-agent, màu

  • gpm_delete_profile — Xoá profile (mode=1 chỉ DB, mode=2 cả DB + thư mục)

  • gpm_start_profile — Mở profile và tự động kết nối Playwright CDP (auto_connect: true)

  • gpm_close_profile — Đóng profile và ngắt kết nối CDP

  • gpm_connect_cdp — Kết nối CDP tới một profile đã mở sẵn

2. Điều khiển trình duyệt qua CDP (gpm_browser_* — 11 tools)

  • gpm_browser_tabs — Liệt kê / mở / chuyển / đóng tab

  • gpm_browser_navigate — Điều hướng URL, back, forward, reload

  • gpm_browser_snapshot — Đọc nội dung văn bản và danh sách phần tử tương tác kèm selector gợi ý

  • gpm_browser_click — Click theo CSS/Playwright selector hoặc toạ độ (x, y)

  • gpm_browser_type — Nhập văn bản (hỗ trợ delay_ms gõ từng ký tự và press_enter)

  • gpm_browser_press — Nhấn phím / tổ hợp phím

  • gpm_browser_select — Chọn option trong <select>

  • gpm_browser_wait — Chờ selector / URL / thời gian

  • gpm_browser_screenshot — Chụp ảnh màn hình (trả ảnh trực tiếp cho AI + tuỳ chọn lưu ra tệp)

  • gpm_browser_evaluate — Chạy JavaScript trong ngữ cảnh trang

  • gpm_browser_cookies — Đọc / ghi / xoá cookies


Kiểm thử

# Kiểm tra chỉ đọc (không tạo/mở profile)
npm test

# Kiểm tra end-to-end thật trên GPMLogin (tạo profile tạm -> mở CDP -> duyệt web -> chụp ảnh -> đóng -> xoá sạch)
node tests/smoke.test.js --live

# Kiểm tra chuẩn manifest plugin Antigravity
agy plugin validate --strict .

License

MIT

Available Tools

21 tools
gpm_browser_clickClick Element or CoordinatesB

Click vào phần tử theo CSS/Playwright selector (vd "button.submit", "text=Đăng nhập") hoặc theo tọa độ x, y.

Inputs: x, y, button, selector, +3 more.

gpm_browser_cookiesManage Browser CookiesB

Đọc (get), thêm/cập nhật (set), hoặc xoá (clear) cookies của profile trình duyệt đang kết nối.

Inputs: action (required), urls, cookies, profile_id.

gpm_browser_evaluateEvaluate JavaScript in PageC

Chạy đoạn mã JavaScript trong ngữ cảnh trang hiện tại và trả về giá trị JSON.

Inputs: expression (required), profile_id.

gpm_browser_navigateNavigate GPM BrowserB

Điều hướng tab hiện tại tới một URL, hoặc quay lại (back), tiến tới (forward), tải lại (reload).

Inputs: url, action, profile_id, timeout_ms, +1 more.

gpm_browser_pressPress Keyboard KeyC

Nhấn phím hoặc tổ hợp phím (vd "Enter", "Tab", "Escape", "Control+A", "PageDown").

Inputs: key (required), selector, profile_id, timeout_ms.

gpm_browser_screenshotScreenshot GPM BrowserA

Chụp ảnh màn hình tab hiện tại (viewport, toàn trang, hoặc 1 selector). Trả về trực tiếp ảnh PNG/JPEG cho AI xem và tuỳ chọn lưu ra tệp.

Inputs: type, quality, selector, full_page, +2 more.

gpm_browser_selectSelect Dropdown OptionC

Chọn một hoặc nhiều option trong thẻ theo value hoặc label.

Inputs: selector (required), label, value, profile_id, +1 more.

gpm_browser_snapshotSnapshot Page Content & Interactive ElementsA

Đọc nhanh nội dung chữ của trang hiện tại và liệt kê các phần tử tương tác (link, button, input, select) kèm selector gợi ý để click/điền form chính xác.

Inputs: profile_id, max_elements, max_text_chars.

gpm_browser_tabsManage GPM Browser TabsB

Quản lý các tab trong trình duyệt GPM: list (liệt kê), new (mở tab mới), switch (chuyển tab), close (đóng tab).

Inputs: url, index, action, profile_id.

gpm_browser_typeType Text into InputA

Điền văn bản vào ô input/textarea. Nếu đặt delay_ms > 0 sẽ gõ từng phím tự nhiên giống người thật.

Inputs: text (required), selector (required), clear, delay_ms, +3 more.

gpm_browser_waitWait in GPM BrowserB

Chờ phần tử theo selector (visible/hidden/attached/detached), chờ URL chứa chuỗi, hoặc chờ một khoảng ms.

Inputs: ms, state, selector, profile_id, +2 more.

gpm_close_profileClose GPM ProfileB

Đóng trình duyệt của một profile GPMLogin đang chạy và dọn phiên CDP tương ứng.

Inputs: profile_id (required).

gpm_connect_cdpConnect CDP to Running GPM ProfileB

Kết nối Playwright CDP tới một profile GPMLogin đã được mở sẵn bằng địa chỉ remote_debugging_address (vd "127.0.0.1:54321").

Inputs: profile_id (required), remote_debugging_address (required).

gpm_create_profileCreate GPM ProfileC

Tạo profile trình duyệt mới trong GPMLogin (API v3).

Inputs: profile_name (required), os, note, raw_proxy, +17 more.

gpm_delete_profileDelete GPM ProfileA

Xoá một profile GPMLogin. Cảnh báo: hành động không thể hoàn tác. mode=1 chỉ xoá khỏi DB, mode=2 (mặc định) xoá cả DB và thư mục dữ liệu trên đĩa.

Inputs: profile_id (required), mode.

gpm_get_profileGet GPM ProfileB

Lấy thông tin chi tiết của một profile GPMLogin theo profile_id.

Inputs: profile_id (required), include_proxy_credentials.

gpm_list_groupsList GPM GroupsB

Lấy danh sách tất cả nhóm (groups) trong GPMLogin.

Inputs: no named parameters.

gpm_list_profilesList GPM ProfilesA

Liệt kê các profile trong GPMLogin theo bộ lọc group_id, từ khoá search, thứ tự sắp xếp và phân trang. Mật khẩu trong raw_proxy được ẩn mặc định.

Inputs: page, sort, search, group_id, +2 more.

gpm_start_profileStart GPM ProfileA

Khởi chạy trình duyệt của một profile GPMLogin. Mặc định tự động kết nối Playwright CDP để dùng ngay các tool gpm_browser_*.

Inputs: profile_id (required), win_pos, win_size, win_scale, +2 more.

gpm_statusGPM StatusA

Kiểm tra trạng thái kết nối GPMLogin Local API v3 (base URL, nguồn cấu hình port, số lượng profile/group và các phiên trình duyệt CDP đang kết nối).

Inputs: no named parameters.

gpm_update_profileUpdate GPM ProfileC

Cập nhật thông tin một profile GPMLogin (tên, group_id, proxy, ghi chú, startup_urls, user_agent, màu).

Inputs: profile_id (required), note, color, group_id, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 21 tools

    Disambiguation4/5

    Browser automation tools (navigate, click, type, select, wait, snapshot) each target a distinct action with clear boundaries. The only mild overlap is between gpm_start_profile and gpm_connect_cdp, since start_profile auto-connects CDP, but the descriptions distinguish the pre-opened versus fresh-launch cases.

    Naming Consistency4/5

    All tools share a gpm_ prefix and the gpm_browser_* namespace is fully consistent. The management tools use varied verb prefixes (start, close, list, get, create, update, delete) that are readable but not uniformly namespaced under a profile_ grouping.

    Tool Count4/5

    21 tools is on the heavier side but justified by serving two coherent domains: profile/group lifecycle management and browser automation. Each tool earns a distinct place, though the count sits near the upper reasonable bound.

    Completeness4/5

    Profile CRUD and browser interaction coverage is strong, covering navigation, form input, waits, snapshots, screenshots, JS evaluation, and cookies. Minor gaps exist: groups only support listing (no create/update/delete) and browser tools lack hover, drag, upload, or frame handling, but core workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      Enables browser automation and web scraping through Playwright, supporting navigation, screenshots, element interaction, form filling, JavaScript execution, and content extraction.
      8
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables browser automation with anti-detection features, including navigation, interaction, form filling, and session management.
      22
      25 PyPI
      10
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables browser automation with Playwright, offering 17 tools for navigation, session management, Chrome profile selection, and action recording.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to run Playwright-compatible browser automation with persistent profiles, proxies, Chrome extensions, and humanized mouse, keyboard, and scroll interactions over stdio or Streamable HTTP. Supports web research, daily automation, testing workflows, and optional session-scoped CDP access.
      335 npm
      MIT