
PySide6 MCP
io.github.com55由 GitHub 帳號 com55 發布v0.1.0更新於 Oct 24, 2026
Playwright-style MCP to inspect, control, and debug PySide6 desktop GUIs.
概覽
讓 AI 助理不必修改應用程式原始碼,就能檢查、截圖、點擊、輸入並偵錯執行中的 PySide6 桌面圖形介面。
- 可以做什麼
- 這是一套針對 PySide6 桌面應用程式的 Playwright 風格 MCP 伺服器。它透過本機 HTTP 橋接啟動或連接執行中的應用程式,並提供工具來截取視窗或元件的螢幕畫面、讀取完整元件樹與個別元件屬性、依類別、物件名稱或文字尋找元件,以及透過點擊、雙擊、輸入、按鍵和捲動進行互動。它也能列出並觸發 QAction 選單項目、讀取 Python 記錄與原始標準輸出/錯誤、回報應用程式狀態與橋接健康狀況,並可在應用程式行程內執行 Python 以進行更深入的檢查。
- 適用情境
- 適合讓助理操作或偵錯 PySide6 桌面應用程式:重現介面問題、查看某個控制項為何被停用、填寫並送出表單,或在工作階段中擷取螢幕畫面與記錄。它鎖定本機桌面開發,而非無介面或網頁測試。
- 執行需求
- 以 stdio 執行的本機行程。需要 Python 3.11+、目標應用程式環境中的 PySide6 6.6+,以及 PATH 中的 uv(以 uvx 執行伺服器)。橋接在應用程式內部執行;launch_app 會透過隔離的 PYTHONPATH 注入,也可執行 python -m pyside6_mcp 或呼叫 install_bridge()。橋接會監聽 localhost,預設連接埠 7890,可用 PYSIDE6_MCP_PORT 覆寫。已在 Windows 測試,Linux 與 macOS 預期可用。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 PySide6 MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
pyside6-mcp
Playwright-style MCP server for PySide6 apps — lets AI assistants see, control, and debug your Python desktop GUI without modifying your app's source code.
Features
- Screenshot any window or widget
- Inspect the full widget tree (class, name, geometry, text, state)
- Click, type, scroll, press keys — full interaction
- Find widgets by class, objectName, or text content
- Read Python logs captured from the app
- Run Python inside the app process for advanced inspection
- Launch and stop the app from the agent
Zero changes to your app's source code required.
Requirements
- Python 3.11+
- PySide6 6.6+
- uv (recommended)
- Windows (tested), Linux/macOS (should work)
Installation
The MCP server (stdio) and the in-app bridge are separate:
No changes to the target project. launch_app(cwd=…) injects only the
bridge modules via an isolated PYTHONPATH — nothing is added to pyproject.toml,
and the MCP server's dependencies (fastmcp, httpx, …) never enter the app environment.
Requires uv on PATH. MCP Registry name:
io.github.com55/pyside6-mcp.
Unlike qt-mcp, you do not add this
package to the target app or set a probe env var. launch_app injects the bridge.
Claude Code
Plugin (MCP + skill). install only searches marketplaces you have added —
there is no github: install shorthand:
MCP server only:
Cursor
Install the Agent Plugin from this repository (or from the Cursor Marketplace once listed). Manual stdio config:
After saving, reload MCP servers in Cursor Settings → MCP.
See examples/cursor-mcp-config.json.
Any stdio MCP client
Place it wherever that client expects MCP config (user-level or project-level).
See examples/mcp-config.json.
VS Code / GitHub Copilot / other clients
Same stdio block as Any stdio MCP client.
Note:
uvxdownloads and runs the MCP server in an isolated env — PySide6 is not required there. PySide6 is only needed in the target app's venv (already a project dependency).To run from a git checkout instead of PyPI:
uvx --from git+https://github.com/com55/pyside6-mcp pyside6-mcp
Usage
From MCP (recommended — zero project setup)
cwd is the project root (pyproject.toml). script is the entry .py relative to cwd.
launch_app returns {pid} (the Qt app process, not the uv wrapper). Other tools omit pid to target the last launched app; pass pid= when several are running. Do not pass port=.
Manual launch (when you start the app yourself)
Prefer launch_app above. Use these only when the app is already running, or
you want to start it outside the MCP server.
Without editing app source — run the entry script through the bridge launcher
(pulls pyside6-mcp into a temporary env; does not add it to the project):
Bridge listens on http://127.0.0.1:7890 by default. Override with
PYSIDE6_MCP_PORT. Then from the agent call wait_until_ready() (and pass
pid= only if you use several apps).
launch_app is different: it picks an ephemeral port and injects only the
bridge modules via an isolated PYTHONPATH — you never set the port yourself.
Embed in the app (always-on; requires adding the package to that project):
From your AI assistant
Once the app is running with the bridge active, ask your assistant:
"Screenshot the app and click the Apply button" "Why is the checkbox disabled? Inspect its state." "Fill in the form and submit it" "Show me the last 20 log lines from the app"
Your assistant uses the launch_app, screenshot, get_widget_tree, find_widget, click, type_text, get_logs, and other tools automatically.
launch_app returns only when the UI is ready (a visible top-level window that has been quiet for at least 500 ms), not merely when the bridge HTTP server is up. Default timeout is 45 seconds.
Tools
Agent Skill
A companion skill ships at skills/pyside6-mcp/SKILL.md
and is installed automatically with the plugin. It tells the agent when and how
to use these tools — no need to explain the workflow every time.
Architecture
Thread safety: all Qt operations are marshaled to the main thread via QApplication.postEvent with a custom event type — the same mechanism Qt uses internally for cross-thread signals.
Examples
examples/test_app.py— minimal PySide6 app to verify the bridgeexamples/mcp-config.json— generic MCP config (Cursor, VS Code, Windsurf, …)examples/cursor-mcp-config.json— Cursor-specific templateexamples/claude-mcp-config.json— same format, kept for reference
License
MIT
來源:README.md,提交 6d3a4f2
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分