From 9a2fc5e5bcb823f579eeea5531dafd3aa2fbcaf4 Mon Sep 17 00:00:00 2001 From: Luke Harries Date: Sun, 6 Apr 2025 17:53:56 +0100 Subject: [PATCH] improve readme --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c456e1..a2bc8ab 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a Model Context Protocol (MCP) server for WhatsApp. -With this you can search your personal Whatsapp 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. +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](https://github.com/tulir/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). @@ -137,10 +137,15 @@ Claude can access the following tools to interact with WhatsApp: - **send_message**: Send a WhatsApp message to a specified phone number or group JID - **send_file**: Send a file (image, video, raw audio, document) to a specified recipient - **send_audio_message**: Send an audio file as a WhatsApp voice message (requires the file to be an .ogg opus file or ffmpeg must be installed) +- **download_media**: Download media from a WhatsApp message and get the local file path -### Media Sending Features +### Media Handling Features -The MCP server supports sending various media types to your WhatsApp contacts: +The MCP server supports both sending and receiving various media types: + +#### Media Sending + +You can send various media types to your WhatsApp contacts: - **Images, Videos, Documents**: Use the `send_file` tool to share any supported media type. - **Voice Messages**: Use the `send_audio_message` tool to send audio files as playable WhatsApp voice messages. @@ -148,6 +153,10 @@ The MCP server supports sending various media types to your WhatsApp contacts: - With FFmpeg installed, the system will automatically convert other audio formats (MP3, WAV, etc.) to the required format. - Without FFmpeg, you can still send raw audio files using the `send_file` tool, but they won't appear as playable voice messages. +#### Media Downloading + +By default, just the metadata of the media is stored in the local database. The message will indicate that media was sent. To access this media you need to use the download_media tool which takes the `message_id` and `chat_jid` (which are shown when printing messages containing the meda), this downloads the media and then returns the file path which can be then opened or passed to another tool. + ## Technical Details 1. Claude sends requests to the Python MCP server