Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qt-mcpTake a snapshot of the UI and click the 'Submit' button"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
qt-mcp
MCP (Model Context Protocol) server for inspecting, debugging, and interacting with Qt/PySide6 desktop applications — like Playwright MCP, but for desktop Qt apps.
Overview
qt-mcp gives AI coding agents full visibility into running PySide6 applications:
Widget tree snapshots — structured accessibility-like view of the entire UI
Property inspection — read all Qt properties on any widget
Interaction — click buttons, type text, press keys
Screenshots — capture any widget or full window as PNG
QGraphicsScene inspection — enumerate and inspect scene items
VTK/PyVista support — inspect 3D scenes and capture renders
Architecture
Installation
Quick Start
1. Instrument your app
Add the probe to your PySide6 application:
2. Configure Claude Code
Add to your MCP settings:
3. Use from Claude
Claude can now see and interact with your Qt app:
"Take a snapshot of the running application" "Click the 'Apply' button" "Type 'hello' into the search field" "Show me a screenshot of the 3D view"
MCP Tools
Tool | Description |
| Capture the full widget tree as a structured snapshot |
| Take a screenshot of a widget or full window |
| Get detailed properties of a specific widget |
| Click a widget (left/right/middle button, modifiers) |
| Type text into a widget |
| Send a key event (Return, Escape, Ctrl+S, etc.) |
| Set a Qt property on a widget |
| Invoke a slot/method on a QObject |
| List all top-level windows |
| Get the full QObject parent-child tree |
| Get all items in a QGraphicsScene |
| Get VTK scene state (camera, actors) |
| Capture a VTK render window |
Environment Variables
Variable | Default | Description |
| unset | Set to |
|
| Probe TCP listen port |
|
| Probe TCP host (MCP server side) |
Development
Troubleshooting
Probe not connecting
Ensure the probe is installed in the target app (check for
qt_mcp_probeinQApplication.children())Verify the port matches between probe and MCP server (
QT_MCP_PORT)Check that nothing else is using port 9142
Wayland issues
QWidget.grab()works from inside the process on both X11 and WaylandExternal screenshot tools may require portal authorization on Wayland
OpenGL widgets
QOpenGLWidget.grab()requires a real display server (X11/Wayland)With offscreen platform, grab() returns a valid pixmap but without GL content
Standard widgets and QGraphicsView work fine offscreen
License
Licensed under either of:
Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Contributing
See CONTRIBUTING.md for development workflow and contribution requirements.
Code of Conduct
See CODE_OF_CONDUCT.md.
Security
See SECURITY.md to report vulnerabilities.