苹果脚本MCP工具

@peakmojo/applescript-mcp
1 Stars 59 次浏览 peakmojo 更新于 2026-08-23

一种模型上下文协议服务器,可运行AppleScript代码以与Mac应用程序和系统功能进行交互,包括便签、日历、通讯录、消息、文件管理等更多功能。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "applescript_execute": {
      "args": [
        "@peakmojo/applescript-mcp"
      ],
      "command": "npx"
    }
  }
}

服务介绍

AppleScript MCP 服务器(双访问:Python 和 Node.js)

npm version

概述

这是一个 Model Context Protocol (MCP) 服务器,允许你运行 AppleScript 代码来与 Mac 进行交互。这个 MCP 故意设计得简单、直接、直观,并且需要最少的设置。

我简直不敢相信它是如此简单而强大。核心代码少于 100 行。

https://github.com/user-attachments/assets/b85e63ba-fb26-4918-8e6d-2377254ee388

功能

  • 运行 AppleScript 来访问 Mac 应用程序和数据
  • 与备忘录、日历、联系人、信息等进行交互
  • 使用 Spotlight 或 Finder 搜索文件
  • 读写文件内容并执行 shell 命令

示例提示

Create a reminder for me to call John tomorrow at 10am
Add a new meeting to my calendar for Friday from 2-3pm titled "Team Review"
Create a new note titled "Meeting Minutes" with today's date
Show me all files in my Downloads folder from the past week
What's my current battery percentage?
Show me the most recent unread emails in my inbox
List all the currently running applications on my Mac
Play my "Focus" playlist in Apple Music
Take a screenshot of my entire screen and save it to my Desktop
Find John Smith in my contacts and show me his phone number
Create a folder on my Desktop named "Project Files"
Open Safari and navigate to apple.com
Tell me how much free space I have on my main drive
List all my upcoming calendar events for this week

与 Claude Desktop 一起使用

Node.js

{
  "mcpServers": {
    "applescript_execute": {
      "command": "npx",
      "args": [
        "@peakmojo/applescript-mcp"
      ]
    }
  }
}

Python

安装 uv

brew install uv
git clone ...

运行服务器

{
  "mcpServers": {
    "applescript_execute": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/your/repo",
        "run",
        "src/applescript_mcp/server.py"
      ]
    }
  }
}