提醒mcp

macOS上用于Apple提醒的MCP服务器。使用Swift和EventKit构建。
安装
需求
- macOS 14(索诺玛)或更高版本
- Swift 6.0+
构建
git clone https://github.com/revenant20/reminders-mcp.git
cd reminders-mcp
./build.sh该脚本编译发布版本,并使用提醒访问所需的权限对二进制文件进行签名。输出: .build/release/reminders-mcp.
配置您的MCP客户端
将服务器添加到MCP客户端配置中。例如,对于Claude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"reminders": {
"command": "/absolute/path/to/reminders-mcp/.build/release/reminders-mcp"
}
}
}首次启动时,macOS将请求访问提醒的权限——单击“允许”。
为什么选择此服务器
- Swift原生二进制文件。 不需要Node.js、Python或任何其他运行时。单编译二进制文件——刚刚好用。
- EventKit,而不是AppleScript。 通过苹果官方框架直接访问提醒数据库。比基于AppleScript的替代方案更快、更可靠。
- 重量轻。 最小依赖性——只有 MCP Swift SDK没有繁重的框架或抽象层。
- 正确签名。 构建脚本使用所需的权限对二进制文件进行签名,以便立即访问提醒。
工具
list_lists
获取所有提醒列表。
参数:无。
list_reminders
从特定列表中获取提醒。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
list_name | string | yes | 提醒列表的名称 |
filter | string | 否 | incomplete (默认), complete,或 all |
create_reminder
创建新的提醒。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
title | string | 是 | 提醒标题 |
notes | string | 否 | 提醒事项 |
list_name | string | no | 列表名称(默认值:默认列表) |
due_date | string | no | ISO 8601中的到期日期(YYYY-MM-DD 或 YYYY-MM-DDTHH:MM:SS) |
priority | integer | 否 | 优先级:0=无,1=高,5=中,9=低 |
tags | string\[\] | no | 标签(无 #).作为标签附加到笔记中 |
update_reminder
更新现有提醒。只传递要更改的字段。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 是 | 提醒ID(calendarItemIdentifier) |
title | string | 否 | 新标题 |
notes | string | no | 新音符(清除空字符串) |
due_date | string | no | ISO 8601中的新截止日期(要删除的空字符串) |
priority | integer | 否 | 优先级 |
list_name | string | 否 | 移动到其他列表 |
add_tags | string\[\] | no | 要添加的标签(无 #).作为标签附加到笔记中 |
remove_tags | string\[\] | no | 要删除的标签(无 #).从标题和注释中删除 |
complete_minder
将提醒标记为已完成或未完成。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 是 | 提醒ID |
completed | boolean | 否 | true 为了完成, false 未完成(默认值: true) |
删除提醒器
永久删除提醒。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 是 | 提醒ID |
搜索提醒器
在所有列表中按文本和/或标签搜索提醒。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | no\* | 搜索文本(不区分大小写,匹配标题和注释) |
tag | string | no\* | 按标签筛选(无 #) |
include_completed | boolean | 否 | 包括已完成的提醒(默认值: false) |
\*至少 query 或 tag 必须提供。
标签
标签存储为标签(#work, #shopping)在提醒注释字段中,并由服务器解析:
- 创建 提醒-
tags参数将标签附加到注释中 - 更新 —
add_tags为笔记添加新标签,remove_tags将它们从标题和注释中删除 - 阅读 --the
tags响应中的字段包含标题和注释中的所有标记 - 搜索 --the
tag参数按标签过滤提醒
注: 这些是 _不_ 本地提醒标签。Apple不会在EventKit API或AppleScript字典中公开标记管理。本地标签(在提醒侧栏中可见的彩色标签)只能通过提醒UI分配。此服务器创建的标签是notes字段中的标签字符串——它们用于通过MCP服务器进行搜索和过滤,但不会在提醒应用程序中显示为本地标签。
已知限制
- 标签不是原生的。 EventKit没有用于本机提醒标签的API。标签存储为
#hashtag注释中的文本——完全适用于基于MCP的搜索和过滤,但对提醒应用程序标签系统不可见。请参阅 标签 详情请参阅第节。 - 不支持列表中的部分。 苹果从macOS Sonoma开始在提醒用户界面中引入了部分,但尚未在公共EventKit API中公开。等待Apple添加此内容。
测试
swift test