Skip to main content
Glama

fmodel-mcp

MCP server điều khiển FModel (trình duyệt asset Unreal Engine) qua Windows UI Automation — không cần chạm chuột vật lý.

Kiến trúc

opencode ── MCP (stdio) ──> src/index.ts ──> src/bridge.ts ──> bridge/uia.ps1 (-Server) ──> FModel (UI Automation)
  • src/index.ts — MCP server, 19 tools.

  • src/bridge.ts — wrapper daemon: giữ 1 tiến trình pwsh sống, tuần tự hoá request qua promise queue, tự respawn khi lỗi/timeout.

  • bridge/uia.ps1 — PowerShell bridge: nhận 1 JSON/line từ stdin, trả 1 JSON/line ra stdout. Kích hoạt bằng UIA pattern (Invoke/Select/SetFocus + {ENTER}/Shift+F10), không dùng SetCursorPos/mouse_event.

Related MCP server: uiautomation-mcp

Cài đặt

npm install
npm run build

Yêu cầu: Windows + PowerShell 7 (pwsh), FModel đang chạy.

Đăng ký vào opencode

Thêm vào ~/.config/opencode/opencode.jsonc:

{
  "mcp": {
    "fmodel": {
      "type": "local",
      "command": ["node", "C:/Users/<bạn>/Desktop/temp/fmodel_mcp/dist/index.js"],
      "enabled": true
    }
  }
}

Tools chính

Tool

Chức năng

list_processes / list_windows

Liệt kê tiến trình & cửa sổ FModel

show_window / get_window_title

Đưa cửa sổ lên trước, đọc tiêu đề

dump_ui / find_element / get_all_text

Khảo sát cây UI Automation

tree_nodes / expand_node / click_node

Duyệt cây thư mục (AssetsFolderName)

list_files / list_children

Đọc danh sách asset hiện tại trong AssetsExplorer

click_element / dblclick_element

Click trái/phải/kép (mở context menu, điều hướng)

get_value / set_value

Đọc/ghi ô nhập liệu (VD: ô tìm kiếm)

send_keys

Gửi phím tắt (VD: ^f mở search)

export_asset

Export asset: right-click → Export → format → (tuỳ chọn) Export Session

Quy trình tìm kiếm asset

  1. send_keys ^f để mở cửa sổ Search For Packages.

  2. set_value vào SearchTextBox với chuỗi cần tìm.

  3. click_element vào chính SearchTextBox (fallback thành {ENTER} → kích hoạt RefreshFilter của cửa sổ Search).

  4. list_files (với window: "Search For Packages") để đọc kết quả.

Lưu ý: tìm kiếm là substring-match trên FullPath, kết quả bị ảo hoá (~24 dòng hiển thị).

Dev

npm run dev   # chạy bằng tsx
npm run build # biên dịch TypeScript

Test nhanh bridge không qua MCP:

pwsh -NoProfile -File bridge/uia.ps1 -Action processes

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to control Windows systems using AutoHotkey v2 and the UI Automation accessibility tree for efficient, text-based computer interaction. It provides tools for window management, keystrokes, and UI inspection while significantly reducing token costs compared to screenshot-based approaches.
    9
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to inspect and automate Windows desktop UI elements by exploring UI trees, checking properties, performing actions like clicking and typing, and generating Python automation scripts.
    31 PyPI
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables Windows UI Automation through MCP, allowing agents to inspect, search, navigate, and interact with desktop UI elements via the UIAutomation framework. Supports actions such as focus, invoke, set-value, toggle, and event waiting, with CLI and VS Code extension variants.
    4
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables reading and interacting with native Windows application UI through the UI Automation API, allowing listing windows, extracting structured content, and performing clicks/typing without screenshot-based vision.
    2
    MIT