Skip to main content
Glama
WhatsApp Agent

WhatsApp Agent

by calypso-so
README.md
<div align="center">

<img src="assets/logo.png" alt="WhatsApp Agent by Calypso: an owl in a hoodie holding a phone" width="200">

# WhatsApp Agent by Calypso

**An MCP server that lets Claude, ChatGPT and Cursor read your team's WhatsApp boards.**

*The owl watches every board. It never messages your customers. It only reads.*

<a href="https://glama.ai/mcp/servers/calypso-so/whatsapp-agent-mcp"><img src="https://glama.ai/mcp/servers/calypso-so/whatsapp-agent-mcp/badges/score.svg" alt="WhatsApp Agent MCP server on Glama"></a>
<a href="https://glama.ai/mcp/connectors/io.github.calypso-so/whatsapp-agent-mcp-server"><img src="https://glama.ai/mcp/connectors/io.github.calypso-so/whatsapp-agent-mcp-server/badges/score.svg" alt="WhatsApp Agent MCP connector on Glama"></a>

</div>

<a href="#see-it-work"><img src="docs/screenshots/waiting-chats.png" alt="WhatsApp Agent answering which customers are waiting for a reply: seven are waiting, the longest is Hannah Brooks at 5 hours 12 minutes, with each chat's last message, board, column and owner" width="100%"></a>

Ask which chats are waiting, who owns each one, what the Calypso Agent handled, and which
follow-ups are due.

```text
https://whatsapp-mcp.calypso.so/whatsapp/mcp
```

