提醒mcp
用于Linux的MCP(模型上下文协议)服务器 remind 命令行日历和提醒系统。
概述
此服务器暴露了强大的 remind 该实用程序是一组MCP工具,允许AI助手管理提醒、安排通知和控制提醒守护进程——所有这些都不需要知道提醒的原生语法。
先决条件
- Python 3.10+
- Linux
remind包装(apt-get install remind) - 可选:
notify-send用于桌面通知(通常来自libnotify-bin)
安装
# Clone the repository
git clone
cd remind-mcp
# Install the package
pip install .或者以开发模式安装:
pip install -e .配置
克劳德桌面
将此添加到您的Claude Desktop配置文件中(~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"remind": {
"command": "remind-mcp",
"env": {
"REMIND_FILE": "~/.reminders"
}
}
}
}环境变量
| 变量 | 描述 | 默认值 |
|---|---|---|
REMIND_FILE | 提醒文件的路径 | ~/.reminders |
工具
add_reminder
在提醒文件中添加新的提醒。
参数:
date(必填):提醒应何时触发。支持:
- 具体日期: "2026-02-10", "Feb 10 2026" - 相对日期: "tomorrow", "today", "next monday" - 再发生: "every monday", "every day", "daily", "weekly", "monthly"
message(必填):提醒信息文本time(可选):24小时或12小时格式的时间("14:30","2:30pm")recurrence(可选):覆盖重复:"daily","weekly","monthly"advance_notice(可选):提前显示提醒的天数
示例:
add_reminder(date="2026-02-10", time="14:30", message="Deploy to production")
add_reminder(date="every monday", time="09:00", message="Weekly standup")
add_reminder(date="tomorrow", message="Buy groceries", advance_notice=1)list_reminders
列出即将到来的提醒。
参数:
date_range(可选):"today","week"(默认),"month",或特定日期
例子:
list_reminders(date_range="week")delete_reminder
按行号或搜索模式删除提醒。
参数:
identifier(必填):行号(例如。"3")或文本模式(例如。"standup")
例子:
delete_reminder(identifier="standup")
delete_reminder(identifier="2")update_reminder
更新现有提醒。按行号或搜索模式查找提醒,然后用更新的值替换它。只有您提供的字段会被更改;省略的字段保持其当前值。
参数:
identifier(必填):行号(例如。"3")或文本模式(例如。"standup")date(可选):新日期(格式与add_reminder)message(可选):新的提醒消息文本time(可选):24小时或12小时格式的新时间。通过""删除时间。recurrence(可选):新的重复类型:"daily","weekly","monthly"advance_notice(可选):新的提前通知天数。通过0移除。
示例:
update_reminder(identifier="standup", time="10:00")
update_reminder(identifier="2", message="Updated deploy instructions", date="2026-04-01")
update_reminder(identifier="1", advance_notice=0, time="")trigger_reminder
使用自定义操作/webhook设置提醒。如果需要,启动守护进程。
参数:
date(必填):何时触发time(必填):触发时间action_type(必填):"curl","script",或"command"action_payload(必需):URL、脚本路径或命令
示例:
trigger_reminder(
date="2026-02-10",
time="14:30",
action_type="curl",
action_payload="https://api.example.com/notify"
)
trigger_reminder(
date="tomorrow",
time="09:00",
action_type="script",
action_payload="/usr/local/bin/my_notify.sh"
)get_daemon_status
检查提醒守护进程是否正在运行。
退货: 运行状态、PID、正常运行时间和通知命令。
start_daemon
使用通知命令启动提醒守护进程。
参数:
notification_command(可选):使用命令%s消息的占位符。默认为notify-send "Reminder" "%s".
示例:
start_daemon()
start_daemon(notification_command='curl -X POST https://api.example.com/notify -d \'{"msg":"%s"}\'')
start_daemon(notification_command='/path/to/script.sh "%s"')stop_daemon
停止所有正在运行的提醒守护进程(SIGTERM,然后SIGKILL回退)。
restart_daemon
使用可选的新配置重新启动守护进程。
参数:
notification_command(可选):重新启动的守护进程的新通知命令。
运作原理
此服务器将自然语言样式参数转换为提醒的原生语言 REM 语法:
| 输入 | 生成的REM行 |
|---|---|
date="2026-02-10", time="14:30", message="Deploy" | REM 10 Feb 2026 AT 14:30 MSG Deploy % |
date="every monday", time="09:00", message="Standup" | REM Mon AT 09:00 MSG Standup % |
date="daily", message="Check email" | REM MSG Check email % |
date="2026-03-01", message="Report", advance_notice=3 | REM 1 Mar 2026 +3 MSG Report % |
安全
- 根据外壳注入模式验证通知命令
- 像这样的角色
;,&&,||, ``,以及$(` 被拒绝 - 用户输入在写入提醒文件之前会被净化
- 通过PID文件正确跟踪守护进程
运行测试
pip install pytest
pytest tests/许可证
麻省理工学院
