glass

io.github.fixed-width由 GitHub 帳號 fixed-width 發布v1.9.0更新於 Nov 3, 2026

MCP server giving a coding agent a build→see→interact→debug loop over native GUI apps.

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,讓程式開發助理對原生 GUI 應用程式形成「建置→查看→互動→除錯」循環:啟動、截圖、點擊、輸入、讀日誌、比對變化。

可以做什麼
  • 啟動與停止原生 GUI 應用程式,並擷取螢幕內容
  • 注入滑鼠與鍵盤輸入,可依座標點擊或依控制項名稱操作
  • 檢視無障礙樹、尋找元素並等待元素或文字出現
  • 讀取應用程式日誌,並以文字形式回報截圖之間的視覺變化
  • 可選擇錄製工作階段軌跡,並檢查或匯出為證據包
  • 回報目前工作階段支援的點擊、捲動與文字輸入能力
適用情境
適合助理正在開發或除錯桌面、行動端 GUI 應用程式,需要自行驗證結果、而不是反覆詢問使用者「看起來對嗎」的情境。適用於可當成外部黑箱驅動的介面工作,無論應用程式是否提供無障礙樹。
執行需求
以本機程序透過 stdio(或網路 HTTP)在桌面平台執行;需下載對應平台的預先編譯版本,或以 cargo 從原始碼建置。Linux 需 X11 或 Wayland 及 Xvfb 或 sway 加 bubblewrap;Windows 需 Sandboxie;macOS 需公證版應用程式並授予隱私權限;Android 需 AVD 模擬器與 adb;iOS 需 macOS 主機、模擬器、xcrun simctl 與 idb_companion。未宣告 API 金鑰。
安裝前請注意
它會注入真實的滑鼠與鍵盤輸入:在 Windows 以及 macOS 預設模式下與你的桌面共用,操作可能影響你自己的作業環境。macOS 獨立帳號設定會建立一個使用本機自選密碼的開發帳號,且隱私授權需在多次執行間保留。可選的軌跡錄製會保留工具輸入與應用程式內容,可能含敏感資料,預設關閉。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 glass,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

glass

[CI] [glass MCP server]

Give your coding agent hands for the app it's building — launch it, drive it, and verify the result, without burning a screenshot on every step.

A Rust MCP server that gives an AI coding agent a closed build → see → interact → debug loop over external native GUI applications.

glass lets an agent launch a GUI app, capture what is on screen, inject mouse and keyboard input, read the app's logs, and detect visual changes — so a coding agent can build and debug UI applications independently instead of asking the user "does this look right?".

glass drives apps as an external black box, so it works with any native GUI app regardless of toolkit or language. It has two Linux backends (X11 and Wayland), a Windows backend, an Android backend (an AVD emulator, driven over adb from any host), an iOS backend (native apps in the Simulator over xcrun simctl, with input and the accessibility tree via idb_companion, including a two-finger pinch), and a macOS backend, behind a platform-agnostic core.

The same input tools work across backends. Default Linux displays and mobile emulators keep input separate from your desktop. Windows shares it; macOS adds a preview of separate-account setup for apps off your desktop, alongside its existing shared-desktop setup. glass_capabilities with scope: "session" reports click, scroll and text support and whether each can affect your desktop.

The macOS account setup uses the normal MCP tools and one Glass installation. Application setup… guides enrollment, permission handoff and live readiness checks, including creating a standard development account with a locally chosen password. It needs a real login and Glass privacy grants in that account, retained between runs. Enrollment applies to your macOS user; glass-mcp unenroll returns to shared-desktop use while retaining the app, development account and MCP startup integration. Development loops have been tested on an Apple Silicon Mac mini without a physical monitor. These runtime checks used an initialized development account and include physical keyboard/mouse coexistence, recovery after an interrupted client, and starting its development desktop after a real reboot with existing permissions. New-account onboarding has also reached Ready and passed ordinary app interaction on that Mac. Initial macOS login and any missing privacy grants require user action; setup on a clean macOS installation without prior Glass grants has not been tested. Application setup includes Start environment… for a missing development desktop, using local account credentials and an already enabled macOS Screen Sharing service. This guided post-reboot flow and ordinary build/interact/rebuild/stop loops in an indexed workspace have been tested without repeating enrollment or permission setup. Unattended development-desktop startup is not implemented.

See it

[An agent debugging a GTK app under glass]

An agent building a GUI app runs it under glass, reproduces a bug from the accessibility tree (no screenshots), fixes the code, and re-verifies — the loop it otherwise can't close on its own. Try it yourself.

