# Show HN: WhatsApp Bridge for those with their own VPS

> Source: <https://github.com/vid-t/whatsapp-bridge>
> Published: 2026-10-24 21:41:02+00:00

**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
```

1. **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.
2. **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.
3. **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.

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](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.

Important

`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`](https://github.com/vid-t/whatsapp-bridge/blob/main/deploy/SELF-HOSTING.md) has three paths. Each ends at
`https://<your domain>` with automatic HTTPS from Caddy.

| Path | Best for | 
|---|---|
| [**A. cloud-init**](https://github.com/vid-t/whatsapp-bridge/blob/main/deploy/SELF-HOSTING.md#path-a-one-click-vps-with-cloud-init) | a fresh VPS: paste one file and boot | 
| [**B. Docker Compose**](https://github.com/vid-t/whatsapp-bridge/blob/main/deploy/SELF-HOSTING.md#path-b-docker-compose) | a server that already runs Docker | 
| [**C. Install script**](https://github.com/vid-t/whatsapp-bridge/blob/main/deploy/SELF-HOSTING.md#path-c-a-server-you-already-have) | an existing Ubuntu 24.04 or Debian 12 server | 

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

In Claude Code:

```
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`](https://github.com/vid-t/whatsapp-bridge/blob/main/docs/MCP-SETUP.md) has the steps for
each assistant, plus API keys for scripts.

Your assistant gets six read-only tools:

| Tool | What it does | 
|---|---|
| `search_messages` | full-text search across the ticked chats | 
| `read_chat` | read one chat in time order | 
| `get_message_context` | show the messages around a search hit | 
| `list_chats` | list the ticked chats, most recent first | 
| `get_document` | give the file name and caption of an attachment | 
| `get_status` | show the linked devices and how fresh the data is | 

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](https://github.com/tulir/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](https://github.com/vid-t/whatsapp-bridge/blob/main/docs/CONFIGURATION.md) : every setting, flag and command
- [Self-hosting](https://github.com/vid-t/whatsapp-bridge/blob/main/deploy/SELF-HOSTING.md) : install, upgrade and back up
- [Connect your assistant](https://github.com/vid-t/whatsapp-bridge/blob/main/docs/MCP-SETUP.md) : Claude, ChatGPT, Codex and API keys
- [Security policy](https://github.com/vid-t/whatsapp-bridge/blob/main/SECURITY.md) ·[Contributing](https://github.com/vid-t/whatsapp-bridge/blob/main/CONTRIBUTING.md)

[AGPL-3.0-only](https://github.com/vid-t/whatsapp-bridge/blob/main/LICENSE). If you run a modified whatsapp-bridge as a service, you must offer
its source code to the people who use it.
