Skip to main content
Glama

mac-messages-mcp

MIT License
76
  • Apple

Mac 信息 MCP

使用 MCP(多上下文协议)与 macOS 消息应用程序交互的 Python 桥接器。

带有 tex\_FvvnmbaBTFeKy6F2GMlLqA\_IfCBMgJARcia1WTH7FaqwA 的 Mac 电脑图表

特征

  • 从 macOS 信息应用阅读最新消息
  • 按联系人过滤消息
  • 通过 iMessage 发送新消息
  • 通过 API 访问消息

先决条件

  • macOS(已在 macOS 11+ 上测试)
  • Python 3.10+
  • uv 包管理器

安装 uv

如果您使用的是 Mac,请使用 Homebrew 安装 uv:

brew install uv

否则,请按照uv 网站上的安装说明进行操作。

⚠️在安装 uv 之前不要继续

安装

完全磁盘访问权限

⚠️ 此应用程序需要您的终端或应用程序具有完全磁盘访问权限才能访问消息数据库。

授予完全磁盘访问权限:

  1. 打开系统偏好设置/设置>安全和隐私/隐私>完全磁盘访问
  2. 单击锁定图标进行更改
  3. 将您的终端应用程序(Terminal、iTerm2 等)或 Claude Desktop/Cursor 添加到列表中
  4. 授予权限后重新启动终端或应用程序

一体化

Claude 桌面集成

  1. 转到Claude >设置>开发人员>编辑配置> claude_desktop_config.json
  2. 添加以下配置:
{ "mcpServers": { "messages": { "command": "uvx", "args": [ "mac-messages-mcp" ] } } }

光标集成

转到**“光标设置”** > **“MCP”**并将其粘贴为命令:

uvx mac-messages-mcp

⚠️ 仅运行 MCP 服务器的一个实例(在 Cursor 或 Claude Desktop 上),而不是同时运行两者

选项 1:从 PyPI 安装

uv pip install mac-messages-mcp

选项 2:从源安装

# Clone the repository git clone https://github.com/carterlasalle/mac_messages_mcp.git cd mac_messages_mcp # Install dependencies uv install -e .

用法

作为模块

from mac_messages_mcp import get_recent_messages, send_message # Get recent messages messages = get_recent_messages(hours=48) print(messages) # Send a message result = send_message(recipient="+1234567890", message="Hello from Mac Messages MCP!") print(result)

作为命令行工具

# Run the MCP server directly mac-messages-mcp

发展

版本控制

该项目使用语义版本控制。有关版本控制系统的工作原理以及如何发布新版本的详细信息,请参阅VERSIONING.md

要升级版本:

python scripts/bump_version.py [patch|minor|major]

安全说明

此应用程序直接访问包含个人通信信息的“消息”数据库。请谨慎使用,并确保您拥有相应的权限。

执照

麻省理工学院

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

星史

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

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

一个 Python 桥接器,用于使用 MCP(多上下文协议)与 macOS 信息应用交互。使用 uvx mac-messages-mcp 即可轻松安装。

  1. 特征
    1. 先决条件
      1. 安装 uv
    2. 安装
      1. 完全磁盘访问权限
    3. 一体化
      1. Claude 桌面集成
      2. 光标集成
      3. 选项 1:从 PyPI 安装
      4. 选项 2:从源安装
    4. 用法
      1. 作为模块
      2. 作为命令行工具
    5. 发展
      1. 版本控制
    6. 安全说明
      1. 执照
        1. 贡献
          1. 星史

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A simple MCP server that can send notifications on mac devices.
              Last updated -
              5
              9
              8
              TypeScript
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              A streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.
              Last updated -
              13
              Python
              MIT License
            • -
              security
              F
              license
              -
              quality
              A Python server that enables interaction with macOS native applications (Contacts, Notes, Mail, Messages, Reminders, Calendar, and Maps) through AppleScript, featuring asynchronous operations and type-safe interfaces.
              Last updated -
              5
              Python
              • Apple
            • -
              security
              A
              license
              -
              quality
              A macOS app that provides an MCP server to your Messages, Contacts, and more
              Last updated -
              559
              Apache 2.0
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/carterlasalle/mac_messages_mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server