
这是一个MCP(模型上下文协议)服务器,使Claude能够看到并与任何macOS应用程序交互——就像Playwright对网页浏览器所做的,但适用于原生Mac应用。
概览
这是一个MCP(模型上下文协议)服务器,使Claude能够看到并与任何macOS应用程序交互——就像Playwright对网页浏览器所做的,但适用于原生Mac应用。 - 🧪 - “测试我的应用中的登录流程” - 🔍 - “检查所有按钮是否正确标注” - 🤖 - “填写此表单并提交” - 📱 - “显示Finder中的所有互动元素” - : 在系统设置中添加终端 → 隐私与安全 → 无障碍 - : 在系统设置中添加 VS Code → 隐私与安全 → 无障碍 - : 在系统设置中添加 Claude 代码 → 隐私与安全 → 无障碍 父应用需要权限,因为它才是实际执行MCP服务器的。
概述(AI 翻译)
像Playwright,但适用于原生macOS应用。通过Claude用自然语言控制任何Mac应用——非常适合在AI辅助下开发和测试Mac应用。
🎯 这是什么?
这是一个MCP(模型上下文协议)服务器,使Claude能够看到并与任何macOS应用程序交互——就像Playwright对网页浏览器所做的,但适用于原生Mac应用。
完美适合:
- 🧪 测试Mac应用程序- “测试我的应用中的登录流程”
- 🔍 应用开发 - “检查所有按钮是否正确标注”
- 🤖 UI自动化 - “填写此表并提交”
- 📱 应用探索 - “展示Finder中的所有互动元素”
🚀 快速启动
1.安装
2.设置无障碍权限
⚠️ 关键:启用你的父应用的无障碍功能**:
- 如果使用终端:在[[T0]中添加终端]
- 如果使用 VS Code:将 VS Code 添加到
System Settings → Privacy & Security → Accessibility - 如果使用Claude代码:将Claude代码添加到
System Settings → Privacy & Security → Accessibility
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Playwright MCP for macOS 🎭
Like Playwright, but for native macOS applications. Control any Mac app with natural language through Claude - perfect for developing and testing Mac applications with AI assistance.
🎯 What is this?
This is an MCP (Model Context Protocol) server that gives Claude the ability to see and interact with any macOS application - just like Playwright does for web browsers, but for native Mac apps.
Perfect for:
- 🧪 Testing Mac applications - “Test the login flow in my app”
- 🔍 App development - “Check if all buttons are properly labeled”
- 🤖 UI automation - “Fill out this form and submit it”
- 📱 App exploration - “Show me all the interactive elements in Finder”
🚀 Quick Start
1. Install
git clone https://github.com/mb-dev/macos-ui-automation-mcp.git
cd macos-ui-automation-mcp
uv sync
2. Set Up Accessibility Permissions
⚠️ Critical: Enable accessibility for your parent application:
- If using Terminal: Add Terminal to
System Settings → Privacy & Security → Accessibility - If using VS Code: Add VS Code to
System Settings → Privacy & Security → Accessibility - If using Claude Code: Add Claude Code to
System Settings → Privacy & Security → Accessibility
The parent app needs permission because it’s the one actually executing the MCP server.
3. Configure Claude Code
Add to your Claude Code MCP settings:
{
"mcpServers": {
"macos-ui-automation": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/macos-ui-automation-mcp",
"run",
"macos-ui-automation-mcp"
]
}
}
}
4. Start Automating!
Now you can ask Claude things like:
- “Find all buttons in the Calculator app”
- “Click the submit button in my app”
- “Click the screenshot button to capture the current window”
- “Test the login flow by filling in credentials and clicking submit”
🛠 Available Tools
| Tool | Description | Use Case |
|---|---|---|
find_elements |
Find UI elements using JSONPath | “Show me all text fields” |
find_elements_in_app |
Search within a specific app | “Find buttons in Safari” |
click_by_accessibility_id |
Click using accessibility actions | “Click the submit button” |
click_at_position |
Click at screen coordinates | “Click at position (100, 200)” |
type_text_to_element_by_selector |
Type text into elements | “Type ‘hello’ into the search field” |
get_app_overview |
Overview of running applications | “What apps are currently running?” |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"macos-ui-automation": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/macos-ui-automation-mcp",
"run",
"macos-ui-automation-mcp"
]
}
}
}