14 ms·
Show HN: WhatsApp MCP Server
Hi HN – I built an open-source, self-hosted Model Context Protocol (MCP) server for WhatsApp: https://github.com/lharries/whatsapp-mcp https://github.com/lharries/whatsapp-mcp
It connects to your personal WhatsApp account via the WhatsApp Web multi-device API (using whatsmeow from the Beeper team), and doesn't rely on third-party APIs. All messages are stored locally in SQLite. Nothing is sent to the cloud unless you explicitly allow your LLM to access the data via tools – so you maintain full control and privacy.
The MCP server can:
- Search your messages, contacts, and groups
- Send WhatsApp messages to individuals or groups
Why build this?
99% of your life is stored in WhatsApp, by connecting an LLM to WhatsApp you get all this context. And your AI agent can execute tasks on your behalf by sending messages.
- jlucaso 1y ago[dead]
- oulipo 1y agoBTW is there a good "WhatsApp API SaaS" open-source server? There's Waha https://github.com/devlikeapro/waha https://github.com/devlikeapro/waha which is nice, but unfortunately they don't offer "safety features" in the open-source version to lock the access I guess it's solvable with Tailscale though
- tobyhinloopen 1y agoThis is incredibly cool, thank you
- andrewmi 1y agoLooks interesting. It would be nice to see something like this for all the communication methods in Beeper unified together. That way all communication is covered rather then just 1 app of many.
- astorphobis 1y agoBeeper is actually built on top of an open source protocol called Matrix, and they also open sourced all of the bridges, so you can host beeper yourself and connect the LLM to it. And even better - since the protocol is open source, you can also connect to the official Beeper server! You can even use alternative Matrix clients to connect to Beeper, I do this on my company laptop since Beeper is blocked. https://matrix.org/ecosystem/clients/ https://matrix.org/ecosystem/clients/
- rndmio 1y agoThe why is because we can, but damn am I finding the tools being built with, or having tacked on, AI depressing. Is this a small glimpse of the future we're building for ourselves? Communication is valuable because thought and effort went into it, lowering the bar on producing content doesn't mean more choice, it means lower quality. Already I see a reaction against this amongst some peers when they find out something they were asked to review was AI generated, why should they put effort in if the other person didn't.
- stavros 1y agoIf we find the "thought and effort" part of communication valuable, we'll keep it. If not, we won't.
- kevindamm 1y agoThat would be a fine posture to take, very naturally-selective, but I find it discomforting because I've seen so many different ways that humans act that don't benefit them (individually or on the whole). It isn't always out of self-destruction or lack of self-preservation. More often than not, the choice was based on what's easiest -- a tendency towards the path of least resistance. This technology looks a lot like trading off intention, and attention, for quick and good-enough(?) results. Enough so that I can understand GP's concern for our communication skills as a society. I think we could find ourselves losing the "thought and effort" in spite of it being more valuable, because many people find it easier. Or that even those who continue on with it, despite it not being easier, are broadly labeled as a bot because their writings failed the vibe check. I have confidence that there will always be small communities that continue holding this as valuable, but that maintaining it in a community setting will become more strained as the general zeitgeist drifts in the direction of regarding output higher than effort.
- samastur 1y agoCool work, but I'm more fascinated by your claim "99% of your life is stored in WhatsApp...". Not even remotely true for me even if it would encompass all messaging apps I use. I guess I'm just an old introvert, but it makes me wonder how life looks like for those for whom it is true.
- anonzzzies 1y agoI have 99% of my life is in Telegram; I like the choice between end to end encryption or not (for unimportant stuff) so I create private groups for everything and just toss everything in there. I have a (custom) LLM bot which does stuff depending what the group is about and what is posted. Telegram is very fast and convenient (yes, because it's not all encrypted, just the stuff you want to be).
- CarlitosHighway 1y agoThe way to absolute dominance of WhatsApp with the Normies has't been sufficiently analyzed, I reckon. Somehow, WhatsApp managed to become extremely popular and heavily used by people who have trouble switching on a desktop pc. Even senior citizens have no trouble using it. Is it because they have a high motivation to use it? The UI / UX of WhatsApp surely isn't great, I'd even say it's quite bad. Where am I wrong? What am I not seeing?
- xandrius 1y agoYou're wrong that it's bad. Clearly it cannot be that bad if even your 80 yo grandma can get the gist of how to use it properly. Can it be better? Probably. Does it need to be better? Clearly not.
- gherkinnn 1y agoWhatsApp acts the phone's entry point for many. Contacts aren't stored on the phone, messages act as contacts. Phone and video calls also on WhatsApp. Photos are shared via WhatsApp so that's where the gallery is. It even functions as a calendar of sorts – events are organised in WhatsApp groups so there you have directions and dates and who brings what. More and more businesses use WhatsApp to communicate with customers. Why people like this, I do not know. But this is what I observe. Maybe software in general is too shit to use so people prefer to take a sub-optimal WhatsApp-based life over fighting their phones at every step. And I can't blame them.
- saberience 1y agoI think this is like the 7th or 8th WhatsApp MCP implementation. I really have zero understanding why people think this is something crazy. It’s not. It’s importing the official MCP packages and wrapping basic API methods with an MCP tool decorator. You can even ask Claude or ChatGPT to make your MCP tools for you and they will write this same code in 1 minute. I can’t wait until the community realizes that MCP servers are literally just regular methods with a one line decorator and these posts just get downvoted for being incredibly low effort. It’s basically the same as upvoting someone saying “hey guys, I wrote a method which connects to the WhatsApp API”, that’s it, really.
- soulofmischief 1y agoYeah. I've written infrastructure for LLMs to use Twitter, Discord, WhatsApp and more since '22 before GPT 3.5 was even out. You can imagine my contempt for all of this right now. That said, MCP might be here to stay for a while as a stopgap for reducing duplication of engineering work.
- CarlitosHighway 1y agoYou know why: MCPs are still a hot topic, and WhatsApp is ubiquitous (unfortunately).
- deleted 1y ago[deleted]
- enoughalready 1y agoI've been struggling to understand the hype as well. I think the excitement is more around seeing how MCP is being embraced, and the impact it can have. Rather than me having to wire up a bunch of tools by hand, I can now point to some configuration files and MCP servers. I think it's fair for people to be excited, but ultimately, yes, your prediction is correct, and it won't be as exciting after MCP becomes a standard. This is similar to any new technology. e.g. years ago, Go programs and literature were popular on this site, but not so much any more.
- _def 1y agoIf I find out someone pipes my chat messages into a LLM, I will not converse with that person anymore.
- tobyhinloopen 1y agoThat's a completely reasonable boundary. Privacy and consent are critical, especially when sharing personal messages or conversations. It's fair to expect that your interactions remain private unless you've explicitly agreed otherwise. If you'd like, you can communicate your stance clearly to others in advance, ensuring they're aware of your boundaries regarding the use of your messages with AI tools or other external resources.
- siva7 1y agoI don't think their main concern was the privacy aspect.
- stavros 1y agoWhat do you think their concern was? I can't see any other issues someone might have.
- Aachen 1y agoEnergy usage is another. What would happen to world power consumption if 1% of WhatsApp chats would be fed to ChatGPT? A third reason besides privacy would be the purpose. Is the purpose generating automatic replies? Or automatic summaries because the recipient can't be bothered to read what I wrote? That would be a dick move and a good reason to object as well, in my opinion
- stavros 1y ago> What would happen to world power consumption if 1% of WhatsApp chats would be fed to ChatGPT? The same thing that happens now, when 100% of power consumption is fed to other purposes. What's the problem with that?
- siva7 1y agoSo lovely. Thanks. Now i can answer all my friends and spouse immediately instead of ghosting them for days.
- gabll 1y agoI don’t know if whatsmeow was intended for this use case: imagine a LLM performing multiple calls in a short period of time, could you risk to have your whatsapp account blocked by Meta?
- d3m0t3p 1y agoApparently this is the case: https://github.com/tulir/whatsmeow/discussions/199 https://github.com/tulir/whatsmeow/discussions/199
- vdfs 1y agoWhatsApp will ban you if it detect any kind of automation, if you use this or an other wrapper you will -very luckily- get banned, even without making calls. They want you to use their paid business API
- kinduff 1y agoI've been running and using a puppeting bridge [1] for my Matrix instance for more than 4 years with 3 different numbers and no problem at all. The controls they have in place are probably based on behavior, rather than on access. [1]: https://github.com/mautrix/whatsapp https://github.com/mautrix/whatsapp
- jeroenhd 1y agoGood to know WhatsApp is at least somewhat proactive against scammers.
- lharries 1y agoIt saves the messages in a local SQLite database on load — so querying shouldn't be an issue as it doesn't contact the WhatsApp server. For sending, this does use the API however and needs more caution
- hansmayer 1y ago> 99% of your life is stored in WhatsApp That's quite a presumption to make.
- 1oooqooq 1y agothat's a low estimate if you live in India or south America.
- linux_devil 1y agoI am not sure about how other Whatsapp MCP servers build , but I like the design here : Go server to integrate with Whatsapp , scan the QR etc which acts like a bridge and lightsql to store some data APP MCP server : To interact with the data , app and LLM
- nzach 1y agoThere is any reason why you choose to build a Python wrapper for a Golang binary? I've been playing around with mcp-go[0] and it seems pretty good. [0] - https://github.com/mark3labs/mcp-go https://github.com/mark3labs/mcp-go
- lharries 1y agoMainly that I'm more familiar with Python — you're correct however that MCP Go would be a good way to go if I do a bigger refactor
- ofirtwo 1y agoWhy was Go necessary here? couldn't it just be a whole-python project?
- lharries 1y agowhatsmeow is in Go. Potentially I could have used a gopy instead and done it all in python (or just done it all in Go)
- master-lincoln 1y agoIf 99% of your life is stored at one of the biggest advertising companies in the world you already gave up on privacy anyway...
- FirmwareBurner 1y ago[flagged]
- master-lincoln 1y agoI don't think there was any moral critique in what I wrote. I just commented on OPs > so you maintain full control and privacy Of course everybody is free to chose who they hand over data to. One more comment to your writing: > take their favorite apps away there was no mention of taking anybody's app away. If people want to contact me they will need to use something that is not owned by a big advertising company. One can install additional apps or use services that do not need any apps.
- charlie-83 1y agoAll messages are e2e encrypted though right?
- ideashower 1y agoMessages are. I do not believe that metadata about the messages are, however. So they know who you're speaking to, at what frequency, and from where.
- charlie-83 1y agoFair enough. That's not a problem to me but I can see it being an issue for people requiring complete anonymity. Are there any alternatives to WhatsApp that would fix this problem?
- johnisgood 1y ago
- echoangle 1y agoAs others have already said, think about what you're doing when you use this. If you connect a not-selhosted LLM to this, you're effectively uploading chat message with other people to a third-party server. The people you chat with have an expectation of privacy so this would probably be illegal in many jurisdictions.
- tuananh 1y agoremoved. my bad.
- cirego 1y agoI believe echoangle’s concern is about the security and privacy of the LLM using the data, not the MCP server itself.
- tuananh 1y agoah right. my bad.
- cirego 1y agoSorry, I should have added my second thought. Your original comment about isolating MCP servers is also good! These are tools where the AI may tell you it’s doing one thing and then accidentally do another (I had an LLM tell me it would make a directory using mkdir but then called the shell command kdir (thankfully didn’t exist)). Sandboxing MCP servers is also important!
- greenavocado 1y ago> The people you chat with have an expectation of privacy so this would probably be illegal in many jurisdictions. Name one
- echoangle 1y agoGermany. You have a "allgemeines Persönlichkeitsrecht" (general personal rights?) that prevents other people from publishing information that's supposed to be private. Here's a case where someone published a facebook dm for example: https://openjur.de/u/636287.html https://openjur.de/u/636287.html
- esafak 1y agoIs it possible to augment WhatsApp's SQLite installation with an extension?
- Mystery-Machine 1y agoThank you! I live in Latin America and here WhatsApp group chats are through the roof. I easily receive several hundreds of messages across various group chats. It's not possible nor healthy to read every single message. It would be great if the tool could summarize all the unread messages from the given group chat. I played around a bit with the MCP server and it was having problems to even get the correct group chat. The group chat name could be stored together with the ID in SQLite and, if matched, it should immediately query for messages from that group chat, skipping the need to listing chats and trying to find the correct group chat and, worst of all, failing.
- sunshine-o 1y agoBy the way, I was just searching for a way not to have the WhatsApp app on my phone while limiting the risk of third party software and/or have my number banned. Is there a way to login on WhatsApp Web on a server and then proxy or scrape the messages to send them to my phone?
- deutschepost 1y agoIt is crazy how out of touch people on this platform can be. I live in Europe but have been to Asia and South America. People use WhatsApp everywhere. Just because you live in North America where everyone uses SMS/iMessage/whatever doesn't mean everyone does. I can remember my parents scolding me because they got charged for me receiving some SMS. WhatsApp was a gamechanger. You could send messages or pictures without having to think about the price of it (While being connected to a WLAN...). So at some point no one used SMS anymore. iMessage was out of the question also, because only a very small amount of people had iPhones. And everyone was scared of sending a Message because you wouldn't know if the Message would cost you or not. But everyone had WhatsApp. For some people it is a requirement to have a social life. It is not your choice to use it or not. Network effects are taking care of that. If you think Signal or whatever is a better choice, good on you. But if you don't want to cut ties with some of your friends, prepare to use multiple apps. Including WhatsApp.
- deleted 1y ago[deleted]
- hemlock4593 1y ago> WhatsApp was a gamechanger. You could send messages or pictures without having to think about the price of it (While being connected to a WLAN...) Back, when data plans were around 1GB or less some network providers didn't charge you for using whatsapp on specific plans in Europe. There were also whatsapp branded sim cards, but I haven't seem them for a long time though.
- jascha_eng 1y agoI live in europe and my social life is spread out between telegram, whatsapp, signal, discord. For professional life you could even include linkedin and slack. A single MCP server wont ever cut it for me and adding 6 for 6 different tools will confuse any llm and make it send the message to the wrong person. Completely ignoring the fact that I would not use this anyways... like people want to talk to ME not an LLM. Whatsapp has a chat with Llama now anyways if that's who they want to talk to.
- 1y ago
- michi_ashley7 1y ago[flagged]
- michi_ashley7 1y ago[flagged]
- michi_ashley7 1y ago[flagged]
- michi_ashley7 1y ago[flagged]
- ahstilde 1y agocould i use this to create groupchat summaries?
- lharries 1y agoYep!
- anduc 1y ago[dead]
- karn97 1y ago[flagged]
- lbeurerkellner 1y agoPlease be aware that MCP has severe security risks associated: https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks https://invariantlabs.ai/blog/mcp-security-notification-tool....
- ocBuilder 1y agowhat I'm most shocked about is that people choose whatsapp and the like for "end to end encryption" then open a window to small companies like OpenAI and Anthropic.
- thegreathir 1y agoIf this thing is connected to someone's WA and I ask "Who is your girlfriend?", the AI theoretically could list all the chats, read some messages in each chat, determine who could be the partner and return the name to me :)) I can go ahead and ask "What was the last fight about".
- deleted 1y ago[deleted]
- sharmasachin98 1y agoReally cool project, the privacy-first angle and self-hosted design are a huge plus. Curious: have you run into any rate limits or session issues with the whatsmeow API, especially when used continuously by agents?
- deleted 1y ago[deleted]
- nkarkare 1y ago[dead]
- MatiasPerez 1y agoI just use vambe.ai, 14 days free trial too