mac-messages-mcp

by carterlasalle
Verified

local-only server

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

Integrations

  • Allows reading and sending messages through the macOS Messages app, with capabilities to filter messages by contact and interact with iMessage conversations.

  • Provides access to the macOS Messages database, enabling interaction with the native messaging system on Mac computers.

Mac メッセージ MCP

MCP (Multiple Context Protocol) を使用して macOS メッセージ アプリと対話するための Python ブリッジ。

特徴

  • macOS メッセージアプリから最近のメッセージを読む
  • 連絡先別にメッセージをフィルタリング
  • iMessageで新しいメッセージを送信する
  • API経由でメッセージにアクセスする

前提条件

  • macOS(macOS 11以降でテスト済み)
  • Python 3.10以上
  • UVパッケージマネージャー

uvのインストール

Mac を使用している場合は、Homebrew を使用して uv をインストールします。

brew install uv

それ以外の場合は、 uv Web サイトのインストール手順に従ってください。

⚠️ uvをインストールする前に先に進まないでください

インストール

フルディスクアクセス許可

⚠️ このアプリケーションでは、端末またはアプリケーションがメッセージ データベースにアクセスするために**、フル ディスク アクセス**権限が必要です。

フルディスクアクセスを許可するには:

  1. システム環境設定/設定>セキュリティとプライバシー/プライバシー>フルディスクアクセスを開きます
  2. 変更するにはロックアイコンをクリックしてください
  3. ターミナルアプリ(Terminal、iTerm2など)またはClaude Desktop/Cursorをリストに追加します
  4. 許可を与えた後、端末またはアプリケーションを再起動してください

統合

クロードデスクトップ統合

  1. Claude >設定>開発者>設定の編集> claude_desktop_config.jsonに移動します。
  2. 次の構成を追加します。
{ "mcpServers": { "messages": { "command": "uvx", "args": [ "mac-messages-mcp" ] } } }

カーソル統合

「カーソル設定」 > **「MCP」**に移動し、これをコマンドとして貼り付けます。

uvx mac-messages-mcp

⚠️ MCP サーバーのインスタンスを 1 つだけ実行します (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]

セキュリティノート

このアプリケーションは、個人的なコミュニケーションが含まれるメッセージデータベースに直接アクセスします。責任を持ってご利用いただき、適切な権限をお持ちであることをご確認ください。

ライセンス

マサチューセッツ工科大学

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

-
security - not tested
A
license - permissive license
-
quality - not tested

MCP(Multiple Context Protocol)を使用してmacOSのメッセージアプリとやり取りするためのPythonブリッジ。uvx mac-messages-mcpで簡単にインストールできます。

  1. Features
    1. Prerequisites
      1. Installing uv
    2. Installation
      1. Full Disk Access Permission
    3. Integration
      1. Claude Desktop Integration
      2. Cursor Integration
      3. Option 1: Install from PyPI
      4. Option 2: Install from source
    4. Usage
      1. As a Module
      2. As a Command-Line Tool
    5. Development
      1. Versioning
    6. Security Notes
      1. License
        1. Contributing
          ID: gxvaoc9znc