Needs a [Calypso WhatsApp](https://www.calypso.so/whatsapp) workspace.

## See it work

Four things your AI can do once it reads the boards.

<table>
<tr>
<td width="50%" valign="top">
<img src="docs/screenshots/boards-overview.png" alt="Two boards, Support and Sales, each with its open, waiting, unread and taken chats and its columns, plus the Inbox, the longest wait, the connected line and whether the team is open" width="100%">
<h3>Every board at a glance</h3>
<code>whatsapp-overview</code> returns each board's open, waiting, unread and taken chats, the Inbox, the longest wait and whether the team is open now.
</td>
<td width="50%" valign="top">
<img src="docs/screenshots/one-chat.png" alt="A summary of the chat that has waited longest: a floor lamp arrived damaged, a teammate offered a replacement, and the customer is still waiting to hear whether it arrives by Friday, above the last three messages, the owner, the board and the wait" width="100%">
<h3>Catch up on a chat before you reply</h3>
<code>whatsapp-open-chat</code> and <code>whatsapp-read-messages</code> give the card, what was actually said, who owns it and how long the customer has waited.
</td>
</tr>
<tr>
<td width="50%" valign="top">
<img src="docs/screenshots/team-activity.png" alt="A week of conversations: 22 in all, 15 handled by the team, 4 by the agent and 3 by nobody, then a table of four teammates with the conversations each owns, how many are closed, the replies and the minutes to take one" width="100%">
<h3>See what each teammate handled</h3>
<code>whatsapp-agent-activity</code> breaks a period down by teammate, closed conversations included, next to what the Calypso Agent answered by itself.
</td>
<td width="50%" valign="top">
<img src="docs/screenshots/read-only.png" alt="Asked to reply to a customer, the assistant says it cannot send WhatsApp messages from here because the connection only reads, calls no tool, and points to the boards; the label reads No message sent" width="100%">
<h3>It reads. It never sends</h3>
There is no tool to send, reply, move, assign or close. Asked to, your AI says so and points you to the boards.
</td>
</tr>
</table>

<sub>Real answers, recorded from a demo workspace of made-up customers.</sub>

## What people ask it

| You ask | It answers from |
|---|---|
| "How are my boards this morning?" | each board's open, unanswered, unread and taken chats; the Inbox; the longest wait |
| "Who has been waiting longest?" | open chats where the customer spoke last, longest wait first |
| "What came in overnight?" | chats with activity since the time you name |
| "What's in the Inbox?" | chats that are on no board yet |
| "What's on Ana's plate?" | the chats one teammate owns |
| "Did the agent handle the Pérez chat? What did it say?" | the chat, who answers it, and its messages |
| "Can we still reply to her for free?" | WhatsApp's 24-hour reply window for that chat |
| "Which follow-ups go out today?" | the Calypso Agent's planned follow-ups, by due time |
| "How much did the agent handle this week?" | conversations handled by the agent, by the team, by nobody |
| "Who handled the most chats today?" | the day's conversations by teammate, closed ones included |
| "What did Camilo close this afternoon?" | his closed conversations, each one openable |

## Connect

<img src="docs/screenshots/one-url-nine-tools.png" alt="The hosted endpoint https://whatsapp-mcp.calypso.so/whatsapp/mcp beside WhatsApp Agent's nine tools in three groups: boards, chats and team" width="100%">

Give your client the URL above. It opens Calypso's sign-in; you pick the WhatsApp workspace
and press Allow. No key to paste.

| Client | How |
|---|---|
| **Claude Code** | `claude mcp add --scope user --transport http whatsapp-agent https://whatsapp-mcp.calypso.so/whatsapp/mcp`, then open the sign-in link it prints |
| **Claude Desktop, Cursor, and others** | Add a remote (Streamable HTTP) server with the URL; the client finds sign-in on its own |
| **Any MCP client** | Streamable HTTP + OAuth 2.1 with dynamic registration and PKCE |

Disconnect any time from **API Keys** in Calypso. The connection ends with the key.

## Tools

One scope, `whatsapp:read`, and nine tools. Every one is marked read-only.

| Tool | What it returns |
|---|---|
| `whatsapp-overview` | Every board at a glance, the Inbox, the longest wait, and whether the team is open now |
| `whatsapp-list-boards` | Boards with their columns, and whether the agent and follow-ups are on |
| `whatsapp-list-chats` | Open chats, filtered by board, column, state, owner, recency or minutes waiting |
| `whatsapp-find-chat` | Open chats by name, phone digits or last message; a full phone number is looked up directly |
| `whatsapp-open-chat` | One chat: its card, last messages, open follow-ups and reply window |
| `whatsapp-read-messages` | A chat's messages, newest first, a page at a time |
| `whatsapp-list-follow-ups` | Planned follow-ups, by state, due time and board |
| `whatsapp-agent-activity` | How many of the team's conversations the agent, the team, or nobody handled over a period, and the same by teammate |
| `whatsapp-list-conversations` | A period's conversations, open and closed, by teammate, status and who answered |

Two prompts ship with it: `whatsapp-morning-brief` and `whatsapp-get-started`.

## What it does not do

- It does not send, reply, move, assign or close. There is no tool for any of them.
- It does not return media. An attachment is named by its kind (`image`, `audio`, `video`, `document`).
- It does not search closed chats by name. Closed conversations are listed by period and teammate, and a full phone number is looked up directly.
- It lists what the board shows: the newest 500 waiting and 500 taken chats.

## How it works

```text
your AI client ──POST──▶ whatsapp-mcp.calypso.so/whatsapp/mcp        server/  (this repo)
   │                401 + WWW-Authenticate ─▶ /.well-known/oauth-protected-resource/whatsapp/mcp
   └──OAuth 2.1 (PKCE, dynamic registration)──▶ login.calypso.so/oauth/*     Calypso sign-in
                                                 consent mints a read-only Calypso API key
server verifies the token, unseals the key ──▶ api.calypso.so/v1/whatsapp/*   Calypso API
```

| Rule | What it means |
|---|---|
| **No state** | No database, no sessions. Every `POST` builds a fresh server for its caller |
| **The API decides** | Which team the key belongs to, what it may read, and which fields an answer carries are the Calypso API's. This server passes answers on as they arrive |
| **One key per connection** | Allowing access mints a Calypso key that can read WhatsApp boards and nothing else |
| **Short, bound tokens** | ES256 JWT, 15 minutes, audience = this endpoint's URL |
| **Revocation is real** | Disconnect revokes the key. Calls fail within a minute |
| **Fair use** | 120 requests per minute per caller. Over that: `429` with `Retry-After` |

Authentication, the stateless endpoint, the rate limiter and the tool base classes come from
[`@calypsohq/elephant-mcp-server/kit`](https://github.com/calypso-so/elephant-mcp/tree/main/server#kit),
the kit Calypso's MCP servers share. This repo adds the nine tools and their wording.

## Run it locally

For working on the server. To use WhatsApp Agent, connect to the hosted endpoint above.

Node 20 or later.

```bash
cd server && npm ci && npm run build && npm start
```

Or run the published package, [`@calypsohq/whatsapp-agent-mcp-server`](https://www.npmjs.com/package/@calypsohq/whatsapp-agent-mcp-server), without a checkout:

```bash
npx -y @calypsohq/whatsapp-agent-mcp-server
```

It listens on `http://localhost:8080/whatsapp/mcp`. Sign-in with Calypso happens on the hosted
endpoint only; a local server takes a Calypso API key that can read WhatsApp boards, sent as a
bearer token.

| Env | Default | Purpose |
|---|---|---|
| `PORT` | `8080` | Listen port |
| `CALYPSO_API_BASE_URL` | `https://api.calypso.so/v1` | Calypso API |
| `WHATSAPP_REQUESTS_PER_MINUTE` | `120` | Per-caller request budget |

Check a change before you send it:

```bash
npm run lint && npm run typecheck && npm test && npm run smoke
```

| Path | What it is |
|---|---|
| [`server/src/tools/`](server/src/tools/) | One class per tool; `WhatsAppTool` says once that every tool only reads |
| [`server/src/api/WhatsAppReads.ts`](server/src/api/WhatsAppReads.ts) | Which Calypso API route answers each question |
| [`server/src/preset.ts`](server/src/preset.ts) | The endpoint, its scope, its tools and what every caller is told |
| [`server/src/server.ts`](server/src/server.ts) | Wiring: who may call, the endpoint, the HTTP router |

## ChatGPT plugin

<a href="https://chatgpt.com/plugins/plugin_asdk_app_6b0b10f15f6c8191bbcf286c90f1e961"><img src="docs/screenshots/chatgpt-plugin.png" alt="WhatsApp Agent as a ChatGPT plugin: WhatsApp Agent: Team Inbox, WhatsApp Business CRM insights, three starter prompts, developer Calypso, category Communication and the MCP server address" width="100%"></a>

WhatsApp Agent is a ChatGPT plugin: **[WhatsApp Agent: Team Inbox](https://chatgpt.com/plugins/plugin_asdk_app_6b0b10f15f6c8191bbcf286c90f1e961)**. Connect once and any
ChatGPT chat can tell you who is waiting, who owns each chat and what your team handled. It asks for
one permission, `whatsapp:read`.

## License

[MIT](LICENSE).