Skip to main content
Glama

neko-mcp

MCP Server để AI agent điều khiển neko virtual browser, trong khi bạn xem live qua WebRTC stream.

Cách dùng

1. Cài đặt

cd neko-mcp
npm install
npm run build

2. Cấu hình trong Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "neko": {
      "command": "node",
      "args": ["/đường/dẫn/đến/neko-mcp/dist/index.js"],
      "env": {
        "NEKO_URL": "http://113.173.35.45:8080",
        "NEKO_USERNAME": "neko",
        "NEKO_PASSWORD": "admin"
      }
    }
  }
}

Hoặc dùng biến môi trường mặc định (đã set sẵn cho server của bạn).

3. Quy trình dùng với AI Agent

Thứ tự khuyến nghị khi bắt đầu một task:

1. connect_websocket   → Kết nối WebSocket
2. take_control        → Lấy quyền điều khiển
3. screenshot          → Xem màn hình hiện tại
4. navigate_url        → Vào URL cần thiết
5. screenshot          → Xem kết quả
6. mouse_click / type_text / key_press  → Tương tác
7. screenshot          → Xem kết quả
...

Related MCP server: screenbox

Tools

Tool

Mô tả

screenshot

Chụp màn hình → trả về base64 JPEG

navigate_url

Điều hướng đến URL (dùng Ctrl+L)

mouse_click

Click tại (x, y)

mouse_move

Di chuột đến (x, y)

mouse_scroll

Cuộn trang tại (x, y)

type_text

Gõ text (dùng clipboard trick)

key_press

Nhấn tổ hợp phím

get_clipboard

Lấy nội dung clipboard

set_clipboard

Đặt nội dung clipboard

get_screen_info

Lấy độ phân giải màn hình

take_control

Lấy quyền điều khiển

release_control

Nhả quyền điều khiển

connect_websocket

Kết nối WebSocket

Phím đặc biệt cho key_press

ctrl, shift, alt, super
Return (Enter), Escape, Tab, BackSpace, Delete
Left, Right, Up, Down
Home, End, Page_Up, Page_Down
F1 - F12
space
a-z, 0-9, ký tự bình thường

Ví dụ tổ hợp phím:

  • Ctrl+C: ["ctrl", "c"]

  • Ctrl+L (focus address bar): ["ctrl", "l"]

  • Ctrl+Shift+T (mở tab mới): ["ctrl", "shift", "t"]

Kiến trúc

Claude/AI Agent
      │ MCP tools
      ▼
 neko-mcp server
   ├── REST API  → /api/login, /api/room/screen/shot.jpg,
   │               /api/room/clipboard, /api/room/control/take
   └── WebSocket → /api/ws  (mouse, keyboard, scroll events)
      
                        ▼ neko server renders
                  Bạn xem qua browser (WebRTC)

Ghi chú

  • WebSocket format: MCP dùng v3 API format (/api/ws). Nếu server dùng legacy mode, có thể cần adjust message format.

  • type_text dùng clipboard trick: set text qua REST API rồi paste Ctrl+V — đảm bảo Unicode hoạt động tốt.

  • Screenshot trả về base64 JPEG — AI agent (Claude) có thể đọc ảnh này để hiểu màn hình đang hiển thị gì.

Available Tools

13 tools
connect_websocketA

Kết nối WebSocket tới neko để chuẩn bị gửi mouse/keyboard events. Nên gọi đầu tiên.

Inputs: no named parameters.

get_clipboardA

Lấy nội dung text hiện tại trong clipboard của neko.

Inputs: no named parameters.

get_screen_infoA

Lấy thông tin màn hình: độ phân giải, số kết nối hiện tại.

Inputs: no named parameters.

key_pressA

Nhấn tổ hợp phím. Ví dụ: ['ctrl','c'] cho Ctrl+C, ['Return'] cho Enter, ['ctrl','l'] cho focus address bar.

Inputs: keys (required).

mouse_clickA

Click chuột vào vị trí (x, y) trên màn hình. Tọa độ tính từ góc trên trái.

Inputs: x (required), y (required), button.

mouse_moveA

Di chuyển chuột đến vị trí (x, y) mà không click.

Inputs: x (required), y (required).

mouse_scrollA

Cuộn chuột tại vị trí (x, y). deltaY âm = cuộn lên, dương = cuộn xuống.

Inputs: x (required), y (required), delta_x, delta_y.

release_controlA

Nhả quyền điều khiển chuột/bàn phím.

Inputs: no named parameters.

screenshotA

Chụp ảnh màn hình hiện tại của neko virtual browser. Trả về ảnh dạng base64 JPEG.

Inputs: no named parameters.

set_clipboardB

Đặt nội dung text vào clipboard của neko.

Inputs: text (required).

take_controlA

Lấy quyền điều khiển chuột/bàn phím của neko. Cần gọi trước khi dùng mouse/keyboard tools.

Inputs: no named parameters.

type_textA

Gõ text vào vị trí focus hiện tại. Dùng clipboard + Ctrl+V để đảm bảo Unicode hoạt động.

Inputs: text (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool targets a distinct action (connect, get/set clipboard, screen info, keyboard, mouse, navigation, control management, screenshot), with no overlap in purpose.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern (e.g., connect_websocket, key_press, mouse_click, take_control), with only 'screenshot' as a single-word exception, which is still clear.

    Tool Count5/5

    13 tools is well-scoped for a virtual browser control server, covering connection, control, input, navigation, clipboard, and screenshot without being excessive.

    Completeness4/5

    Core workflows (connect, control, navigate, type, mouse, keyboard, clipboard, screenshot) are covered. Minor gaps like explicit page refresh or JavaScript execution exist, but the toolset supports workarounds via key_press and coordinates.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI coding assistants to control a persistent Chrome browser through DevTools Protocol. Supports web navigation, screenshots, element interaction, mobile testing, console logs, and network debugging in a stable Docker environment.
      10
      8
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides AI agents with isolated virtual desktops containing a real Chromium browser, enabling them to see, click, type, and navigate like a human, with features like snapshots and remote control.
      26
      AGPL 3.0
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI clients to directly control a real Chrome/Edge browser via a WebSocket extension, supporting operations like navigation, clicks, screenshots, and JavaScript evaluation.
      14
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to control a persistent Chromium browser or attach to an existing Chrome with sandboxed JavaScript and structured tools for web interaction and automation.
      16
      MIT