Skip to main content
Glama
johnexzy

macos-computer-use

by johnexzy

🍏 macOS Computer Use (MCP Server)

License: MIT Platform Model Context Protocol

초고속, 네이티브 Model Context Protocol (MCP) 서버로, LLM 및 자율 에이전트가 macOS에서 실제 하드웨어 마우스나 키보드 포커스를 가로채지 않고 전체 화면 검사 및 데스크톱 자동화 기능을 사용할 수 있게 합니다.

컴파일된 Swift 코어로 구축되었으며, Apple의 네이티브 CoreGraphics, Vision OCR (VNRecognizeTextRequest), 그리고 직접적인 프로세스 수준 이벤트 라우팅(CGEvent.postToPid)을 활용합니다.


⚡ 주요 특징

  • 🎯 30ms 미만 Apple Vision OCR (find_text / click_text): 맹목적인 $(x, y)$ 좌표 추측이 필요 없습니다. 에이전트는 Apple Neural Engine 가속을 사용하여 버튼, 레이블, 텍스트 플레이스홀더를 이름으로 픽셀 단위 정확도로 찾아냅니다.

  • 🛡️ 비간섭 백그라운드 실행: 전역 macOS 하드웨어 이벤트 탭에서 분리됩니다. IDE나 브라우저에서 계속 작업하는 동안 클릭, 스크롤, 키 입력을 특정 애플리케이션 PID로 직접 전달할 수 있습니다.

  • 👁️ 가상 커서 오버레이 (mark_cursor): 에이전트의 대상 좌표가 스크린샷 프레임에 시각적으로 그려집니다(청록색 타깃 링 + 자홍색 펄스 점). 화면에서 실제 마우스를 움직이지 않습니다.

  • ⚡ 반응형 UI 동기화 (wait_for_text): 맹목적인 sleep() 타임아웃을 고속 OCR 폴링 루프로 대체하여 동적 자동 완성 드롭다운, 모달 또는 상태 변경이 나타나는 즉시 해결합니다.

  • 🖼️ 창 분리 화면 캡처: 창을 전면으로 가져오거나 겹치는 창을 캡처하지 않고 대상 애플리케이션 버퍼를 백그라운드에서 깔끔하게 캡처합니다(screencapture -l <wid> -o -x).


🛠️ 제공되는 도구

도구

설명

주요 매개변수

click_text

Apple Vision OCR을 통해 모든 버튼, 레이블 또는 UI 텍스트를 찾고 정확한 중앙을 부드럽게 클릭합니다.

text, appName (선택 사항), windowId (선택 사항), button, clickCount, returnScreenshot

find_text

화면 또는 특정 창의 텍스트를 검사하고 정확한 경계 상자와 논리적 좌표를 반환합니다.

text, appName (선택 사항), windowId (선택 사항)

wait_for_text

예상 텍스트가 나타날 때까지 대상 창/화면을 반응적으로 폴링합니다(자동 완성 드롭다운, 토스트, 시트).

text, appName (선택 사항), timeoutSeconds (기본값: 5.0)

screenshot

전체 디스플레이 또는 특정 백그라운드 애플리케이션 창을 선택적 가상 커서 렌더링과 함께 캡처합니다.

appName, windowId, maxWidth, format (jpeg | png), cursor ({x, y})

list_windows

열린 애플리케이션 창, 프로세스 ID(pid), 제목 및 좌표 범위를 앞에서 뒤로 Z-순서로 나열합니다.

appName (선택적 필터)

mouse_click

논리적 (x, y) 지점을 클릭합니다(창 상대 및 PID 대상 라우팅 지원).

x, y, appName, windowId, relativeCoords, button, clickCount

mouse_move

마우스 커서를 (x, y) 좌표로 부드럽게 이동합니다.

x, y, appName, relativeCoords, smooth, duration

mouse_drag

마우스를 (startX, startY)에서 (endX, endY)로 부드럽게 드래그합니다.

startX, startY, endX, endY, duration

type_text

활성 입력 필드(또는 대상 프로세스 큐에 직접)에 일반 텍스트를 주입합니다.

text, appName (선택 사항), windowId (선택 사항)

press_key

특수 키 또는 보조 키가 있는 키보드 단축키를 누릅니다.

key (return, space, tab, escape, c 등), modifiers (command, shift, option, control)

scroll

마우스 휠을 세로 및 가로로 스크롤합니다.

x, y, deltaY, deltaX, appName, windowId

launch_app

macOS 애플리케이션을 실행하거나 전면으로 가져옵니다.

appName (예: Google Chrome, Safari, Finder, Slack, Notes)

get_active_app

현재 활성 상태인 최전면 애플리케이션 이름과 창 제목을 반환합니다.

없음

run_applescript

macOS 접근성 및 UI 계층 구조 심층 검사를 위해 사용자 지정 AppleScript를 실행합니다.

script


🚀 설치 및 설정

1. 사전 요구 사항

  • macOS 13.0+ (Apple Silicon 또는 Intel)

  • Node.js 18+

  • Xcode Command Line Tools (네이티브 Swift 바이너리 컴파일용):

    xcode-select --install

2. 클론 및 빌드

git clone https://github.com/johnexzy/macos-computer-use.git
cd macos-computer-use
npm install

(postinstall 스크립트는 native_helper.swift를 최적화된 네이티브 바이너리로 자동 컴파일합니다).


🔒 필수 macOS 권한

데스크톱 캡처 및 입력 시뮬레이션을 허용하려면 System Settings > Privacy & Security에서 호스트 애플리케이션(Terminal, iTerm2, Antigravity, Cursor 또는 VS Code)에 권한을 부여하세요:

  1. 화면 및 시스템 오디오 녹화: screenshot 및 시각적 OCR에 필요합니다.

  2. 손쉬운 사용: mouse_click, type_text, press_key에 필요합니다.


🔌 MCP 구성

이 서버를 MCP 클라이언트 구성에 추가하세요:

Antigravity / Claude Desktop / Cursor / Windsurf

mcp_config.json / claude_desktop_config.json에 추가하세요:

{
  "mcpServers": {
    "macos-computer-use": {
      "command": "node",
      "args": ["/absolute/path/to/macos-computer-use/server.mjs"]
    }
  }
}

🧪 네이티브 Swift 헬퍼 직접 테스트

터미널에서 네이티브 바이너리를 직접 테스트할 수 있습니다:

# Display resolution and scaling
./native_helper size

# List active Chrome windows in Z-order
./native_helper list_windows "Google Chrome"

# Find a button or text on screen with Apple Vision OCR in ~30ms
./native_helper find_text "Search" "Google Chrome"

# Reactively wait for dynamic text to appear
./native_helper wait_for_text "quantum" "Google Chrome" nil 5.0

📄 라이선스

MIT © John Oba

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

  • MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent

  • Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.

View all MCP Connectors

Latest Blog Posts

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/johnexzy/macos-computer-use'

If you have feedback or need assistance with the MCP directory API, please join our Discord server