doctor

doctor is a command for Claude Code from rodrigopg/whatsapp-mcp. It costs 21 tokens per session (709 once invoked), scanned A, original, MIT.

A read-only diagnostic command for checking a WhatsApp connection bridge, login pairing, and configured accounts.

In plain words
What is it for?
Use it to check whether the bridge is installed and reachable, whether authentication works, and which WhatsApp account each server uses.
Why use it?
It helps find setup problems without restarting services, changing settings, or deleting files.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the whatsapp-mcp plugin — 3 commands shipped together

Good fit Use it to check whether the bridge is installed and reachable, whether authentication works, and which WhatsApp account each server uses.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/rodrigopg/whatsapp-mcp/doctor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/rodrigopg/whatsapp-mcp

Made for: Claude Code.

Or install whatsapp-mcp, the plugin that ships this one along with the rest of its 3 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/rodrigopg/whatsapp-mcp/doctor/github.svg)](https://agentmods.dev/commands/rodrigopg/whatsapp-mcp/doctor)
Your own site
<a href="https://agentmods.dev/commands/rodrigopg/whatsapp-mcp/doctor"><img src="https://agentmods.dev/badge/commands/rodrigopg/whatsapp-mcp/doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doctor

Your own site · 80×15
<a href="https://agentmods.dev/commands/rodrigopg/whatsapp-mcp/doctor"><img src="https://agentmods.dev/badge/commands/rodrigopg/whatsapp-mcp/doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 709 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00709
Opus 5 $0.00010 $0.00354
Sonnet 5 $0.00004 $0.00142
Haiku 4.5 $0.00002 $0.00071

Measured 10d ago against content hash 7e87370dd395, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

doctor scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`curl -s -o /dev/null -w "%{http_code}" <WHATSAPP_API_BASE_URL>/qr` (or `/chats` with a POST body `{}` if auth is required — see below). Connection refused/timeout → bridge not running or wrong port. Distinguish these tw
commands/doctor.md · 35 lines

How it starts

The opening of the file, as written. The whole thing — 35 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diagnose the WhatsApp MCP setup. Read-only — never restart services, rewrite config, or delete files. Report findings as a checklist, not prose.

1. Enumerate configured accounts

Read ~/.claude.json, list every mcpServers key starting with whatsapp. For each, extract command, args (the --directory value), and env (WHATSAPP_API_BASE_URL, WHATSAPP_API_AUTH_TOKEN if present).

No whatsapp* keys found → report "No WhatsApp MCP server configured — run /whats:setup" and stop here.

2. Per-account checks

For each configured server, in order:

a. Install dir exists and has a compiled bridge Check <--directory>/../whatsapp-bridge/whatsapp-bridge (or the equivalent path from WHATSAPP_API_BASE_URL's install layout) exists and is executable. Missing → "bridge never built, run install.sh".

b. Bridge process reachable curl -s -o /dev/null -w "%{http_code}" <WHATSAPP_API_BASE_URL>/qr (or /chats with a POST body {} if auth is required — see below). Connection refused/timeout → bridge not running or wrong port. Distinguish these two: pgrep -fa whatsapp-bridge tells you if a process exists at all locally; if it does but the port doesn't answer, that's the silent-bind-failure pattern (bridge started before its network interface was ready) — check ss -tln | grep <port> and the bridge's own log (bridge.log in its install dir) for bind: cannot assign requested address.

c. Auth, if configured If WHATSAPP_API_AUTH_TOKEN is set in this server's env, POST to <base>/chats with {"limit":1} and that bearer token. 401 → token doesn't match the bridge's API_AUTH_TOKEN. 200 → auth OK, continue.

d. Session paired If (b) succeeded, POST <base>/chats {"limit":1}. Empty result with no error could mean "genuinely no chats yet" or "never paired" — check the bridge log for Connected to WhatsApp vs a QR-waiting state to disambiguate. Never paired → tell the user to open <base-without-/api>/qr.

e. Identity sanity If (d) returned a chat, note the chat name/JID in the report. This is the cross-check for the most dangerous failure mode in this project's history: two account configs silently pointing at the same bridge/port, so both MCP servers return identical data. If you're checking 2+ accounts, compare their (d) results — same JID/chat name across two different server names is a real bug, flag it as CRITICAL, not a warning.

Read the full file on GitHub · 35 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 35 lines · 21 tokens per session scan A 7e87370dd395

Subscribe to this mod's changes

doctor is a command published in the GitHub repository rodrigopg/whatsapp-mcp (2 stars, last pushed 14d ago), licensed MIT. It adds 21 tokens to every session and 709 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.