Metadata-Version: 2.4
Name: mcp-window-vision
Version: 0.2.0
Summary: Cross-platform MCP server giving AI assistants screen vision and Unity Console-log access (macOS / Windows / Linux).
Project-URL: Homepage, https://github.com/opieeipo/MCPWindowVision
Project-URL: Issues, https://github.com/opieeipo/MCPWindowVision/issues
Author: Matthew Frazier
License-Expression: MIT
License-File: LICENSE
Keywords: cross-platform,mcp,model-context-protocol,screenshot,unity,vision
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: mss>=9.0
Requires-Dist: pillow>=9.0
Description-Content-Type: text/markdown

# MCP Window Vision

A small, **cross-platform** [MCP](https://modelcontextprotocol.io) server (macOS / Windows /
Linux) that gives an AI assistant **eyes on your screen** and access to **Unity's Console
log** — so an agent working on a GUI app (like a Unity project) can *see* the result and
*read* the errors itself, instead of asking you to screenshot and paste.

Screenshots use [`mss`](https://pypi.org/project/mss/) + [`Pillow`](https://pypi.org/project/Pillow/)
(both cross-platform). The MCP transport is pure standard library. Runs on Python 3.9+.

## Tools

| Tool | What it does |
|------|--------------|
| `capture_screen` | Screenshot the main display (downscaled), returned as a PNG image |
| `capture_region` | Screenshot a rectangle `{x, y, w, h}` (pixels) |
| `read_unity_console` | Tail Unity's `Editor.log` (Debug.Log / errors / compile messages); optional substring filter |

## Requirements

- macOS, Windows, or Linux (Linux capture needs X11)
- Python 3.9+
- macOS only: **Screen Recording permission** for whatever process launches the server
  (your terminal / MCP client): *System Settings → Privacy & Security → Screen Recording*.

Unity `Editor.log` is found automatically per-OS:

| OS | Path |
|----|------|
| macOS | `~/Library/Logs/Unity/Editor.log` |
| Windows | `%LOCALAPPDATA%\Unity\Editor\Editor.log` |
| Linux | `~/.config/unity3d/Editor.log` |

## Install

```bash
pip install mcp-window-vision
```

This installs the `mcp-window-vision` console command.

Verify screen capture works (and that permission is granted):

```bash
mcp-window-vision --selftest
# -> "capture OK — NNNNN base64 chars"
```

## Use with Claude Code

User scope (available in every project):

```bash
claude mcp add window-vision --scope user -- mcp-window-vision
```

…or per-project via a `.mcp.json` at the project root:

```json
{
  "mcpServers": {
    "window-vision": {
      "type": "stdio",
      "command": "mcp-window-vision"
    }
  }
}
```

Restart the session so the client picks up the server. (Before publishing/installing, you
can point `command` at `python3` with `args: ["/path/to/src/mcp_window_vision/server.py"]`.)

## Develop

```bash
git clone https://github.com/opieeipo/MCPWindowVision
cd MCPWindowVision
pip install -e .
mcp-window-vision --selftest
```

## Roadmap

- v0.1: macOS screen/region capture + Unity log reading.
- v0.2 (current): cross-platform (macOS / Windows / Linux) via `mss` + `Pillow`.
- next: a Unity-side C# bridge for live editor control (run menu items, inspect serialized
  references, enter/exit Play) — closing the loop fully.

## License

MIT
