OM

obra/macmcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

30 stars 5 forks 质量 35 趋势 11

⚠️ ⚠️ - - “MacMCP”是占位符 - - 使用请自行承担风险 - - 内容可能不准确或不完整 - - 买家请注意,使用时请谨慎

概览

⚠️ ⚠️ - - “MacMCP”是占位符 - - 使用请自行承担风险 - - 内容可能不准确或不完整 - - 买家请注意,使用时请谨慎 MacMCP 是一个模型上下文协议(MCP)服务器,通过 stdio 协议向大型语言模型(LLM)展示 macOS 的无障碍 API。它使像 Claude 这样的 LLM 能够使用用户可用的无障碍 API 与 macOS 应用交互,从而执行用户级任务,如浏览网页、创建演示文稿、使用电子表格或使用消息应用。

概述(AI 翻译)

小心。这是个极其危险的工具。

按定义,这赋予了大型语言模型(LLM)能够完成你MAC能做的任何事情的能力,就像你一样。

在决定用 YOLO 运行之前,请三思而后行,并且在拥有权限的 Mac 上运行…任何事情。

⚠️ 重要免责声明 ⚠️

  • 本项目需要一个更好的名称 - “MacMCP”只是占位符
  • 在生产中基本未经测试 - 使用请自行承担风险
  • 本README由LLM编写- 内容可能不准确或不完整
  • 买者自慎 - 买家慎用

MacMCP 是一个模型上下文协议(MCP)服务器,通过 stdio 协议向大型语言模型(LLM)展示 macOS 的无障碍 API。它使像 Claude 这样的 LLM 能够使用用户可用的无障碍 API 与 macOS 应用交互,从而执行用户级任务,如浏览网页、创建演示文稿、使用电子表格或使用消息应用。

特色

核心能力

  • UI 探索:发现并分析 macOS 应用界面
  • UI 交互:点击、输入、滚动并与 UI 元素交互

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MacMCP - macOS Accessibility Model Context Protocol Server

HEADS UP. THIS IS AN INCREDIBLY DANGEROUS TOOL.

BY DEFINITION, THIS IS GIVING AN LLM THE ABILITY TO DO ANYTHING YOUR MAC CAN DO. AS YOU.

THINK LONG AND HARD BEFORE YOU DECIDE TO YOLO AND RUN IT ON A MAC THAT HAS PERMISSION TO DO…ANYTHING.

⚠️ IMPORTANT DISCLAIMERS ⚠️

  • This project needs a better name - “MacMCP” is a placeholder
  • Largely untested in production - Use at your own risk
  • This README was written by an LLM - Content may be inaccurate or incomplete
  • Caveat emptor - Buyer beware, use with caution

MacMCP is a Model Context Protocol (MCP) server that exposes macOS accessibility APIs to Large Language Models (LLMs) over the stdio protocol. It enables LLMs like Claude to interact with macOS applications using the same accessibility APIs available to users, allowing them to perform user-level tasks such as browsing the web, creating presentations, working with spreadsheets, or using messaging applications.

Features

Core Capabilities

  • UI Exploration: Discover and analyze macOS application interfaces
  • UI Interaction: Click, type, scroll, and interact with UI elements
  • Screenshot Capture: Take screenshots of the screen or specific UI elements
  • Application Management: Launch and manage macOS applications
  • Window Management: Move, resize, minimize, and maximize application windows
  • Menu Navigation: Navigate application menus and activate menu items
  • Keyboard Interaction: Execute keyboard shortcuts and type text
  • Clipboard Management: Manage clipboard content including text and images

Accessibility Tools

  • Interface Explorer: Enhanced UI exploration with state and capabilities information
  • Screenshot Tool: Capture screenshots for visual context
  • UI Interaction Tool: Perform precise UI interactions
  • Application Tool: Open and manage applications
  • Window Management Tool: Control window positioning and state
  • Menu Navigation Tool: Access application menu systems
  • Keyboard Tool: Send keyboard input and shortcuts
  • Clipboard Tool: Read and write clipboard content

Requirements

  • macOS: 13.0 or later
  • Swift: 6.1 or later
  • Accessibility Permissions: Required for UI interaction functionality

Installation

Building from Source

  1. Clone the repository:

    git clone 
    cd MacMCP
    
  2. Build the project:

    swift build
    
  3. Build for release (recommended for production):

    swift build -c release
    

Grant Accessibility Permissions

MacMCP requires accessibility permissions to interact with UI elements:

  1. Open System Settings > Privacy & Security > Accessibility
  2. Add the MacMCP executable to the list of allowed applications
  3. Verify permissions with:
    swift run check_permissions
    

Usage

Running the Server

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →