PcGöz
Click on "Deploy 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., "@PcGözlook at my screen, find the Save button, and click it"
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.
PcGöz
PcGöz is a Model Context Protocol (MCP) server that lets Claude (Claude Code CLI, or the Code tab of the Claude desktop app) see and use the Windows desktop. It combines the Microsoft UI Automation accessibility tree, screenshots annotated with numbered boxes, and real mouse/keyboard input through Windows SendInput — all sharing one set of element numbers.
Notice: Unofficial community project. Not affiliated with, sponsored by, or endorsed by Anthropic.
English · Türkçe
English
Have Claude Review It First
Before configuring PcGöz in your system, let Claude review this repository.
Why this matters:
Safety awareness: PcGöz drives real hardware-level mouse and keyboard inputs, captures full-screen and window screenshots, and logs every action to disk. You should verify its safety mechanisms and operational boundaries before granting it access.
Operational proficiency: Claude itself will use these tools. Reviewing the architecture beforehand—how UI Automation trees correlate with screenshot bounding boxes, when to prefer pattern invocation over clicks, how the physical input lock works, and how the emergency stop is structured—enables Claude to operate your desktop with higher precision and fewer mistakes.
Recommended Prompt (Copy & Paste to Claude)
Clone the repository locally, start a Claude Code session inside it, and run:
I am considering installing PcGöz as a desktop automation MCP server. Please inspect the source code in this repository and answer the following questions:
1. What is the security and safety model? Which operations are blocked, restricted, or sanitized?
2. Which tools send physical inputs (mouse/keyboard), and which tools are strictly read-only?
3. How can I, as the user, immediately stop execution if something goes wrong?
4. Exactly what data is written to the audit log, where is it stored, and does it store passwords or clipboard text?
5. Does this MCP server make any outbound network connections or communicate with external servers?
6. Generate step-by-step installation and MCP configuration commands tailored specifically for my Windows environment.After installing PcGöz, also install the companion skill (skills/masaustu-kullanimi) into Claude so it understands desktop automation best practices across all sessions.
How It Works
PcGöz connects three pillars into a unified feedback loop:
flowchart TD
subgraph S["1. Accessibility Tree (UIA)"]
UIA["Microsoft UI Automation<br/>Role, Name, Value, State, Coordinates"]
end
subgraph V["2. Annotated Vision"]
SHOT["Screen Capture<br/>Overlaid with numbered bounding boxes: Box [7]"]
end
subgraph A["3. Hardware Automation"]
INP["SendInput / UIA Pattern<br/>Direct invocation or physical mouse/keyboard"]
end
UIA -->|Same identifier space: ref_7| SHOT
SHOT -->|Visual confirmation| INP
INP -->|Live state diff: 0.3-1.2s| UIAMicrosoft UI Automation: Reads deep accessibility hierarchies (
CUIAutomation8) to retrieve element roles, states, texts, and exact screen coordinates in single-pass COM queries.Annotated Screenshot: Captures a window, a region or the whole screen and draws labeled boxes for the detected elements.
SendInput Simulation: Drives mouse clicks, keyboard text injection, and window management with low-level Windows APIs.
Unified Reference Space: Element ref_7 in the accessibility tree matches box 7 drawn on the screenshot. Claude can visually identify a button on screen and immediately interact with ref_7 without calculating pixel offsets manually. Every action automatically inspects UI changes and reports new, modified, or closed elements.
Tools Reference
PcGöz exposes 13 tools. All tool descriptions and returned messages are formatted in clear Turkish (ASCII), which Claude understands natively and reliably.
Group | Tool Name | Description | Sends Input? |
Vision |
| Lists open top-level windows, active popup menus, process names, coordinates, and multi-monitor setups. | ❌ No |
Vision |
| Dumps the UI Automation accessibility tree of a window. Assigns | ❌ No |
Vision |
| Case- and diacritic-insensitive search across names, values, roles, and automation IDs within a window. Returns up to 20 matches. | ❌ No |
Vision |
| Extracts plain document and interface text from a target window or specific | ❌ No |
Vision |
| Captures window, region, or full screen. | ❌ No |
Vision |
| On-screen text recognition using Windows built-in OCR ( | ❌ No |
Action |
| Executes element actions via native UI Automation patterns (Invoke, Toggle, Select, Expand/Collapse, Value, ScrollIntoView) without moving the mouse cursor. | ⚠️ Yes (UIA) |
Action |
| Performs physical hardware interactions: | ⚠️ Yes |
Action |
| Brings a window to the foreground. Automatically clicks the caption bar ( | ⚠️ Yes |
Action |
| Manages window state: | ⚠️ Yes |
Utility |
| Polls UI until an element appears or disappears ( | ❌ No |
Utility |
| Reads ( | ⚠️ Yes ( |
Utility |
| Executes multiple tool calls sequentially in a single turn, stopping at the first failure. Holds the physical input lock across the entire batch. | ⚠️ Yes (if batch acts) |
During active input execution, an on-screen HUD appears in the top-left corner. It automatically displays Turkish or English based on Windows system language and can be overridden with thePCGOZ_LANG=tr|en environment variable.
Safety Model (Code-Verified)
PcGöz operates under a free execution + local audit log philosophy. Instead of interrupting Claude with interactive approval prompts for routine clicks, it enforces rigorous deterministic safety layers in code:
Physical Input Lock (
inputguard.py:9-35, 258-337):Uses low-level Windows hooks (
WH_KEYBOARD_LL,WH_MOUSE_LL). When an action begins, user keyboard presses and mouse movements are intercepted and swallowed. Injected automation events (LLKHF_INJECTED,LLMHF_INJECTED) pass through seamlessly.Unlike Windows
BlockInput, this hook does not drop release events (WM_KEYUP, mouse button releases pass through so held keys never get stuck) and preserves emergency shortcuts.If the user holds modifier keys (Ctrl/Alt/Shift/Win) or mouse buttons when the lock begins, PcGöz waits up to 1.5 seconds (
config.HELD_WAIT_S = 1.5). If still held, it emits synthetic releases with a dummy mask key (0xE8) to prevent accidental Start Menu or menu bar activation.Safety timeout: Locks auto-release after 30 seconds for single actions or 60 seconds for batch jobs (
BLOCK_MAX_S = 30.0,BLOCK_BATCH_MAX_S = 60.0). Can be disabled viaPCGOZ_BLOCK_INPUT=0.
Emergency Stop (
safety.py:81-150, 269-324):Global hotkey toggle:
Ctrl+Alt+Shift+Esc.Fallbacks if registered by another app:
Ctrl+Alt+Shift+Pause,Ctrl+Alt+Shift+F12,Ctrl+Shift+Alt+Backspace.If no hotkey can be registered, a prominent warning is prepended to all action responses (
safety.hotkey_warning()).Cross-process synchronization: All running PcGöz server instances share a named event (
Local\PcGozAcilDurdurma). Triggering emergency stop in any session instantly freezes all sessions.
On-Screen Visual HUD (
overlay.py:8-20, 202-250):A layered, semi-transparent top-left window (
WS_EX_TRANSPARENT,WS_EX_NOACTIVATE,WS_EX_TOPMOST).Click-through and unfocusable; marked with
WDA_EXCLUDEFROMCAPTUREso it never appears in PcGöz's own screenshots or OCR.Warns the user when input is locked and how to stop it. Lingers for 0.4 seconds after actions complete to eliminate visual flickering. Can be disabled with
PCGOZ_OVERLAY=0.
Inter-Session Mutex (
inputguard.py:97, 200-216):A named mutex (
Local\PcGozGirdiKilidi) ensures multiple Claude sessions never fight over the physical keyboard or mouse queue simultaneously. Sessions queue up with a 20-second timeout (SESSION_WAIT_S = 20.0).
Hard Credential Blocks (
safety.py:470-523,config.py:138-144):Text typing (
pc_do type,pc_invoke value) is unconditionally rejected on elements withIsPassword=Trueand processes belonging to Windows credential interfaces (consent.exe,credentialuibroker.exe,logonui.exe,lsaiso.exe,winlogon.exe).Key injection (
pc_do key) into password targets is strictly whitelisted: only navigation and deletion keys (Tab, Enter, Esc, Backspace, Delete, Arrows, Home/End, PgUp/PgDn, Ctrl+A) are permitted. Typing character keys or pasting passwords is hard-blocked.
Secure Desktop Detection (
safety.py:155-172):Detects when Windows switches to the secure desktop (UAC elevation prompts, lock screen, Ctrl+Alt+Del). Halts input immediately and returns an explicit
SecureDesktoperror rather than injecting invisible keystrokes.
Stale Coordinate Protection (
server.py:241,refs.py):If a target element moves, closes, or is obscured after detection, stale coordinates are rejected instead of clicking blind pixels.
Safe Clipboard Restoration (
server.py:327-332,clipboard.py):Large text blocks (>200 characters) are pasted via delayed rendering (
WM_RENDERFORMAT). PcGöz backs up existing clipboard data (images, files, custom formats) and restores it once the target process reads the synthetic text.Monitored via destination PIDs (
windows.input_pids()) so background readers (such as Windows CrossDeviceService) do not trigger premature restoration. Does not pollute Win+V clipboard history.
Dry Run Mode: Set
PCGOZ_DRY_RUN=1to run all vision and inspection tools normally while logging simulated inputs without executing them.
Privacy & Data Flow (Code-Verified)
Audit Log File: Stored at
~/.pcgoz/actions.jsonl(or configured viaPCGOZ_LOG_DIR). Automatically rotates toactions.1.jsonlwhen exceeding 5 MB (config.LOG_MAX_BYTES = 5 * 1024 * 1024).What is logged:
Timestamp, tool name, PID, correlation call ID, execution time (ms), success/error status.
pc_dotype: The text string typed into applications is logged (safety.auditrecordstext=text). Password fields are blocked from typing (see Safety Model), so passwords never reach this log through PcGöz.pc_dokey: The key or combo executed is logged (safety.auditrecordskey=key).pc_invoke: Target label, action name, and character count are logged (chars=len(value)).Clipboard text: NEVER logged. Only character count (
chars=len(...)) is recorded for clipboard read/write actions.Screenshots: NEVER logged or saved to disk. Image buffers are held in memory and returned directly to the MCP protocol channel.
Vision read tools: Argument queries and document contents are not logged, only tool name, timing, and error outcomes.
Zero Outbound Network Connections:
The PcGöz MCP server makes ZERO network connections (no telemetry, no tracking, no external API calls).
OCR and vision processing run entirely on your local CPU/GPU using Windows native APIs (
Windows.Media.Ocr).Honest Data Flow Note: Because
pc_screenshotreturns PNG image data over stdio to Claude Code, those screenshots are transmitted by the Claude client to Anthropic's model servers as part of your active chat session.
System Requirements
Operating System: Windows 10 version 2004 (build 19041) or later, or Windows 11 (x64) — needed so the on-screen warning stays out of screenshots (
WDA_EXCLUDEFROMCAPTURE)Python Runtime: Python 3.12 or newer
Package Manager:
uvrecommendedClient: Claude Code CLI or Claude Desktop (Code integration)
OCR Support: Built-in Windows OCR (Language pack with Optical Character Recognition enabled in Windows Settings > Time & Language)
Step-by-Step Installation
1. Clone & Synchronize Dependencies
git clone https://github.com/emperorbug46/PcGoz
cd PcGoz
uv sync2. Register with Claude Code
Option A — Via Claude Code CLI (Recommended):
claude mcp add pcgoz --scope user -- "C:\yol\PcGoz\.venv\Scripts\python.exe" -m pcgozOption B — Manual Registration in ~/.claude.json:
Add pcgoz to your user-level mcpServers object in ~/.claude.json:
{
"mcpServers": {
"pcgoz": {
"type": "stdio",
"command": "C:\\yol\\PcGoz\\.venv\\Scripts\\python.exe",
"args": ["-m", "pcgoz"]
}
}
}Why call .venv\Scripts\python.exe directly instead of uv run?
Claude Code spawns the MCP server on demand. Invoking uv run requires uv to be present on the system PATH and risks triggering network dependency checks on launch, which can lead to silent startup timeouts. Calling the virtual environment's Python binary directly guarantees instant, deterministic, and offline startup.
3. Install the Companion Desktop Skill
The skill directs Claude on when to use PcGöz versus shell tools, and teaches it how to handle focus and navigation quirks:
New-Item -ItemType Junction -Path "$HOME\.claude\skills\masaustu-kullanimi" -Target "C:\yol\PcGoz\skills\masaustu-kullanimi"4. Verify the Installation
Restart Claude Code. In your terminal, run the diagnostic verification command:
.\.venv\Scripts\python.exe -m pcgoz --doctor5. Plugin Distribution (Alternative)
This repository includes Claude plugin manifests (.claude-plugin/plugin.json, .mcp.json). You can install it as a plugin:
claude plugin install C:\yol\PcGoz(Note: Plugin manifest packaging is implemented, but independent CLI verification is pending).
Example Prompts for Claude
Once PcGöz is active, you can give Claude real desktop tasks:
"Open Notepad, type a two-stanza poem, and verify that all characters were typed accurately."
"Look at the active error dialog on my screen, read the error message, and tell me what went wrong."
"Build and run my WinForms project, then check whether the main window opened with all buttons and fields intact."
"Open Windows Settings, navigate to Display, and read the recommended scaling percentage."
"Find the File Explorer window showing our project folder and tell me the size of README.md."
Command-Line Diagnostics
PcGöz provides built-in maintenance tools accessible via Python CLI:
Command | Functionality |
| Comprehensive diagnostic check: verifies DPI awareness (Per-Monitor V2), accessibility root, visible window enumeration, hotkey registration status, admin elevation, log directory state, and checks whether |
| Deletes and regenerates corrupted or stale |
| Executes runtime health checks on the current system without inspecting configuration files. |
| Analyzes and formats |
Test Suite
The test suite under tests/ verifies edge cases and hardware integration:
tests/smoke.py: End-to-end automation test using Notepad. Uses the mouse and keyboard for ~20 seconds and runs a series of checks (including Turkish Unicode round-trips and stale ref handling), and cleanly exits without killing processes.tests/kilit_canli.py: Interactive input guard verification. After a 5-second countdown it locks the keyboard and mouse for 8 seconds while you move/type, and reports the swallowed events.tests/kapsam.py: Validates UI Automation across open apps, UWP Settings navigation, cold browser launch, emergency freeze, and password blocking. (Brave browser tests are skipped if Brave is not installed).tests/agir_sayfa.py: Benchmarks cold and warm tree reading on heavy 1,500-row HTML pages (~9,000 UIA elements). (Requires Brave; exits if missing).tests/ocr_olcum.py: Evaluates Windows OCR accuracy and performance across 1×/2×/3× scaling and BICUBIC vs. LANCZOS resampling.tests/birim.py: Pure unit tests for coordinate normalization, shortcut parsing, password whitelisting, and lock decision logic (requires no input or windows).tests/pano.py: Validates delayed rendering clipboard exchange, background reader filtering, and format preservation.tests/tus_probu.py: Tests key stroke injection and cursor placement inside a sandboxed test window (~2s of isolated input).tests/mcp_istemci.py: Spawns the MCP server over stdio to test protocol handshakes and fallback diagnostic modes.
Limitations & Known Quirks
Elevated Windows (UIPI): If an application runs as Administrator while Claude Code runs un-elevated, Windows User Interface Privilege Isolation (UIPI) blocks messages and clicks. Launch Claude Code with administrative privileges if you need to automate elevated utilities (like Task Manager).
Secure Desktop: UAC prompts, lock screens, and
Ctrl+Alt+Delrun on the isolatedWinlogondesktop. No standard process can access it. PcGöz halts input and returns aSecureDesktoperror.Non-Standard Frameworks: Custom rendering engines (Qt, canvas, video games, remote desktops) do not populate accessibility trees. Use
pc_ocrandpc_screenshotas fallbacks.Hung Applications: Unresponsive windows are probed via a 500ms
WM_NULLping, and COM calls useCUIAutomation8timeouts (2s connection / 10s operation) so a frozen program never deadlocks the agent.Focus Stealing Lock: If Windows blocks
SetForegroundWindow,pc_focusautomatically clicks an unoccluded coordinate on the target's caption bar (HTCAPTION).Deep Architecture Details: For technical measurements and history, see docs/GELISTIRICI-NOTLARI.md.
Troubleshooting
Server Enters Fallback Mode: If an import fails, the server does not crash with a silent
CONNECTION_CLOSED. It starts in fallback mode, offering all 13 tools with detailed instructions to run--repair.Broken Accessibility Cache: Run
python -m pcgoz --repairto rebuildcomtypeswrappers.Moved Folder or Missing Tools: If Claude cannot find PcGöz tools, run
python -m pcgoz --doctorto check if~/.claude.jsonpoints to a moved directory.
License & Disclaimer
License: Distributed under the MIT License.
Disclaimer: PcGöz simulates real mouse and keyboard inputs and directly manipulates desktop windows. Use it responsibly and review automated workflows before execution.
Related MCP server: screenmcp-claude-plugin
Türkçe
English · Türkçe
Kurmadan Önce Claude'a İnceletin
PcGöz'ü bilgisayarınıza kurup kaydetmeden önce depoyu Claude'a inceletin.
Bu adımın iki yönlü gerekçesi:
Güvenlik farkındalığı: PcGöz bilgisayarınızın gerçek faresini ve klavyesini sürer, ekran görüntüleri alır ve eylemleri yerel diske kaydeder. Sisteminize bu yetkileri vermeden önce güvenlik mekanizmalarını bilmeniz gerekir.
Kullanım yetkinliği: Bu araçları zaten Claude kullanacaktır. Ref numara uzayını, erişilebilirlik ağacı ile ekran görüntüsü bağını, UIA desenlerini, girdi kilidini ve acil durdurma modelini önceden okuyup öğrenmesi, Claude'un masaüstünüzü çok daha hatasız ve kararlı yönetmesini sağlar.
Kopyalanabilir İstem (Claude'a Verilecek Prompt)
Depoyu bilgisayarınıza klonlayın, Claude Code oturumu açın ve şu istemi iletin:
PcGöz'ü masaüstü kontrolü ve görsel otomasyon için bir MCP sunucusu olarak kurmayı düşünüyorum. Lütfen bu depodaki kaynak kodları incele ve şu soruları yanıtla:
1. Güvenlik modeli nedir? Hangi eylemler engellenir, denetlenir veya filtrelenir?
2. Hangi araçlar fiziksel girdi (fare/klavye) gönderir, hangileri tamamen salt okunurdur?
3. Bir sorun olursa kullanıcı olarak eylemleri anında nasıl durdurabilirim?
4. Denetim günlüğüne tam olarak neler yazılır, nerede tutulur; parola veya pano metinleri kaydedilir mi?
5. Bu MCP sunucusunun internete veya harici bir ağa erişimi var mı?
6. Benim Windows ortamıma göre adım adım kurulum ve MCP kayıt komutlarını çıkar.PcGöz'ü kurduktan sonra skills/masaustu-kullanimi becerisini de Claude'a yükletin; böylece Claude oturumlar boyunca yönlendirme ve kullanım kurallarını kalıcı olarak hatırlar.
Nasıl Çalışır?
PcGöz, masaüstü otomasyonunu üç temel ayak üzerinde birleştirir:
flowchart TD
subgraph S["1. Erişilebilirlik Ağacı (UIA)"]
UIA["Microsoft UI Automation<br/>Rol, Metin, Değer, Durum, Tam Koordinat"]
end
subgraph V["2. Numaralandırılmış Görsel"]
SHOT["Ekran Görüntüsü<br/>Öğelerin üzerine çizilmiş kutular: Kutu [7]"]
end
subgraph A["3. Donanım Seviyesi Eylem"]
INP["SendInput / UIA Deseni<br/>Desensel tetikleme veya gerçek fare/klavye"]
end
UIA -->|Aynı numara uzayı: ref_7| SHOT
SHOT -->|Görsel doğrulama| INP
INP -->|Canlı durum farkı: 0.3-1.2 sn| UIAMicrosoft UI Automation: Ekrandaki tüm pencerelerin ve bileşenlerin rollerini, durumlarını, metinlerini ve koordinatlarını
CUIAutomation8üzerinden tek COM çağrısıyla çeker.Numaralandırılmış Ekran Görüntüsü: Alınan ekran görüntüsünün üzerine tespit edilen öğelerin sınır kutularını ve referans numaralarını çizer.
SendInput Sürüşü: Fare tıklamalarını, metin yazımını ve pencere işlemlerini gerçek Windows donanım mesajlarıyla yürütür.
Ortak Numara Uzayı: Erişilebilirlik ağacında ref_7 olarak görünen buton, ekran görüntüsünde 7 etiketli kutudur. Claude ekrandaki kutuyu görüp doğrudan ref_7 ile eyleme geçebilir; piksel hesabı yapmasına gerek kalmaz. Her eylemden sonra ekran otomatik olarak izlenir ve neyin değiştiği raporlanır.
Araçlar Tablosu
PcGöz toplam 13 araç sunar. Araç açıklamaları ve dönen mesajlar Türkçe (ASCII) olarak kodlanmıştır; Claude bu metinleri sorunsuz bir şekilde anlar.
Grup | Araç Adı | Açıklama | Girdi Gönderir mi? |
Görme |
| Açık pencereleri, aktif menüleri, süreç adlarını, koordinatları ve çoklu ekranları listeler. | ❌ Hayır |
Görme |
| Pencerenin UI Automation erişilebilirlik ağacını okur, öğelere | ❌ Hayır |
Görme |
| Pencere içinde rol, metin, değer ve automation ID araması yapar (büyük/küçük harf ve Türkçe aksan duyarsız). | ❌ Hayır |
Görme |
| Pencerenin veya belirli bir | ❌ Hayır |
Görme |
| Ekran görüntüsü alır (tüm ekran, pencere veya bölge). | ❌ Hayır |
Görme |
| Windows'un yerleşik OCR motoruyla ( | ❌ Hayır |
Eylem |
| UI Automation desenleriyle (Invoke, Toggle, Select, Expand/Collapse, Value, ScrollIntoView) fareyi oynatmadan eylem yapar. | ⚠️ Evet (UIA) |
Eylem |
| Donanım seviyesinde eylemler: | ⚠️ Evet |
Eylem |
| Pencereyi ön plana alır. Windows odak kilidi engellerse başlık çubuğuna ( | ⚠️ Evet |
Eylem |
| Pencere yönetimi: | ⚠️ Evet |
Yardımcı |
| Belirtilen öğe ekranda belirene veya kaybolana kadar ( | ❌ Hayır |
Yardımcı |
| Panoyu okur ( | ⚠️ Evet ( |
Yardımcı |
| Birden fazla aracı tek çağrıda sırayla çalıştırır, ilk hatada durur. Girdi kilidini tüm toplu iş boyunca tutar. | ⚠️ Evet (eylem varsa) |
Girdi kilitliyken ekranın sol üstünde çıkan uyarı penceresi Windows arayüz diline göre otomatik olarak Türkçe veya İngilizce görüntülenir. İstenirsePCGOZ_LANG=tr|en ortam değişkeniyle dil sabitlenebilir.
Güvenlik Modeli (Koddan Doğrulanmış)
PcGöz, onay sormayan serbest çalışma + eksiksiz yerel denetim günlüğü modelini benimser. Güvenliği kod seviyesindeki sıkı kurallarla sağlar:
Fiziksel Girdi Kilidi (
inputguard.py:9-35, 258-337):Düşük seviye Windows kancaları (
WH_KEYBOARD_LL,WH_MOUSE_LL) kullanılır. Eylem başladığı anda kullanıcının fiziksel fare ve klavye hareketleri yutulur; PcGöz'ün gönderdiği sentetik olaylar (LLKHF_INJECTED,LLMHF_INJECTED) engelsiz geçer.Windows
BlockInputfonksiyonundan farklı olarak tuş bırakma (WM_KEYUP, fare düğmesi bırakma) olayları kilitlenmez; böylece basılı tuşlar takılı kalmaz ve acil durdurma kısayolu çalışır.Kilit anında kullanıcı Ctrl/Alt/Shift/Win veya fare düğmesini basılı tutuyorsa 1,5 saniye bırakması beklenir (
config.HELD_WAIT_S = 1.5). Süre dolarsa atanmamış maske tuşuyla (0xE8) sentetik bırakma gönderilir (Başlat menüsü veya menü çubuğunun açılması önlenir).Zaman aşımı: Kilit tek eylemde en fazla 30 saniye, toplu işlerde 60 saniye sürer (
BLOCK_MAX_S = 30.0,BLOCK_BATCH_MAX_S = 60.0).PCGOZ_BLOCK_INPUT=0ile kapatılabilir.
Acil Durdurma (
safety.py:81-150, 269-324):Genel kısayol:
Ctrl+Alt+Shift+Esc(aç/kapa).Kısayol başka uygulama tarafından tutuluyorsa sırayla
Pause,F12,Backspacekombinasyonları denenir.Hiçbiri alınamazsa girdi üreten tüm araçların çıktılarına acil durdurmanın çalışmadığına dair belirgin bir uyarı eklenir (
safety.hotkey_warning()).Süreçler arası ortaklık: Tüm PcGöz sunucuları adlandırılmış bir olay nesnesi (
Local\PcGozAcilDurdurma) paylaşır. Herhangi bir oturumda kısayola basıldığında çalışan tüm PcGöz oturumları anında dondurulur.
Sol Üst Görsel Uyarı Penceresi (
overlay.py:8-20, 202-250):Yarı saydam (%80), koyu zeminli, tıklama geçiren (
WS_EX_TRANSPARENT), odak çalmayan (WS_EX_NOACTIVATE) ve en üstte duran (WS_EX_TOPMOST) penceredir.WDA_EXCLUDEFROMCAPTUREbayrağı sayesinde PcGöz'ün kendi ekran görüntülerine ve OCR taramasına asla girmez.Kullanıcıya klavye/farenin kilitli olduğunu ve durdurma kısayolunu gösterir. Kilit bittikten 0,4 saniye sonra kaybolur (
LINGER_S = 0.4).PCGOZ_OVERLAY=0ile devre dışı bırakılabilir.
Oturumlar Arası Sıra Mutex'i (
inputguard.py:97, 200-216):Adlandırılmış mutex (
Local\PcGozGirdiKilidi) ile aynı anda yalnızca tek bir Claude oturumunun masaüstüne girdi göndermesine izin verilir. Diğer oturumlar 20 saniyeye kadar sırada bekler (SESSION_WAIT_S = 20.0).
Sert Kimlik ve Parola Engelleri (
safety.py:470-523,config.py:138-144):IsPassword=Trueolan alanlara ve Windows kimlik süreçlerine (consent.exe,credentialuibroker.exe,logonui.exe,lsaiso.exe,winlogon.exe) metin yazma (pc_do type,pc_invoke value) koşulsuz olarak reddedilir (Refused).Parola alanlarına tuş gönderme (
pc_do key) izin listesiyle sınırlandırılmıştır: Yalnızca gezinme ve silme tuşlarına (Tab, Enter, Esc, Oklar, Backspace, Delete, Home/End, PgUp/PgDn, Ctrl+A) izin verilir; karakter tuşları ve yapıştırma sert şekilde engellenir.
Güvenli Masaüstü Kontrolü (
safety.py:155-172):Girdi masaüstü
Defaultdışında olduğunda (UAC yükseltme ekranı, Ctrl+Alt+Del ekranı, kilit ekranı) girdi gönderilmez; açıkçaSecureDesktophatası döndürülür.
Bayat Koordinat Koruması (
server.py:241,refs.py):Hedef pencere kapandıysa ya da hedef öğenin üstü başka bir pencereyle örtüldüyse eski koordinata tıklanmaz, hata verilir.
Güvenli Pano Yapıştırması (
server.py:327-332,clipboard.py):200 karakterden uzun metinler gecikmeli sunumla (
WM_RENDERFORMAT) pano üzerinden yapıştırılır. Kullanıcının mevcut panosu (resim, dosya, biçimlendirilmiş veri) hafızaya alınır ve hedef uygulama veriyi okuduktan sonra panoya geri yüklenir.Yalnızca hedef sürecin PID'leri (
windows.input_pids()) okuyucu sayılır; Windows Cihazlar Arası Pano servisinin erken okuması filtrelenir. Win+V pano geçmişine girmez.
Dry Run Kipi:
PCGOZ_DRY_RUN=1ile tüm görme araçları normal çalışırken girdi araçları fiziksel eylem yapmaz, sadece günlüğe yazar.
Gizlilik ve Veri Akışı (Koddan Doğrulanmış)
Denetim Günlüğü Yolu:
%USERPROFILE%\.pcgoz\actions.jsonl(veyaPCGOZ_LOG_DIRdeğişkeni). 5 MB'ı aştığında otomatik olarakactions.1.jsonladına yedeklenerek döndürülür (config.LOG_MAX_BYTES = 5 * 1024 * 1024). Eski%LOCALAPPDATA%\PcGozkayıtları otomatik aktarılır.Günlüğe Neler Yazılır:
Zaman damgası, araç adı, süreç kimliği (PID), çağrı ID'si, milisaniye cinsinden süre, başarı/hata durumu.
pc_dotype: Yazılan metin günlüğe yazılır (safety.auditkaydındatext=textyer alır). Parola alanlarına yazma engelli olduğu için (bkz. Güvenlik Modeli) parolalar PcGöz üzerinden bu günlüğe girmez.pc_dokey: Gönderilen tuş kombinasyonu günlüğe yazılır (key=key).pc_invoke: Hedef öğe, desen adı ve değer uzunluğu günlüğe yazılır (chars=len(value)).Pano içeriği: ASLA günlüğe yazılmaz. Pano işlemlerinde yalnızca karakter sayısı (
chars=len(...)) kaydedilir.Ekran görüntüleri: ASLA diske veya günlüğe kaydedilmez. PNG verisi sadece bellekte tutulur ve MCP kanalıyla istemciye iletilir.
Görme/okuma araçları: Arama terimleri veya okunan belge içerikleri günlüğe yazılmaz; sadece araç adı, süre ve başarı durumu yazılır.
Ağ Erişimi Yoktur:
PcGöz sunucusu internete veya herhangi bir harici ağa asla bağlanmaz (sıfır ağ çağrısı, yerel stdio MCP).
Ekran görüntüleri ve OCR işlemleri tamamen yerel işlemcinizde (
Windows.Media.Ocr) çalışır.Veri Akışı Notu:
pc_screenshotaracı MCP üzerinden ekran görüntüsü baytlarını Claude Code istemcisine döndürdüğü için, bu görüntüler sohbet bağlamınızın parçası olarak Anthropic model sunucularına iletilir.
Gereksinimler
İşletim Sistemi: Windows 10 sürüm 2004 (derleme 19041) veya üstü ya da Windows 11 (x64) — ekrandaki uyarının ekran görüntülerine girmemesi için (
WDA_EXCLUDEFROMCAPTURE)Python: Python 3.12 veya üzeri
Paket Yöneticisi:
uvİstemci: Claude Code (CLI veya Claude Masaüstü uygulamasının Code sekmesi)
OCR Bileşeni: Windows'un yerleşik OCR motoru (Ayarlar > Zaman ve dil > Dil ve bölge üzerinden kurulu dil için Optik Karakter Tanıma bileşeni)
Kurulum Adımları
1. Depoyu Klonlayın ve Bağımlılıkları Kurun
git clone https://github.com/emperorbug46/PcGoz
cd PcGoz
uv sync2. Claude Code'a MCP Sunucusu Olarak Kaydedin
Yol 1 — Claude Code CLI ile (Önerilen):
claude mcp add pcgoz --scope user -- "C:\yol\PcGoz\.venv\Scripts\python.exe" -m pcgozYol 2 — ~/.claude.json Dosyasına Elle Kayıt:
Kullanıcı profilinizdeki ~/.claude.json dosyasında mcpServers bölümüne ekleyin:
{
"mcpServers": {
"pcgoz": {
"type": "stdio",
"command": "C:\\yol\\PcGoz\\.venv\\Scripts\\python.exe",
"args": ["-m", "pcgoz"]
}
}
}Neden uv run yerine sanal ortamın python'u doğrudan çağrılır?
Claude Code her açıldığında MCP sunucusunu başlatır. O anda ortam değişkenlerinde uv bulunmayabilir veya paket çözümlemesi ağ gecikmesine takılabilir. Bu durum araçların sessizce kaybolmasına yol açar. Doğrudan sanal ortamın python.exe dosyasını çağırmak deterministiktir ve anında başlar.
3. Kullanım Becerisini (Skill) Bağlayın
Beceriyi bağlamak, Claude'un oturumlar boyunca PcGöz'ü hangi durumlarda ve nasıl kullanacağını bilmesini sağlar:
New-Item -ItemType Junction -Path "$HOME\.claude\skills\masaustu-kullanimi" -Target "C:\yol\PcGoz\skills\masaustu-kullanimi"4. Kurulumu Doğrulayın
Claude Code'u yeniden başlatın. Terminalinizden teşhis aracını çalıştırın:
.\.venv\Scripts\python.exe -m pcgoz --doctor5. Eklenti Olarak Kurulum (Alternatif)
Depo Claude Code eklenti manifestlerini içerir (.claude-plugin/plugin.json, .mcp.json):
claude plugin install C:\yol\PcGoz(Not: Eklenti dosyaları hazırdır; CLI üzerinden doğrudan doğrulanması henüz tamamlanmamıştır).
Kullanım Örnekleri
Claude'a verebileceğiniz gerçek senaryo örnekleri:
"Not Defteri'ni aç, iki kıtalık bir şiir yaz ve metnin doğru yazıldığını doğrula."
"Ekranda açık olan hata penceresini incele, hata mesajını oku ve ne yapmam gerektiğini söyle."
"Geliştirdiğim WinForms uygulamasını derle, çalıştır ve ana pencerenin tüm düğmelerle birlikte açıldığını doğrula."
"Windows Ayarlar > Ekran sayfasına git ve önerilen ölçekleme oranını oku."
"Açık belgedeki 'Kaydet' düğmesine tıkla ve ekranda neyin değiştiğini kontrol et."
Komut Satırı Araçları
PcGöz bakım ve teşhis için dahili CLI bayrakları sunar:
Komut | Açıklama |
| Tam sistem teşhisi: DPI farkındalığı (Per-Monitor V2), UIA kök erişimi, pencere listesi, acil durdurma kısayolu, yönetici yetkisi, denetim günlüğü durumu ve |
| Bozulmuş veya bayatlamış |
| Konfigürasyon dosyalarına bakmadan sadece çalışma ortamı bileşenlerini test eder. |
|
|
Test Paketi
tests/ dizinindeki testler tüm otomasyon ve güvenlik sınırlarını doğrular:
tests/smoke.py: Not Defteri ile uçtan uca otomasyon testi (~20 saniye fareyi ve klavyeyi kullanır, Türkçe karakter ve bayat ref dahil bir dizi kontrol yapar, kaydetmeden kapatır).tests/kilit_canli.py: Canlı kilit denemesi (5 sn geri sayımdan sonra fare ve klavyeyi 8 saniye kilitler, fiziksel hareketlerin yutulduğunu doğrular).tests/kapsam.py: Erişilebilirlik kapsamı, UWP Ayarlar penceresi, soğuk tarayıcı açılışı, acil durdurma ve parola engelleme kontrolleri. (Brave kurulu değilse tarayıcı testi atlanır).tests/agir_sayfa.py: 1500 satırlık (~9000 UIA öğesi) ağır sayfada okuma performansı ve kaydırma doğruluğu testi. (Brave gerektirir; yoksa çalışmaz).tests/ocr_olcum.py: Windows OCR ölçekleme ve yeniden örnekleme ölçümleri (BICUBIC vs. LANCZOS).tests/birim.py: Pencere açmayan ve girdi göndermeyen saf birim testleri (koordinat dönüşümleri, kısayol çözümlemeleri, kilit mantığı).tests/pano.py: Gecikmeli sunumlu pano kopyalama, arka plan okuyucusu filtreleme ve veri kurtarma testi.tests/tus_probu.py: Tuş gönderimi ve imleç konumlandırma doğrulaması (~2 saniye test penceresinde çalışır).tests/mcp_istemci.py: Sunucunun stdio üzerinden MCP protokolüyle konuşmasını ve yedek modu test eder.
Sınırlamalar ve Bilinen Durumlar
Yönetici Pencereleri (UIPI): Claude Code standart kullanıcı haklarıyla çalışıyorsa yönetici yetkisiyle çalışan pencerelere tıklayamaz ve okuyamaz. Gerekirse Claude Code yönetici olarak başlatılmalıdır.
Güvenli Masaüstü: UAC istemleri, kilit ekranı ve
Ctrl+Alt+DelekranıWinlogonmasaüstünde çizilir. Hiçbir kullanıcı süreci erişemez; PcGöz bu durumdaSecureDesktophatası verir.Erişilebilirlik Vermeyen Uygulamalar: Qt, canvas veya oyun arayüzleri UIA ağacı üretmezse
pc_ocrvepc_screenshotkullanılmalıdır.Donmuş Uygulamalar: 500 ms
WM_NULLyoklaması veCUIAutomation8zaman aşımları sayesinde donan uygulamalar sunucuyu kilitlemez.Odak Kilidi: Windows
SetForegroundWindowçağrısını engellersepc_focusbaşlık çubuğunun güvenli bir noktasına tıklar.Ayrıntılı Ölçümler ve Mimari Notlar: Geçmiş ölçümler ve tasarım kararları için docs/GELISTIRICI-NOTLARI.md belgesine bakın.
Sorun Giderme
Sunucu Yedek Modda Açılıyor: Bir kütüphane veya COM hatası olduğunda sunucu çökmez; 13 aracın tümüyle yedek modda açılıp hatanın sebebini ve
--repairkomutunu bildirir.UIA Önbellek Bozulması:
python -m pcgoz --repairçalıştırarak önbelleği temizleyin.Klasör Taşıma Sonrası Araçların Görünmemesi:
python -m pcgoz --doctorçalıştırarak~/.claude.jsonkaydının güncel Python yolunu gösterdiğinden emin olun.
Lisans ve Sorumluluk Reddi
Lisans: Bu proje MIT Lisansı ile lisanslanmıştır.
Sorumluluk Reddi: PcGöz gerçek donanım seviyesinde fare ve klavye girdisi gönderir. Kendi sorumluluğunuzda kullanın; kritik sistemlerde çalıştırmadan önce güvenlik modelini inceleyin.
This server cannot be deployed
Maintenance
Related MCP Connectors
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
- SimSenseOAuthai.simsense
Deploy sims to any screen. Control your displays with Claude.
Deploy sims to any screen. Control your displays with Claude.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to fully control a Windows desktop with native screen capture, low-level input injection, game-grade input, and play-testing capabilities.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to control the local desktop via screenshot, mouse, keyboard, and clipboard operations.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to control mouse, keyboard, and clipboard on Windows, allowing AI-driven computer interaction tasks like clicking, typing, scrolling, and screenshotting.MIT
- AlicenseNot gradedqualityFmaintenanceEnables Claude Code to control a Windows desktop via screenshots, mouse, keyboard, and window/display enumeration, reusing the native binding from the Claude desktop app.MIT