qt-mcp
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-mcpscreenshot of 'Calculator' window"
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
An MCP (Model Context Protocol) server for inspecting Qt applications through screenshots and performing basic filesystem operations.
qt-mcp 0.3.0 lets an MCP-capable AI client see a Qt or desktop application, inspect complete windows, selected regions, or named widgets, and read or update nearby project files. It uses the MCP Python SDK v1.28.1 high-level FastMCP API and stdio transport. The architecture is inspired by VibeUE, adapted for Qt and general desktop windows.
Features at a glance
Screenshot tools
Enumerate visible top-level windows and their geometry.
Capture a whole window by exact or partial title.
Capture an absolute screen rectangle or a rectangle relative to a window.
Capture a named
QWidgetprecisely through the standalone proxy/agent or the embedded server.Let the standalone server wait for an agent-enabled Qt app to attach over a Unix domain socket.
Return screenshots directly as PNG image content to the MCP client.
Filesystem tools
Read and write text files.
List and create directories.
Move, rename, and delete files or directory trees.
Inspect file metadata.
Search recursively by glob or regular-expression content.
See the complete tool reference for exact signatures and return shapes.
Related MCP server: qt-mcp
Platform support
Platform | Window enumeration | Screen grab | Extra system dependency |
Linux/X11 |
|
|
|
Windows | Win32 |
| None |
Wayland and macOS are not currently supported by the OS-level window-discovery path. Linux also has an optional ImageMagick import fallback if mss cannot grab the display.
Requirements
Python 3.10 or newer.
An active desktop session.
Linux: an X11 session with
DISPLAYset, pluswmctrlorxwininfofromx11-utils.Windows: no additional system package.
On Debian or Ubuntu:
sudo apt install wmctrl
# Alternatively: sudo apt install x11-utilsQuick start
From the repository root:
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/python -m qt_mcp.serverOn Windows PowerShell:
py -m venv .venv
.venv\Scripts\python.exe -m pip install -e .
.venv\Scripts\python.exe -m qt_mcp.serverThe installed console script is also available as .venv/bin/qt-mcp on Linux or .venv\Scripts\qt-mcp.exe on Windows. The server uses stdin and stdout for MCP JSON-RPC, so it normally should be launched by an MCP client rather than an interactive terminal.
Proxy mode
A Qt app can remain a normal application and opt into exact widget capture with one call:
from qt_mcp.agent import start_agent
agent = start_agent(window)The MCP client launches standalone qt_mcp.server, which listens on /tmp/qt-mcp-<uid>.sock on Linux/macOS or the qt-mcp-<username> named pipe on Windows, then proxies capture_widget(widget_name) to the attached app's GUI thread. See the complete proxy/agent integration recipe.
Connect an MCP client
Claude Code, Cursor, Antigravity, and other stdio MCP clients use the same command-and-arguments pattern. Put the server entry in the client's MCP configuration file; the exact configuration-file location varies by client.
Use the absolute path to the virtual environment's Python executable. GUI clients often start with a restricted PATH, so relying on python or qt-mcp being globally discoverable is fragile.
Linux
{
"mcpServers": {
"qt-mcp": {
"command": "/home/you/projects/Gui Editor MCP/.venv/bin/python",
"args": ["-m", "qt_mcp.server"]
}
}
}Windows
{
"mcpServers": {
"qt-mcp": {
"command": "C:/Users/you/projects/Gui Editor MCP/.venv/Scripts/python.exe",
"args": ["-m", "qt_mcp.server"]
}
}
}Forward slashes avoid JSON backslash escaping on Windows. A Linux template is also available in mcp-config.example.json.
Three operating modes
Mode | Process model | Tools | Widget capture | Best for |
Standalone OS capture, | Separate stdio server observes desktop windows | 15 | OS-level windows and regions | Zero-change setup and quick inspection |
Standalone proxy + Qt agent | The same standalone server proxies to one attached Qt app | 15 | Real | Reusable server plus a normal independently launched Qt app |
In-process example, | Qt app embeds FastMCP in a background thread | 14 | Real | Tight coupling where the app itself is the MCP server |
The standalone server always advertises 15 tools; its three proxy tools start the platform transport lazily and require an attached agent for widget operations. OS-level mode requires no target-app changes. Proxy and in-process modes both capture occluded or off-screen widgets precisely. Follow the integration guide, and see the implementations in src/qt_mcp/agent.py and examples/qt_editor/.
Example workflow
# 1. Find the Qt app window
list_windows()
# -> {"windows": [{"id": "0x038...", "title": "My Qt App — main.cpp", ...}], ...}
# 2. Capture the whole window (the vision model receives the PNG)
capture_window(title="My Qt App")
# 3. Capture a panel relative to that window
capture_region(title="My Qt App", x=10, y=40, width=400, height=300)
# 4. Save inspection notes through the filesystem tools
write_file(path="/tmp/notes.md", content="Top panel shows the toolbar...")This screenshot-to-inspection-to-filesystem loop lets the client correlate the rendered interface with the files that produce it.
Project layout
.
├── docs/
│ ├── ARCHITECTURE.md
│ ├── DEVELOPMENT.md
│ ├── INTEGRATION.md
│ └── TOOLS.md
├── examples/
│ ├── qt_editor/
│ │ ├── __init__.py
│ │ ├── editor_window.py
│ │ ├── main.py
│ │ └── mcp_server.py
│ └── qt-editor.mcp-config.example.json
├── src/qt_mcp/
│ ├── __init__.py
│ ├── agent.py
│ ├── agent_proxy.py
│ ├── filesystem.py
│ ├── protocol.py
│ ├── screenshots.py
│ └── server.py
├── tests/
├── mcp-config.example.json
├── pyproject.toml
└── README.mdDocumentation
Tool reference — exact signatures, parameters, return shapes, and calls for all standalone and in-process tools.
Integration guide — how to use OS-level capture, attach an agent to the standalone proxy, or embed a server in your Qt app.
Architecture — capture pipeline, module responsibilities, concurrency model, dependencies, and errors.
Development — contributor setup, manual stdio testing, adding tools, platform checks, and releases.
Roadmap
Add Wayland OS-level capture through platform-appropriate tools or portals.
Add macOS window discovery and capture.
Generalize
CaptureBridgeinto a reusable package component.Add configurable screenshot persistence.
Expand automated platform and protocol tests.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cristopulos/QT_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server