top | item 43532967

Show HN: WhatsApp MCP Server

229 points| lharries | 11 months ago |github.com

Hi HN – I built an open-source, self-hosted Model Context Protocol (MCP) server for WhatsApp: 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.

138 comments

order
[+] nzach|11 months ago|reply
There 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

[+] lharries|11 months ago|reply
Mainly 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
[+] oulipo|11 months ago|reply
BTW is there a good "WhatsApp API SaaS" open-source server? There's 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

[+] MatiasPerez|11 months ago|reply
I just use vambe.ai, 14 days free trial too
[+] gabll|11 months ago|reply
I 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?
[+] lharries|11 months ago|reply
It 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
[+] rndmio|11 months ago|reply
The 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|11 months ago|reply
If we find the "thought and effort" part of communication valuable, we'll keep it. If not, we won't.
[+] andrewmi|11 months ago|reply
Looks 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|11 months ago|reply
Beeper 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/
[+] saberience|11 months ago|reply
I 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.

[+] enoughalready|11 months ago|reply
I'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.

[+] soulofmischief|11 months ago|reply
Yeah. 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|11 months ago|reply
You know why: MCPs are still a hot topic, and WhatsApp is ubiquitous (unfortunately).
[+] samastur|11 months ago|reply
Cool 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.

[+] CarlitosHighway|11 months ago|reply
The 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?

[+] berkes|11 months ago|reply
It's really a demographic issue. I've found that in the US relatively few people use WA. Same for SEA. But in western Europe almost everything is done on WA.

From "neighborhoodwatch" via "the school information" to "colleagues". Hell, even governments and public transportation have "feel unsafe? message us on whatsapp 06..." In the Netherlands it's truly omnipresent, and without WA you will be left out socially.

I'm reluctant of WA, because I'm steering clear of Meta as much as possible, but I do use it to: keep in touch with at least 26 social groups - friends, family, colleagues, co-workers, business - keep in touch with my date/love, my mother, and father who lives across the world.

granted, there's a big move going towards signal lately - finally. But I'm not sure how big this really is, and how sticky it will prove. Nor if this is just my bubble or truly across the whole country.

[+] mrweasel|11 months ago|reply
Some people I know seems to be more split between Snapchat, Instagram and Facebook Messenger. I don't see anyone being 99% in one app, and certainly not WhatsApp. I think I know like three people who use WhatsApp privately.

I do know people working in sales and purchasing and I wouldn't be surprised if they had 25% or more of their professional lives in WhatsApp. Previously they used Skype heavily. So this could be interesting for them.

[+] joseda-hg|11 months ago|reply
Certainly not the case for me, but I reckon I could do plenty via whatsapp

- Group Chat for the family (Immediate, Extended Mother Side, Extended Father Side)

- Chat with hole in the wall restaurant to order sometinhg to eat after work

- 2FA for local shop

- Customer Support for local bank

- Work Chat (Informally assigned tasks and general info)

- Chat with Taxi

- Delivery Tracking for local courier

- LLM wrapper

- Invoice/Receipt Sending

- Appointments for many services (Like barbers)

I could more or less do anything, from work related task management, to requesting a new credit card from inside whatsapp

[+] anonzzzies|11 months ago|reply
I 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).
[+] lharries|11 months ago|reply
For most people, their life isn't stored in neat Notion database.

Instead, if you have calendar + email + their main messaging apps (e.g. WhatsApp) you cover the majority of it. It's messy and unstructured — but luckily LLMs are great at that

[+] thegreathir|11 months ago|reply
If 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".
[+] linux_devil|11 months ago|reply
I 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
[+] Mystery-Machine|11 months ago|reply
Thank 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.
[+] ofirtwo|11 months ago|reply
Why was Go necessary here? couldn't it just be a whole-python project?
[+] lharries|11 months ago|reply
whatsmeow is in Go. Potentially I could have used a gopy instead and done it all in python (or just done it all in Go)
[+] sunshine-o|11 months ago|reply
By 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?

[+] sharmasachin98|11 months ago|reply
Really 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?
[+] ocBuilder|11 months ago|reply
what 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.
[+] siva7|11 months ago|reply
So lovely. Thanks. Now i can answer all my friends and spouse immediately instead of ghosting them for days.
[+] esafak|11 months ago|reply
Is it possible to augment WhatsApp's SQLite installation with an extension?