iMessage MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Enables sending iMessages to contacts or phone numbers from your Mac, with confirmation when messages are sent.

  • Provides access to macOS Contacts app for viewing, searching, and managing contacts, including names, phone numbers, and email addresses.

iMessage MCP 服务器

⚠️ 免责声明 - 使用风险自负⚠️

该软件按原样提供,不提供任何担保或保证。

使用 AppleScript 发送 iMessage 和管理联系人的 MCP 服务器。

此服务器使用 AppleScript 通过模型上下文协议 (MCP) 与 macOS 的“信息”和“通讯录”应用交互。它将 AppleScript 命令封装在 TypeScript 服务器中,以便您执行以下操作:

  • 查看和搜索您的联系人
  • 向联系人或电话号码发送 iMessage
  • 发送消息时获取确认

特征

资源

  • 通过contacts://all访问您的联系人
  • 查看联系方式,包括姓名、电话号码和电子邮件地址
  • 所有数据都保留在您的本地机器上

工具

  • search_contacts - 通过姓名、电话或电子邮件查找联系人
    • 接受搜索查询并返回匹配的联系人
    • 搜索姓名、电话号码和电子邮件地址
  • send_message - 发送 iMessage
    • 获取收件人(电话/电子邮件)和消息内容
    • 通过本地信息应用发送
    • 返回确认或错误详细信息

安装

  1. 安装依赖项:
npm install
  1. 构建服务器:
npm run build
  1. 配置 Claude Desktop 以使用服务器:

在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json

{ "mcpServers": { "imessage": { "command": "node", "args": ["/path/to/imessage-server/build/server.js"] } } }
  1. 重启Claude桌面
  2. 当系统提示时授予权限:
    • 通讯录访问
    • 消息访问

用法

安装完成后,您可以自然地与 Claude Desktop 对话:

  • “显示我的联系人”
  • “搜索名为 Marissa 的联系人”
  • “发送消息至 555-0123,说我 10 分钟后到”
  • “给 Alice 发一条 iMessage 询问我们是否还一起吃午饭”

安全说明

  • 所有操作均在您的机器本地进行
  • 没有联系人或消息数据发送到外部服务器
  • 服务器需要 macOS 权限才能访问“通讯录”和“信息”
  • 信息通过你的 iMessage 帐户发送

发展

对于开发和调试,请使用 MCP Inspector:

npx @modelcontextprotocol/inspector node build/server.js

要求

  • macOS(用于消息和联系人集成)
  • Node.js 18 或更高版本
  • 克劳德桌面
  • 活跃的 iMessage 帐户

故障排除

如果邮件未发送:

  1. 检查“信息”应用是否已登录
  2. 验证是否授予权限
  3. 在 Claude Desktop 日志中查找错误:
tail -f ~/Library/Logs/Claude/mcp*.log

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

本地服务器使 Claude Desktop 能够与您的 macOS 联系人和消息应用程序进行交互,让您可以通过自然语言命令搜索联系人和发送 iMessage。

  1. Features
    1. Resources
    2. Tools
  2. Installation
    1. Usage
      1. Security Notes
        1. Development
          1. Requirements
            1. Troubleshooting
              ID: l9nb64rn7g