苹果提醒MCP服务器
](https://badge.fury.io/py/apple-reminders-mcp)   
一个模型上下文协议(MCP)服务器,使AI助手能够在macOS上与Apple提醒进行交互。此服务器提供通过AppleScript以编程方式创建、读取、列出和删除提醒的工具。
特性
- ✅ 创建包含截止日期、时间、备注和位置的提醒
- 📋 列出所有提醒列表
- 🔍 从特定列表中获取提醒(已完成或待处理)
- 🗑️ 按名称删除提醒
- 🤖 与Claude Desktop和其他MCP客户端兼容
- 🍎 通过AppleScript集成macOS
- 🔒 输入净化以防止AppleScript注入
演示
https://github.com/user-attachments/assets/d36e0df3-ff4b-4f48-bb29-41ddb5483c6b
先决条件
- macOS(AppleScript需要)
- Python 3.10或更高版本
- 苹果提醒应用程序
安装
选项1:从PyPI安装(推荐)
pip install apple-reminders-mcp选项2:从源代码安装
git clone https://github.com/shreyanshjain05/apple_reminder_mcp_server.git
cd apple_reminder_mcp_server
pip install -e .用法
运行服务器
如果通过pip安装:
apple-reminders-mcp或者直接运行:
python -m apple_reminders_mcp.serverMCP检验员测试
npx @modelcontextprotocol/inspector python3 server.py这将:
- 在上启动代理服务器
localhost:6277 - 在浏览器中打开检查器界面
http://localhost:6274 - 显示用于身份验证的会话令牌
与Claude Desktop集成
添加到您的Claude Desktop配置文件中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"apple-reminders": {
"command": "python3",
"args": ["/path/to/apple_reminder_mcp_server/server.py"]
}
}
}备注:替换/path/to/使用克隆仓库的实际路径。如果出现“服务器断开连接”错误,请使用Python可执行文件的完整路径(运行which python3找到它)。
可用工具
1.create_reminder
在Apple提醒中创建新的提醒。
参数:
title(必填):提醒的标题due_date(必填):到期日(例如,“2024-12-25”、“明天”、“下周五”)due_time(可选):HHMMSS格式的时间(默认值:上午9点为090000)notes(可选):附加注释/正文list_name(可选):目标列表名称(默认:“使用代理创建提醒”)location(可选):基于位置的提醒的位置
例子:
{
"title": "Team Meeting",
"due_date": "tomorrow",
"due_time": "140000",
"notes": "Discuss Q1 goals",
"list_name": "Work"
}2.获取提醒
从特定列表中获取提醒。
参数:
list_name(必填):提醒列表的名称completed(可选):是否获取已完成的提醒(默认:false)limit(可选):要返回的最大提醒次数(默认值:20)
3.list_reminder_lists
返回所有可用的提醒列表。无需参数。
4.删除提醒
按名称删除提醒。
参数:
name(必填):要删除的提醒的确切名称list_name(可选):要搜索的特定列表(如果未提供,则搜索所有列表)
故障排除
常见问题
- AppleScript权限错误
- 授予终端/IDE权限以控制系统首选项中的提醒→ 安全与隐私→ 自动化
- “未找到提醒列表”错误
- 确保列表名称完全匹配(区分大小写) - 使用 list_reminder_lists 查看可用列表
- 日期解析错误
- 使用标准格式,如“YYYY-MM-DD”或自然语言,如“明天”
发展
运行测试
pip install -e ".[dev]"
pytest tests/ -v项目结构
apple_reminder_mcp_server/
├── .github/workflows/
│ ├── test.yml # CI testing
│ └── publish.yml # PyPI publishing
│── __init__.py
├── pyproject.toml # Package configuration
├── server.py # Main MCP server implementation
└── README.md
├── tests/
│ ├── __init__.py
│ └── test_server.py # Unit tests贡献
看 贡献.md 作为指导方针。
许可证
此项目根据Apache 2.0许可证获得许可-请参阅 许可证 文件以获取详细信息。
致谢
______________________________________________________________________
⭐ Star this repo if you find it useful!
☕ You can also support me on Ko-fi: https://ko-fi.com/shreyanshjain05 — every coffee keeps me going!