Try it in 60 seconds

  1. Download glass for your platform from the Releases page and connect it to your agent — glass works with any MCP host (see which are verified).

  2. Get the example app — clone this repo, or download examples/tasks-demo/tasks_demo.py (on Linux it needs sudo apt install python3-gi gir1.2-gtk-4.0).

  3. Paste this to your agent:

    Use glass to run examples/tasks-demo/tasks_demo.py with accessibility on. There's a bug: clicking Add doesn't add the typed task. Reproduce it by driving the UI and checking the accessibility tree (don't just screenshot), then find and fix the bug in the code and verify a task actually appears.

Your agent launches the app, reproduces the bug from the accessibility tree, fixes the one-line wiring bug, and confirms the task appears — the whole build → see → interact → debug loop, start to finish. (glass-mcp doctor checks your environment if anything's off.)

The loop in practice

An agent can fill in a form, click Save, and check that the app reports success. When the app exposes an accessibility tree, the agent works with named controls and verifies changes from text:

jsonc
glass_start { "run": ["python3", "app.py"] }glass_do { "actions": [  { "action": "set_value",    "target": { "query": "account", "role": "TextField", "states": ["enabled"] },    "text": "hello" },  { "action": "click_element",    "target": { "query": "Save", "role": "Button", "states": ["enabled"] },    "mode": "auto" },  { "action": "wait_for_element", "name": "Saved" }] }glass_logs

Use glass_find_elements to inspect candidates when the intended target is not unique or known well enough to act on directly. Use glass_a11y_snapshot to explore the app's controls. See the tool reference for click modes and platform behavior.

For a canvas or custom-rendered app with no accessibility tree, drive it by pixels instead — glass_screenshot, glass_click {x,y}, and glass_diff, which returns changed_pct + a bbox as text, so routine checks between screenshots cost no vision tokens. Why the loop is shaped this way: the build → see → interact → debug loop.

To review a run after the app stops, opt into session evidence recording with --trace-dir. Glass retains tool inputs and requested results in bounded storage, then glass-mcp trace inspect and trace export validate the trace and package its evidence in a ZIP. Recording is off by default; retained app content can contain sensitive data.

Install at a glance

Download the latest build for your platform from the Releases page, then set up your host:

Every asset is listed in docs/reference/platforms.md. Prefer to compile, or on an architecture with no published asset? See docs/how-to/build-from-source.md — it is a single cargo build.

Then connect glass to your agent and run glass-mcp doctor to check the environment. New here? Follow the tutorial for a guaranteed first success.

The full toolbox remains the default. For fewer agent tool definitions, start with glass-mcp --tool-profile lean and use glass_do for actions. Inspect either inventory without starting a session using glass-mcp tools --json; see tool profiles.

Drive it well — the glass-drive skill

glass needs no app integration and no skill to run, but an agent drives it far more reliably with the open glass-drive Agent Skill — it stops the agent spending its first turns rediscovering the verify-cheaply-then-look loop. Installing it is the single highest-leverage thing you can add when pointing an agent at glass.

Platform support

✓ supported · ◑ partial · – not supported · 🚧 planned.

CapabilityLinux (X11 + Wayland)WindowsAndroid (AVD)iOS (Simulator)macOS
Capture · input · windows · clipboard · logs✓✓✓✓✓
Accessibility (semantic addressing)✓ AT-SPI✓ UI Automation✓ UIAutomator✓ idb✓ AX
Containment / sandboxing✓ bubblewrap✓ Sandboxie✓ the emulator VM✓ the Simulator✓ Seatbelt
Input without desktop interference✓ private display– shared desktop✓ emulator✓ Simulator◑ separate account (preview)
Display isolation (app off your desktop)✓ headless Xvfb / sway– VM needed✓ headless emulator✓ headless simctl boot◑ separate account (preview)

Full matrix, per-capability detail, and system requirements: docs/reference/platforms.md. Transport is MCP over stdio (default) or network HTTP.

Documentation

The full docs — tutorial, how-to guides, reference, and explanations — are under docs/. See CHANGELOG.md for release notes, and Stability and versioning for what a 1.0 release guarantees.

Contributing? CONTRIBUTING.md has the gates a PR has to pass, and Verify a change covers platform code your own host cannot run.

License

glass is open core, licensed Apache-2.0 — see LICENSE-APACHE.

來源:README.md,提交 bc6ed81

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

4
  1. v1.9.0最新Nov 3, 2026
  2. v1.9.0-rc1Nov 1, 2026
  3. v1.8.0Sep 20, 2026
  4. v1.7.0Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分