Duet
by gvridi
README.md
# Duet
<img src="assets/duet-orbit.svg" alt="" width="72" height="72">
I started Duet because I wanted two WhatsApp accounts in one window. Duet opens WhatsApp Web in a desktop app and gives agents like Claude Code and Codex a local connection through MCP, the Model Context Protocol. Ask your agent to find an address buried in last month's messages, catch you up on a busy group chat, or draft a reply for you to read before it goes out.
If you're waiting for a reply, Duet can check the chat for you while the app is running and that account has MCP access on. It waits briefly after the last message so a few quick replies arrive together, then passes them to the waiting agent. If nobody is waiting, Duet can notify you or start a configured agent, depending on how the watch was set up. You can see or stop watches in the **Agent activity** drawer.
## Get started
You can hand your agent the [install guide](https://whatsapp.gvridi.com/install.md) or build from this repository yourself. You'll need Git and Node.js 22.12 or newer.
### Windows
```powershell
git clone https://github.com/gvridi/duet.git
cd duet
npm ci
npm test
npm run package
```
For an x64 build, open `release/WhatsApp-Duet-win32-x64/WhatsApp-Duet.exe`. If PowerShell blocks `npm`, use `npm.cmd`. Keep the release folder together so the app can find its profile.
1. On your phone, go to **WhatsApp → Linked devices → Link a device** and scan the QR code.
2. In the account's sidebar settings, turn on **MCP access** and choose **Copy MCP config**.
3. Add the server to your agent's MCP settings and reconnect it. Ask the agent to call `list_accounts` and `account_status` to check the connection.
### macOS
See the [Apple Silicon setup guide](MAC_SETUP.md) for a local build and MCP configuration. It uses an ad-hoc signature. A native Mac build and live Mac use still need verification.
## One account or several
On a fresh profile, Duet opens with one account. Use **+ Add account** in the sidebar to link up to four numbers. Each has its own sign-in and MCP switch. **Focus** shows one account in the workspace, and **Split** shows two side by side. An upgrade keeps the existing accounts, labels, and saved access settings when you reuse the same profile.
The sidebar shows each linked account's WhatsApp photo when available. Open an account's dropdown and choose **Delete account** to remove its saved sign-in from Duet on this computer. Links in chats open in your default browser.
New accounts have MCP access off. Turn it on only for accounts you want your agents to use. The switch is shared across connected agents and grants access to the account through Duet's tools. Switching it off blocks new agent calls on that account. You can still use WhatsApp yourself, and a send already submitted to WhatsApp can't be called back by the switch.
If you'd like to review a drafted reply yourself, open **Agent activity** and choose **Send reply**. Duet shows the account and exact text before you confirm. If an agent sends directly and the outcome is uncertain, check the chat or operation status before retrying.
## Where your chats go
The app, its data, and the MCP bridge live on your computer. Duet adds no cloud relay. WhatsApp Web still connects to WhatsApp, and your AI client may pass content it reads to its model provider. Keep your profiles, sessions, drafts, and downloads private.
Duet is an independent project under the [MIT License](LICENSE). It uses WhatsApp Web's unofficial interfaces, which can change or break. Linked devices may have only part of your chat history.
## Tests and development
Run `npm test` for the code and MCP tests, `npm run smoke` for the isolated Electron fixture, and `npm run verify:packaged` after a fresh package build. The fixture uses synthetic accounts. It checks account isolation, adding accounts from the sidebar, access switches, and a range of chat and draft operations without touching your WhatsApp sessions.
The Windows x64 build, smoke test, and packaged MCP handshake have passed. Those checks don't establish live support for every WhatsApp feature. See the [Duet skill](skill/duet/SKILL.md) for tool usage, reply watches, and how to recover when an action's outcome is uncertain.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues