# PySide6 MCP

Lets an AI assistant screenshot, inspect and click through a running PySide6 app. Your project's source stays untouched.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: com55
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/com55/pyside6-mcp
- Updated: 2026-09-05
- HTML: https://affpapa.org/en/nevibecode/mcp/pyside6-mcp

## What it does

The flow is short: the assistant calls MCP tools, they hit a local HTTP bridge on an ephemeral port, and the bridge talks to the live app. `launch_app(cwd=…)` starts the program for you and returns once a visible top-level window has been quiet for a while. Bridge modules arrive through an isolated `PYTHONPATH`, so the server's own dependencies never land in the app environment.

The toolset covers screenshots, the full widget hierarchy, widget lookup by class, `objectName` or text, mouse clicks, keyboard input, named keys, app state and logs. `get_widget_info` dumps the properties of a single widget, and there is a way to run Python inside the app process when inspection alone is not enough.

You need Python 3.11+, PySide6 6.6+ and `uv` on `PATH`. Without `uv` nothing starts, since the server runs through `uvx`. Windows is the tested platform; Linux and macOS should follow. When you start the app yourself, the bridge listens on `http://127.0.0.1:7890` and `PYSIDE6_MCP_PORT` changes that.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add pyside6-mcp -- uvx pyside6-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyside6-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add pyside6-mcp -- uvx pyside6-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyside6-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "pyside6-mcp": {
            "command": "uvx",
            "args": [
                "pyside6-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyside6-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "pyside6-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "pyside6-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyside6-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add pyside6-mcp uvx pyside6-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyside6-mcp <command>

## When to use it
- capture a window or a single widget
- map the widget tree with classes and geometry
- locate an element by `objectName` or label text
- fill a form and submit it with a click
- pull application logs into the chat

## Example prompts
- Launch the app from `backend/gui.py` and screenshot the main window
- Why is the checkbox disabled? Check its state with `get_widget_info`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
