Logo von OculOS

OculOS

Community
huseyinstif

If it's on the screen, it's an API. Control any desktop app via REST + MCP. Rust.

Herausgeberhuseyinstif
Repositoryoculos
SpracheRust
Forks
19
Sterne
132
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    OculOS stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    132 Sterne und 19 Forks im verlinkten Repository.


OculOS is a lightweight daemon that reads the OS accessibility tree and exposes every button, text field, checkbox, and menu item as a JSON endpoint. It works as a REST API for scripts, testing, and CI/CD — and as an MCP server for AI agents like Claude, Cursor, and Windsurf.

No screenshots. No pixel coordinates. No browser extensions. No code injection. No AI required. Just structured JSON.


Demo — Claude Code + OculOS → Calculator (5×5=25)

Claude Code uses OculOS MCP tools to open Calculator, find buttons, click 5 × 5 =, and read the result — fully autonomous.

Claude Code + OculOS → Spotify

Claude Code uses OculOS MCP tools to find Spotify, focus it, search for a song, and play it — fully autonomous.

Web Dashboard

Built-in dashboard with window list, interactive element tree, inspector, recorder, and live WebSocket events.


Quick Start

bash
git clone https://github.com/huseyinstif/oculos.git
cd oculos
cargo build --release

macOS: Grant Accessibility Permission

OculOS reads the OS accessibility tree, so macOS requires you to grant permission:

  1. Open System Settings → Privacy & Security → Accessibility
  2. Click the lock icon and enter your password
  3. Click + and add your terminal app (Terminal, iTerm2, Windsurf, etc.) or the oculos binary itself
  4. Make sure the toggle is enabled

Without this permission, OculOS can list windows but cannot read UI elements or interact with them.

HTTP mode (API + Dashboard)

bash
./target/release/oculos
# API       → http://127.0.0.1:7878
# Dashboard → http://127.0.0.1:7878

MCP mode (for AI agents)

bash
./target/release/oculos --mcp

How It Works

OculOS reads the OS accessibility tree and assigns each UI element a session-scoped UUID (oculos_id). You use that ID to interact.

bash
# 1. List open windows
curl http://localhost:7878/windows

# 2. Get the UI tree for a window
curl http://localhost:7878/windows/{pid}/tree

# 3. Find a specific element
curl "http://localhost:7878/windows/{pid}/find?q=Submit&type=Button"

# 4. Click it
curl -X POST http://localhost:7878/interact/{id}/click

# 5. Type into a text field
curl -X POST http://localhost:7878/interact/{id}/set-text \
  -H "Content-Type: application/json" \
  -d '{"text":"hello world"}'

Every element includes an actions array — the API tells you exactly what you can do:

json
{
  "oculos_id": "a3f8c2d1-...",
  "type": "Button",
  "label": "Submit",
  "enabled": true,
  "actions": ["click", "focus"],
  "rect": { "x": 120, "y": 340, "width": 80, "height": 32 }
}

API

Discovery

EndpointDescription
GET /windowsList all visible windows
GET /windows/{pid}/treeFull UI element tree
GET /windows/{pid}/find?q=&type=&interactive=Search elements
GET /hwnd/{hwnd}/treeTree by window handle
GET /hwnd/{hwnd}/findSearch by window handle

Window operations

EndpointDescription
POST /windows/{pid}/focusBring to foreground
POST /windows/{pid}/closeClose gracefully
GET /windows/{pid}/wait?q=&type=&timeout=Wait for element to appear (polls, default 5s)
GET /windows/{pid}/screenshotCapture window as PNG

Element interactions

EndpointBodyDescription
POST /interact/{id}/click—Click
POST /interact/{id}/set-text{"text":"…"}Replace text content
POST /interact/{id}/send-keys{"keys":"…"}Keyboard input
POST /interact/{id}/focus—Move focus
POST /interact/{id}/toggle—Toggle checkbox
POST /interact/{id}/expand—Expand dropdown / tree
POST /interact/{id}/collapse—Collapse
POST /interact/{id}/select—Select list item
POST /interact/{id}/set-range{"value":N}Set slider value
POST /interact/{id}/scroll{"direction":"…"}Scroll container
POST /interact/{id}/scroll-into-view—Scroll into viewport
POST /interact/{id}/highlight{"duration_ms":N}Highlight on screen
POST /interact/batch{"actions":[...]}Execute multiple interactions

System

EndpointDescription
GET /healthStatus, version, uptime
GET /wsWebSocket (live action events)

MCP Setup

Works with any MCP-compatible client. Add to your config:

json
{
  "mcpServers": {
    "oculos": {
      "command": "/path/to/oculos",
      "args": ["--mcp"]
    }
  }
}

Tested with: Claude Code, Claude Desktop, Cursor, Windsurf

For non-MCP agents (OpenAI, Gemini, custom), paste AGENTS.md into the system prompt and give the agent HTTP access.


Dashboard

