返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: WhatsApp Bridge for those with their own VPS

A self-hosted bridge & seutp gateaway built on top of whats-meow for storing and accessing your raw whatsapp data

Hacker News 最新vid_t2026/10/24 · 20 天前12 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

A self-hosted bridge & seutp gateaway built on top of whats-meow for storing and accessing your raw whatsapp data

whatsapp-bridge links to your WhatsApp as an extra device, the way WhatsApp Web does. It keeps the chats you choose in an encrypted database on your own VPS, where you can serach the chats or query them using MCP. For now, it is read only.

flowchart LR phone["Your phone<br/>(WhatsApp)"] -- "linked device,<br/>like WhatsApp Web" --> bridge["whatsapp-bridge<br/>on your server"] bridge --> db[("Encrypted database<br/>messages of ticked chats only")] ai["Your AI assistant<br/>Claude · ChatGPT · Codex"] -- "MCP, after you sign in<br/>read-only tools" --> bridge

Loading

Link. On your phone, open Settings › Linked devices › Link a device and scan the QR code. The bridge now receives your messages like any other linked device in WhatsApp.

Tick. Choose only which chats it keeps. Every chat starts unticked, and the bridge stores none of its messages until you tick it. Tick within an hour of linking to also keep the history WhatsApp sends at linking.

Ask. Connect your assistant to https://<your server>/mcp and sign in. It searches and reads your ticked chats when it needs to, and cites every message it uses.

Try it locally

Go 1.27 or newer. The web UI is built into the binary.

git clone https://github.com/vid-t/whatsapp-bridge.git && cd whatsapp-bridge CGO_ENABLED=0 go build -o bin/whatsapp-bridge ./cmd/whatsapp-bridge ./bin/whatsapp-bridge keygen > whatsapp-bridge.env && chmod 600 whatsapp-bridge.env ./bin/whatsapp-bridge serve -env-file whatsapp-bridge.env

Open http://127.0.0.1:8080, enter the access code from whatsapp-bridge.env, link WhatsApp and tick your chats. Tick them within the hour to keep their recent history.

whatsapp-bridge.env holds the database key. Without it the database cannot be read, so back it up.

claude.ai and ChatGPT reach the bridge from their own servers, so they need a public HTTPS address. Claude Code and Codex also work over localhost or a private network. deploy/SELF-HOSTING.md has three paths. Each ends at https://<your domain> with automatic HTTPS from Caddy.

You need a domain pointing at the server, with ports 80 and 443 open.

claude mcp add --transport http whatsapp-bridge https://<host>/mcp claude mcp login whatsapp-bridge

In claude.ai, Claude Desktop, ChatGPT or Codex, add https://<host>/mcp as a connector and sign in on the page that opens. docs/MCP-SETUP.md has the steps for each assistant, plus API keys for scripts.

Every message comes with a wa:// citation, so you can check the source of an answer.

Read-only. The code has no way to send messages, an "online" status or read receipts. The tools cannot change or delete anything.

Only ticked chats. Chats start unticked. The bridge never stores the messages of an unticked chat, only its name and last activity for the chat list, so no assistant can see it. For an hour after you link a phone, it holds those messages in memory only, so a chat you tick in that hour keeps its history. Then they are dropped.

Encrypted at rest. The database file is encrypted with Adiantum when BRIDGE_DB_KEY is set (keygen creates it). A running bridge decrypts messages in memory, so run it on a machine you control.

Closed by default. It listens on 127.0.0.1 and refuses a public address unless an access code and a database key are set.

Audited. Every tool call is logged: who called it, which tool, which chats and how many rows. The log never holds message text.

Nothing goes to an AI provider on its own. Your assistant gets messages only when it calls a tool, and only that call's results.

Your phone stays in charge. Unlink the device in WhatsApp and the bridge is cut off at once. WhatsApp also logs out linked devices when the phone has been offline for 14 days.

Warning

Unofficial client. whatsapp-bridge uses whatsmeow, an unofficial implementation of the WhatsApp Web protocol. It is not affiliated with, endorsed by or connected to WhatsApp or Meta. WhatsApp does not permit unofficial clients, and an account linked to one can be restricted. Staying silent and read-only keeps that risk low but cannot remove it. You accept it when you link an account.

Not built yet: downloading attachments and reading their text, and limiting what each member sees (today every member sees all ticked chats).

Configuration and commands: every setting, flag and command

Self-hosting: install, upgrade and back up

Connect your assistant: Claude, ChatGPT, Codex and API keys

Security policy · Contributing

Licence

AGPL-3.0-only. If you run a modified whatsapp-bridge as a service, you must offer its source code to the people who use it.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →