
Mac Use Mcp
io.github.antbotlab由 GitHub 账号 antbotlab 发布v1.1.1更新于 Oct 24, 2026
Zero-dependency macOS desktop automation for AI agents. 18 tools via MCP. macOS 13+.
概览
本地运行的 macOS MCP 服务器,让 AI 助手控制鼠标、键盘、屏幕、窗口、应用和剪贴板。
- 可以做什么
- 截取整个屏幕、指定区域或某个窗口的画面,并读取显示器与光标信息。执行点击、移动、滚动、拖拽、输入文字和按键组合。列出并聚焦窗口、启动应用、点击菜单栏项目。通过辅助功能 API 查询界面元素。读写系统剪贴板、等待以及检查权限状态。
- 适用场景
- 适合自动化 UI 测试、桌面工作流自动化、基于截图的监控、辅助功能检查,或让智能体直接操作 macOS 应用。仅在你使用带图形界面的 Mac 时才有意义。
- 运行要求
- macOS 13 或更高版本(Intel 或 Apple Silicon)、Node.js 22 或更高版本,以及图形化(非无头)会话。通过 stdio 本地运行,例如使用 npx。需要为 MCP 客户端或终端应用授予 macOS 辅助功能和屏幕录制权限。
安装
在 SourceWeft 中
- 打开 控制台中的 Mac Use Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mac-use-mcp
[!WARNING] This tool has full control over mouse, keyboard, and screen. Please use in a sandboxed environment to protect your privacy and avoid accidental data loss by your agents. You are responsible for any actions performed through this tool.
Zero-native-dependency macOS desktop automation via MCP.
Give AI agents eyes and hands on macOS — click, type, screenshot, and inspect any application.
[CI] [npm version] [npm downloads] [license] [TypeScript] [macOS 13+] [Node 22+]
Use Cases
- Automated UI testing — click buttons, verify element states with
get_ui_elements, validate screen content viascreenshot - Desktop workflow automation — launch apps with
open_application, fill forms withtype_text, navigate menus viaclick_menu - Screenshot-based monitoring — capture screen regions periodically with
screenshotfor visual diffing or alerting - Accessibility inspection — query UI element trees with
get_ui_elementsfor QA and compliance checks - AI agent computer use — give LLMs eyes and hands on macOS via
screenshot,click,type_text, and more
Why mac-use-mcp?
- Just works —
npx mac-use-mcpand grant two macOS permissions. No node-gyp, no Xcode tools, no build step. - 18 tools, one server — screenshots, clicks, keystrokes, window management, accessibility inspection, and clipboard.
- macOS 13+ on Intel and Apple Silicon — no native addons, no architecture headaches.
Install
Requirements: macOS 13+ and Node.js 22+. The server communicates over stdio transport.
This package only works on macOS. It will refuse to install on other operating systems.
No build steps. No native dependencies. Just run:
npxwill prompt to install the package on first run. Usenpx -y mac-use-mcpto skip the confirmation.
[!TIP] Model selection matters. Desktop automation involves screenshot–action loops that add up in token usage. A fast model with solid reasoning, good vision, and reliable tool calling is recommended:
Permission Setup
mac-use-mcp requires two macOS permissions to function. Grant them once and you're set.
Accessibility
Required for mouse and keyboard control.
- Open System Settings > Privacy & Security > Accessibility
- Click the + button
- Add your MCP client application (e.g., Claude Desktop, your terminal emulator)
- Ensure the toggle is enabled
Screen Recording
Required for screenshots.
- Open System Settings > Privacy & Security > Screen Recording
- Click the + button
- Add your MCP client application
- Ensure the toggle is enabled
- Restart the application if prompted
Verify permissions
After granting both permissions and configuring your MCP client (see next section), use the check_permissions tool to confirm everything is working:
MCP Client Configuration
Claude Code
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
OpenAI Codex
Add to ~/.codex/config.toml:
Or via CLI:
Google Antigravity
Add to ~/.gemini/antigravity/mcp_config.json:
Gemini CLI
Add to ~/.gemini/settings.json:
VS Code / Copilot
Add to .vscode/mcp.json in your workspace (or open the Command Palette and run MCP: Open User Configuration for global setup):
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-level):
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
Cline
Open Cline's MCP settings (in the Cline extension panel, click the MCP servers icon), then add:
Kiro
Add to ~/.aws/amazonq/mcp.json:
Tools
This Node.js MCP server exposes 18 tools for mouse, keyboard, and screen control to any MCP-compatible client.
Screen
Input
Window & App
App names support fuzzy matching — "chrome" resolves to "Google Chrome", "code" to "Code", etc.
Accessibility
Clipboard
Utility
Examples
Common workflow patterns using mac-use-mcp tools:
Screenshot a specific window
Click a button in a dialog
Automate a menu action
Copy text between apps
How It Works
- Swift binary handles mouse input (CGEvent), screen capture (CGWindowListCreateImage), window enumeration (CGWindowListCopyWindowInfo), and UI element queries (Accessibility API)
- AppleScript handles keyboard input (System Events
key code), window focus, and menu clicks - Node.js MCP server orchestrates everything over stdio, translating MCP tool calls into system operations
- No native Node.js addons — the Swift binary is pre-compiled and ships with the npm package
- Serial execution queue prevents race conditions between system operations
Known Limitations
- Screen Recording prompt on Sequoia: macOS 15 shows a monthly system prompt asking to reconfirm Screen Recording access. This is an OS-level behavior and cannot be suppressed.
- Secure input fields: Password fields and other secure text inputs block synthetic keyboard events. This is a macOS security feature.
- Keyboard input on macOS 26+: CGEvent keyboard synthesis is silently blocked. Keyboard input uses AppleScript (
System Events key code) as a workaround, which may behave differently in some edge cases. - System dialogs: Some system-level dialogs (e.g., FileVault unlock, Login Window) cannot be interacted with programmatically due to macOS security restrictions.
- Headless / CI: Requires a graphical session. Headless macOS environments (e.g., standard GitHub Actions runners) are not supported.
Troubleshooting
Permission prompts keep appearing
Grant Accessibility and Screen Recording permissions to your terminal app in System Settings > Privacy & Security. A restart of the terminal may be required.
macOS Sequoia permission dialogs
macOS 15 (Sequoia) introduced stricter permission prompts. Allow the prompts when they appear. The check_permissions tool can verify your current permission status.
Secure input fields
Some password fields and secure text inputs block programmatic key events. This is a macOS security feature. Use clipboard_write + press_key("cmd+v") as a workaround.
Screen recording shows black screenshots
Ensure Screen Recording permission is granted to your terminal app (not just Accessibility). Restart the terminal after granting.
Related Projects
- Playwright MCP — Browser automation via accessibility tree. Complements mac-use-mcp for web-only tasks.
- Peekaboo — macOS screen automation with ScreenCaptureKit. Requires macOS 15+ and a Swift build.
- awesome-mcp-servers — Curated list of MCP servers across the ecosystem.
Contributing
See CONTRIBUTING.md for development setup and guidelines.
Security
To report a vulnerability, see SECURITY.md.
Support
- Found a bug? Open an issue
- Have a feature idea? Open an issue
- Like the project? Give it a star — it helps others discover mac-use-mcp.
License
MIT © 2026 antbotlab
macOS is a trademark of Apple Inc., registered in the U.S. and other countries and regions.
来源:README.md,提交 f19bbd9
工具
0版本历史
1- v1.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分