LW

lharries/whatsapp-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

6776 stars 1462 forks 品質 64 トレンド 44MIT

WhatsApp MCPサーバー

概要

これはWhatsApp用のモデルコンテキストプロトコル(MCP)サーバーです。 これにより、個人のWhatsappメッセージ(画像、動画、ドキュメント、音声メッセージを含む)を検索し、連絡先を検索し、個人やグループにメッセージを送信できます。また、画像、動画、ドキュメント、音声メッセージなどのメディアファイルも送信できます。 WhatsAppのウェブマルチデバイスAPI(whatsmeowライブラリを使用)を通じて直接接続します。すべてのメッセージはローカルのSQLiteデータベースに保存され、エージェントがツール(あなたが操作する)を通じてアクセスしたときにのみLLM(例えばClaude)に送信されます。 Claudeに接続した場合にできることの例を紹介します。 このプロジェクトや私が取り組んでいる他のプロジェクトの最新情報を得るには、こちらからメールアドレスを入力してください 注意点:多くのMCPサーバーと同様に、WhatsApp MCPも致命的な三重一体の対象となります。つまり、プロジェクトの注入はプライベートデータの流出につながる可能性があります。 - スタート - Python 3。

概要(AI 翻訳)

これはWhatsApp用のモデルコンテキストプロトコル(MCP)サーバーです。

これにより、個人のWhatsappメッセージ(画像、動画、ドキュメント、音声メッセージを含む)を検索し、連絡先を検索し、個人やグループにメッセージを送信できます。また、画像、動画、ドキュメント、音声メッセージなどのメディアファイルも送信できます。

WhatsAppのウェブマルチデバイスAPI(whatsmeowライブラリを使用)を通じて、あなたの個人WhatsAppアカウントに直接接続します。すべてのメッセージはローカルのSQLiteデータベースに保存され、エージェントがツール(あなたが操作する)を通じてアクセスした場合にのみLLM(例えばClaude)に送信されます。

Claudeに接続した場合にできることの例を紹介します。

このプロジェクトや私が取り組んでいる他のプロジェクトの最新情報を受け取りたい方は、こちらからメールアドレスを入力してください

注意: 多くのMCPサーバーと同様に、WhatsApp MCPも致命的な三重一体の対象となります。つまり、プロジェクトの注入はプライベートデータの流出につながる可能性があります。

設置

前提条件

  • 行け
  • Python 3.6+
  • Anthropic Claude デスクトップアプリ(またはカーソル)
  • UV(Pythonパッケージマネージャー)、[[T0]でインストール)
  • FFmpeg(optional) - 音声メッセージ専用。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

WhatsApp MCP Server

This is a Model Context Protocol (MCP) server for WhatsApp.

With this you can search and read your personal Whatsapp messages (including images, videos, documents, and audio messages), search your contacts and send messages to either individuals or groups. You can also send media files including images, videos, documents, and audio messages.

It connects to your personal WhatsApp account directly via the Whatsapp web multidevice API (using the whatsmeow library). All your messages are stored locally in a SQLite database and only sent to an LLM (such as Claude) when the agent accesses them through tools (which you control).

Here’s an example of what you can do when it’s connected to Claude.

To get updates on this and other projects I work on enter your email here

Caution: as with many MCP servers, the WhatsApp MCP is subject to the lethal trifecta. This means that project injection could lead to private data exfiltration.

Installation

Prerequisites

  • Go
  • Python 3.6+
  • Anthropic Claude Desktop app (or Cursor)
  • UV (Python package manager), install with curl -LsSf https://astral.sh/uv/install.sh | sh
  • FFmpeg (optional) - Only needed for audio messages. If you want to send audio files as playable WhatsApp voice messages, they must be in .ogg Opus format. With FFmpeg installed, the MCP server will automatically convert non-Opus audio files. Without FFmpeg, you can still send raw audio files using the send_file tool.

Steps

  1. Clone this repository

    git clone https://github.com/lharries/whatsapp-mcp.git
    cd whatsapp-mcp
    
  2. Run the WhatsApp bridge

    Navigate to the whatsapp-bridge directory and run the Go application:

    cd whatsapp-bridge
    go run main.go
    

    The first time you run it, you will be prompted to scan a QR code. Scan the QR code with your WhatsApp mobile app to authenticate.

    After approximately 20 days, you will might need to re-authenticate.

  3. Connect to the MCP server

    Copy the below json with the appropriate {{PATH}} values:

    {
      "mcpServers": {
        "whatsapp": {
          "command": "{{PATH_TO_UV}}", // Run `which uv` and place the output here
          "args": [
            "--directory",
            "{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server", // cd into the repo, run `pwd` and enter the output here + "/whatsapp-mcp-server"
            "run",
            "main.py"
          ]
        }
      }
    }
    

    For Claude, save this as claude_desktop_config.json in your Claude Desktop configuration directory at:

    ~/Library/Application Support/Claude/claude_desktop_config.json
    
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "whatsapp": { "command": "{{PATH_TO_UV}}", // Run `which uv` and place the output here "args": [ "--directory", "{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server", // cd into the repo, run `pwd` and enter the output here + "/whatsapp-mcp-server" "run", "main.py" ] } } }