mcpField
W
whapi

whapi

github.com/whapi-cloudDevelopment3170 installsUpdated 30w ago
Repository

About whapi

A practical guide for AI agents building WhatsApp integrations with WHAPI.cloud, covering rules for messaging, groups, channels, communities, and webhooks. It also directs agents to check whapi-mcp status and treat its tool schema and the API reference as authoritative.

Key features

  1. 01Guidance across seven API rule categories
  2. 02MCP setup and connection-status checks
  3. 03Messaging and webhook instructions
  4. 04Group, channel, and community management
  5. 05Rules against inventing parameters

Use cases

  1. 01Configure WHAPI MCP in Cursor or Claude Desktop
  2. 02Build WhatsApp messaging or broadcast systems
  3. 03Set up webhook-based message reception
  4. 04Troubleshoot unexpected WHAPI API behavior

MCP support

The skill requires checking whapi-mcp before starting and handling connection, pairing, or authentication issues based on its status. whapi-mcp exposes API methods; the skill supplies usage guidance and parameter-validation rules.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/whapi-cloud/whapi-whatsapp-api-skill --skill whapi

After installing, type/whapiin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
CLAUDE.md
README.md
references/
_contributing.md
_sections.md
_template.md
channels-management.md
communities-management.md
core-auth.md
core-chat-id.md
core-mcp-setup.md
groups-management.md
msg-interactive.md
msg-media.md
msg-text.md
msg-type-selection.md
pattern-bot.md
pattern-broadcast.md
recv-history.md
recv-webhooks.md

Details

From the project README

WHAPI.cloud WhatsApp API — Agent Skill

Practical guide for AI agents building WhatsApp integrations via WHAPI.cloud. Contains rules across 7 categories, prioritized to prevent the most frequent mistakes and cover the most-used API features.

Prerequisites — MCP Setup Check

Before starting any task, verify that the whapi-mcp MCP server is available:

  1. Attempt to call the checkHealth tool.
  2. If it responds successfully — proceed.
  3. If the tool is not found — the MCP server is not installed. Guide the user through installation: references/core-mcp-setup.md.
  4. If the tool returns 404 ("Channel not found") — the token is invalid or the channel does not exist. Guide the user: references/core-mcp-setup.md section "Token is Missing or Invalid".
  5. If the tool responds, check status.text in the response:
status.textMeaningAction
AUTHConnected and operationalProceed
QRWaiting for QR code scanOpen the channel dashboard and scan the QR code to pair
INITServer initializationWait 40-50 seconds; if persists, contact WHAPI support
LAUNCHConnecting to WhatsApp accountWait a few seconds; if persists, contact WHAPI support
STOPChannel deactivatedCheck subscription status at panel.whapi.cloud/dashboard
SYNC_ERRORSync failureLog out the channel and reconnect it; GET requests will fail until resolved

For QR pairing: references/core-mcp-setup.md section "Where to Get Your API Token".

When to Apply

Reference these guidelines when:

  • Setting up the WHAPI MCP in Cursor, Claude Desktop, or any MCP-compatible client
  • Sending messages (text, media, interactive, polls)
  • Receiving incoming messages via webhooks
  • Managing groups, channels (newsletters), or communities
  • Building bots, broadcast systems, or CRM integrations
  • Troubleshooting unexpected API behavior

API Coverage and MCP Fallback

This skill covers the most-used operations and prevents the most common mistakes. It does NOT document every WHAPI endpoint.

If the operation you need is not described in any reference file:

  1. Check available MCP tools — whapi-mcp exposes all API methods directly.
  2. Apply core-chat-id.md rules for Chat ID format regardless of the endpoint.
  3. Apply core-auth.md rules for authentication regardless of the endpoint.
  4. Use ONLY parameter names from the MCP tool schema — do NOT invent parameters.
  5. Validate against the WHAPI API Reference if unsure.

The MCP is the source of truth for available methods. The skill is the source of truth for correct usage patterns and anti-hallucination rules.

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Core ConceptsCRITICALcore-
2MessagingCRITICALmsg-
3ReceivingCRITICALrecv-
4GroupsHIGHgroups-
5ChannelsHIGHchannels-
6CommunitiesMEDIUMcommunities-
7PatternsHIGHpattern-

How to Use

Read individual reference files for detailed explanations and code examples:

1. references/core-mcp-setup.md      ← install and configure the MCP first
2. references/core-chat-id.md        ← understand Chat ID formats (most common error)
3. references/core-auth.md           ← authenticate direct REST calls
4. references/msg-type-selection.md  ← choose the right send tool
5. references/recv-webhooks.md       ← set up receiving messages

Each reference file contains:

  • Why this matters (1-2 sentences)
  • Incorrect example with explanation
  • Correct example with explanation
  • Anti-hallucination checklist (parameters that do NOT exist)
  • WHAPI-specific notes

References

Comments

Markdown supported