Install Duet (WhatsApp for AI agents) ===================================== Paste the next line into a local agent that can run terminal commands and connect to MCP. Help me install Duet (WhatsApp for AI agents) on this computer. Read the guide at https://whatsapp.gvridi.com/install.txt, check my OS and architecture first, and troubleshoot any failing step before reporting success. Source code: https://github.com/gvridi/Duet-Local-Whatsapp-MCP 1. Confirm the user wants to proceed ------------------------------------ Duet uses unofficial WhatsApp Web interfaces. WhatsApp updates can interrupt the integration, and WhatsApp may restrict accounts for misuse such as spam or bulk messaging. Duet's app and MCP bridge run locally. Your AI client may send chat content it reads to its model provider. Explain that MCP access gives connected agents full access through Duet's tools for that account, including reading and sending. The switch starts off for each new account. The user can turn it off at any time. Get the user's go-ahead before installing. Keep verification read-only with real accounts. 2. Check this computer before building -------------------------------------- Run git --version and check the Node platform, architecture and version. node -p "JSON.stringify([process.platform, process.arch, process.version])" You need Git, Node.js 22.12 or newer, and internet access for npm, Electron and WhatsApp Web. Node 24 LTS is a suitable choice. Confirm the system's OS and CPU architecture as well as the Node process architecture. Use a local MCP-capable agent with access to this same computer. A cloud-only sandbox cannot connect directly to the desktop app. - Windows 10 x64 is where Duet was built and tested. On Windows 11 x64, use the same steps and verify the build on that PC. Use x64 Node for these instructions. - Apple Silicon Macs running macOS 13 or newer have an experimental source build. Use native arm64 Node, follow the Mac guide below, and verify each step on that Mac. A Windows test does not verify the Mac build. - Linux, Intel Macs, Windows on ARM and other configurations have no verified install path here. Identify the compatibility blocker instead of guessing with commands for a different platform. If a small compatibility fix is feasible on the user's machine, make it and rerun the relevant checks. If it needs a port or remains blocked, explain the failing dependency or feature and what work or hardware is needed. 3. Build and verify ------------------- Choose a permanent local projects folder. If a Duet checkout or installation already exists, inspect it and preserve its profile and agent configuration before deciding how to proceed. On Windows x64, run the following commands in PowerShell. Check each result before continuing. git clone https://github.com/gvridi/Duet-Local-Whatsapp-MCP.git duet cd duet npm.cmd ci npm.cmd test npm.cmd run smoke npm.cmd run package npm.cmd run verify:packaged The smoke test uses synthetic accounts. Check for "passed: true". The last command verifies the packaged MCP handshake with an isolated profile. Launch release/WhatsApp-Duet-win32-x64/WhatsApp-Duet.exe and keep the whole release folder together. If packaging fails while copying an Electron file under Temp, use a fresh writable directory for TEMP and TMP in the build command's environment and try again. This recovered a Windows 10 locale-file copy error during verification. If the first attempt left a partial output folder, leave it in place and use a new output directory with npm.cmd run package -- --out=work/retry-package. Set DUET_PACKAGE_DIR to the resulting WhatsApp-Duet-win32-x64 folder when running npm.cmd run verify:packaged, then launch the executable from that same folder. Apple Silicon macOS. Follow https://github.com/gvridi/Duet-Local-Whatsapp-MCP/blob/main/MAC_SETUP.md for native build, signing, verification and installation in ~/Applications. Use its generated MCP configuration for this Mac. 4. Link WhatsApp and connect the agent -------------------------------------- In WhatsApp on the phone, the user opens Linked devices > Link a device and scans the QR code shown in Duet. Wait for the sidebar to show Linked. Use + Add account if the user wants to link another number. Ask the user to turn on MCP access manually for the accounts they want the agent to use. In the Windows app, open the account's settings menu and choose Copy MCP config. On Mac, use the config generated by the Mac guide. Register the whatsapp-duet server in the agent's local MCP settings. Preserve the command, args and all env values from the supplied config. They include absolute paths that can contain spaces. Merge this entry with existing settings and reconnect the agent or open a fresh session if tools need reloading. - For Codex, use codex mcp add with the supplied command, arguments and --env values, or add [mcp_servers.whatsapp-duet] to the user's active config.toml and put the environment values under [mcp_servers.whatsapp-duet.env]. Translate the supplied JSON to TOML if editing the file. See https://developers.openai.com/codex/mcp/ - For Claude Code, use claude mcp add-json with the whatsapp-duet server object, or merge the supplied mcpServers entry into .mcp.json for project scope. See https://code.claude.com/docs/en/mcp - Other clients need local stdio MCP support. Use their documented configuration format. 5. Verify the connection and handle failures -------------------------------------------- Call list_accounts, then account_status for the exact enabled account. Confirm ready is true and perform a read-only search or read in a chat the user chooses. Report which steps passed, the install location, and which accounts are ready. The user can manage MCP access per account and see drafts and watches under Agent activity. If a step fails, record the command, exact error, Duet commit, OS, architecture and Node version. Diagnose the first failure, apply a scoped fix where possible, then rerun that step and its dependent checks. For missing tools, check the registered executable, arguments, environment and the agent's restart or reconnect requirement. If tools load but the account is unavailable, check the actual Linked status, the user's MCP switch and account_status. Respect OS protections and user-controlled access switches, and preserve the profile. If you still cannot finish, give the user the precise blocker, what you tried and the next action. A completed build alone does not establish a live WhatsApp connection. Share only redacted diagnostics if reporting an issue at https://github.com/gvridi/Duet-Local-Whatsapp-MCP/issues. Optional on Windows x64. Copy skill/duet into a skills folder your agent reads. Create location.json in the copied skill from location.example.json. Use the actual executable, MCP script and discovery paths from Copy MCP config, and set the version from the installed source's package.json. Run node with the copied scripts/duet.mjs path and the doctor argument to check the fallback CLI. The skill covers drafts, reads and reply watches.