通过任何兼容 MCP 的客户端(如 Claude Desktop 或 Cline)发送原生 macOS 通知并与系统对话框进行交互。
<a href="https://glama.ai/mcp/servers/t1w1dq4wy4"><img width="380" height="200" src="https://gips0.baidu.com/it/u=3090790031,17535450&fm=3081&app=3081&f=PNG?w=760&h=400" alt="apple-notifier-mcp MCP 服务器" /></a>
要通过 Smithery 自动安装 Apple Notifier for Claude Desktop:
npx -y @smithery/cli install apple-notifier-mcp --client claude
npm install -g apple-notifier-mcp
对于 Cline (cline_mcp_settings.json):
{
"mcpServers": {
"apple-notifier": {
"command": "apple-notifier-mcp"
}
}
}
对于 Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"apple-notifier": {
"command": "apple-notifier-mcp"
}
}
}
显示可定制内容的原生 macOS 通知。
参数:
title (必需): 字符串 - 通知的标题message (必需): 字符串 - 主消息内容subtitle (可选): 字符串 - 要显示的副标题sound (可选): 布尔值 - 是否播放默认的通知声音(默认:true)显示交互式对话框提示以获取用户输入。
参数:
message (必需): 字符串 - 在提示对话框中显示的文本defaultAnswer (可选): 字符串 - 默认填充的文本buttons (可选): 字符串数组 - 自定义按钮标签(最多 3 个)icon (可选): 'note' | 'stop' | 'caution' - 要显示的图标使用 macOS 的文本转语音功能。
参数:
text (必需): 字符串 - 要朗读的文本voice (可选): 字符串 - 使用的声音(默认为系统声音)rate (可选): 数字 - 语速(-50 到 50,默认为 0)使用 macOS 屏幕捕获功能截取屏幕。
参数:
path (必需): 字符串 - 保存截图的位置type (必需): 'fullscreen' | 'window' | 'selection' - 截图类型format (可选): 'png' | 'jpg' | 'pdf' | 'tiff' - 图像格式hideCursor (可选): 布尔值 - 是否隐藏光标shadow (可选): 布尔值 - 是否包括窗口阴影(仅适用于窗口类型)timestamp (可选): 布尔值 - 将时间戳添加到文件名打开原生 macOS 文件选择器对话框。
参数:
prompt (可选): 字符串 - 提示信息defaultLocation (可选): 字符串 - 默认目录路径fileTypes (可选): 对象 - 文件类型过滤器(例如,{"public.image": ["png", "jpg"]})multiple (可选): 布尔值 - 允许多个文件选择// 发送通知
await client.use_mcp_tool("apple-notifier", "send_notification", {
title: "Hello",
message: "World",
sound: true
});
// 显示提示
const result = await client.use_mcp_tool("apple-notifier", "prompt_user", {
message: "你的名字是什么?",
defaultAnswer: "John Doe",
buttons: ["OK", "Cancel"]
});
// 朗读文本
await client.use_mcp_tool("apple-notifier", "speak", {
text: "Hello, world!",
voice: "Samantha",
rate: -20
});
// 截图
await client.use_mcp_tool("apple-notifier", "take_screenshot", {
path: "screenshot.png",
type: "window",
format: "png"
});
// 选择文件
const files = await client.use_mcp_tool("apple-notifier", "select_file", {
prompt: "选择图片",
fileTypes: {
"public.image": ["png", "jpg", "jpeg"]
},
multiple: true
});
参见 CONTRIBUTING.md 了解开发设置和指南。
评估包加载了一个 mcp 客户端,然后运行 index.ts 文件,因此在测试之间无需重新构建。您可以通过在 npx 命令前缀中加载环境变量。完整的文档可以在这里找到 这里。
OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/index.ts
MIT 许可证 - 详情请参阅 LICENSE 文件。