Built-in web UI at http://127.0.0.1:7878:

  • Window list — all open windows with focus/close buttons
  • Element tree — full interactive UI tree with search and filter
  • Inspector — element details, properties, and all available actions
  • Recorder — record a sequence of interactions, export as Python, JavaScript, or curl
  • JSON viewer — raw element data with copy
  • WebSocket — live event indicator, real-time action feed
  • Shortcuts — R refresh · / search · E expand · C collapse · H highlight · J JSON

Platform Support

PlatformBackendStatus
WindowsUI Automation (windows-rs)✅ Full — Win32, WPF, Electron, Qt
LinuxAT-SPI2 (atspi + zbus)✅ Working — GTK, Qt, Electron
macOSAccessibility API (AXUIElement + CoreGraphics)✅ Working — Cocoa, Electron, Qt

App Compatibility

App typeCoverageNotes
Win32 / WPF / WinFormsExcellentFull deep tree, all interactions
GTK / QtExcellentFull tree on all platforms
Electron (Spotify, VS Code, Slack, Chrome)GoodKey interactive elements exposed; tree is shallower than native
Cocoa (macOS native)GoodStandard controls fully exposed
Custom-drawn / OpenGL / DirectXPoorMinimal or no accessibility tree — games, CAD, etc.

Tip: Run curl "localhost:7878/windows/{pid}/find?interactive=true" to see what's available for any app.


Client SDKs

Official wrappers for the REST API. Install from source (PyPI/npm packages coming soon):

Python

bash
cd sdk/python
pip install .
python
from oculos import OculOS

client = OculOS()
windows = client.list_windows()
client.click(element_id)
client.set_text(element_id, "hello world")

See sdk/python for full docs.

TypeScript

bash
cd sdk/typescript
npm install
npm run build
typescript
import { OculOS } from "./sdk/typescript/src/index";

const client = new OculOS();
const windows = await client.listWindows();
await client.click(elementId);
await client.setText(elementId, "hello world");

See sdk/typescript for full docs.


CLI

oculos [OPTIONS]

  -b, --bind <ADDR>       Bind address [default: 127.0.0.1:7878]
      --static-dir <DIR>  Static files directory [default: static]
      --log <LEVEL>       Log level: trace/debug/info/warn/error [default: info]
      --mcp               Run as MCP server over stdin/stdout
  -h, --help              Print help

How OculOS Differs

OculOSVision agentsScreen coordinate toolsBrowser-only tools
ApproachOS accessibility treeScreenshots + LLMPixel positionsDOM / a11y tree
ScopeAny desktop appAny (with latency)Any (fragile)Browser only
SpeedInstantSecondsInstantInstant
Deterministic✅❌✅✅
GPU required❌✅❌❌
Cloud required❌Usually❌❌
Semantic✅ Labels + typesVaries❌ Coordinates✅

Everything Built So Far

Core

  • Windows UIA backend (full — Win32, WPF, Electron, Qt)
  • Linux AT-SPI2 backend
  • macOS Accessibility backend (AXUIElement, CoreGraphics window enumeration, CGEvent keyboard simulation)
  • REST API server (Axum)
  • MCP server (JSON-RPC 2.0 over stdio)
  • Session-scoped element registry with UUIDs
  • Full keyboard simulation engine

Dashboard

  • Window list with focus/close
  • Interactive element tree with search/filter
  • Element inspector with all actions
  • API request log
  • JSON viewer with copy
  • Keyboard shortcuts

Advanced

  • Element highlighting (native GDI overlay)
  • Automation recorder (record + export Python/JS/curl)
  • WebSocket live events
  • Health endpoint (uptime, version, platform)

Planned

  • macOS element highlighting (native overlay)
  • Python & TypeScript client SDKs
  • Batch operations (multiple interactions per request)
  • Conditional waits (/wait endpoint with timeout)
  • Screenshot capture (/screenshot endpoint)
  • GitHub Actions CI (Windows, Linux, macOS)
  • Docker image for CI/CD
  • OpenAPI spec
  • --version CLI flag
  • Element caching & diffing (change detection)
  • PyPI / npm SDK publishing

Contributing

We welcome contributions! See CONTRIBUTING.md for details.

Top areas:

  • Tests — cross-app integration tests
  • macOS highlight — native overlay for element highlighting
  • Element caching — change detection & diffing
  • Documentation — guides, examples, tutorials

License

MIT

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "huseyinstif-oculos": {
      "command": "",
      "args": []
    }
  }
}

OculOS MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald OculOS verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

OculOS als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für OculOS ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "huseyinstif-oculos": {
      "command": "npx",
      "args": [
        "-y",
        "oculos"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von OculOS. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von OculOS.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit OculOS bei dieser Aufgabe helfen?
OculOS
Gerne. Ich habe es gelesen.
Das habe ich mit OculOS gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server OculOS verwendet?

OculOS ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich OculOS MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie OculOS mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum OculOS MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald OculOS verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich OculOS MCP mit TypingMind?

OculOS wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt OculOS MCP in TypingMind bereit?

OculOS stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um OculOS MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls OculOS eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