使用说明
苹果提醒MCP服务器
一种模型上下文协议(MCP)服务器,允许AI助手使用AppleScript在macOS上与Apple提醒进行交互。
需求
- macOS (AppleScript/Reminds集成所需)
- Node.js 18+
- 苹果提醒应用程序 至少有一个列表
- 自动化权限 (首次运行时自动提示)
安装
# Clone the repository
git clone https://github.com/leawn/apple_reminders_mcp.git
cd apple_reminders_mcp
# Install dependencies and build
npm install
使用游标
添加到光标MCP设置(~/.cursor/mcp.json):
{
"mcpServers": {
"apple-reminders": {
"command": "/path/to/node",
"args": ["/path/to/apple_reminders_mcp/dist/index.js"]
}
}
}
重要:使用完整路径
node,不仅node.找到它which node.nvm用户示例:
{ "mcpServers": { "apple-reminders": { "command": "/Users/yourname/.nvm/versions/node/v20.16.0/bin/node", "args": ["/Users/yourname/path/to/apple_reminders_mcp/dist/index.js"] } } }
可用工具
| 工具 | 说明 | 参数 |
|---|---|---|
listReminderLists |
获取所有提醒列表 | - |
getReminders |
从列表中获取提醒 | listName, includeCompleted? |
createReminder |
创建新提醒 | listName, title, notes?, dueDate?, priority? |
completeReminder |
将提醒标记为已完成 | listName, reminderId |
uncompleteReminder |
将提醒标记为不完整 | listName, reminderId |
deleteReminder |
删除提醒 | listName, reminderId |
updateReminder |
更新提醒详细信息 | listName, reminderId, title?, notes?, dueDate?, priority? |
工具参数
优先级值
0-无优先级1-高优先级5-中等优先级9-低优先级
日期格式
日期应采用ISO8601格式:
2024-12-31T09:00:00Z
2024-12-31T09:00:00-05:00
CLI参考
shell脚本可以直接用于测试:
# List all reminder lists
./bin/reminders-helper.sh list-lists
# Get reminders from a list
./bin/reminders-helper.sh get-reminders --list "Work"
./bin/reminders-helper.sh get-reminders --list "Work" --include-completed
# Create a reminder
./bin/reminders-helper.sh create --list "Work" --title "New task"
./bin/reminders-helper.sh create --list "Work" --title "Meeting" --notes "Team sync" --due "2024-12-31T09:00:00Z" --priority 1
# Complete a reminder
./bin/reminders-helper.sh complete --list "Work" --id "x-apple-reminder://UUID"
# Uncomplete a reminder
./bin/reminders-helper.sh uncomplete --list "Work" --id "x-apple-reminder://UUID"
# Update a reminder
./bin/reminders-helper.sh update --list "Work" --id "x-apple-reminder://UUID" --title "Updated title"
# Delete a reminder
./bin/reminders-helper.sh delete --list "Work" --id "x-apple-reminder://UUID"
权限
首次运行时,macOS将提示您授予控制提醒应用程序的自动化权限。这使用标准的自动化权限(而不是提醒隐私权限),这更容易授予和管理。
如果您看到权限错误:
- 打开 系统设置 → 隐私和安全 → 自动化
- 找到终端/光标并启用“提醒”
发展
# Run TypeScript directly (without building)
npm run dev
# Build TypeScript
npm run build
# Start the server
npm start
故障排除
“无权发送Apple活动”
- 打开 系统设置 → 隐私和安全 → 自动化
- 查找运行MCP服务器的应用程序(终端、光标等)
- 启用“提醒”权限
- 重新启动MCP服务器
“未找到列表'X'”
确保列表名称完全匹配(区分大小写)。使用 listReminderLists 查看可用列表。
命令速度慢
助手使用具有批量属性访问的AppleScript,这应该很快。如果命令速度较慢:
- 检查Reminds.app是否正在响应
- 尝试退出并重新打开Reminds.app
- 重新启动MCP服务器
许可证
麻省理工学院