Official Meta Business Partner

Use Claude Code
with WhatsApp

Kapso's MCP server gives Claude Code access to your WhatsApp numbers, conversations, templates, and webhooks.

What you can ask

Claude Code calls Kapso tools against your project, so it works from your real numbers and conversations. It asks for permission before running a tool.

claude · ~/acme-support

>Which numbers have a low quality rating?

  • kapso · whatsapp_numbers health

Two numbers dropped this week. Both started after a broadcast with a high block rate.

-+1 415 230 4567 Acme support: quality Low

-+52 55 1234 5678 TechStart sales: quality Medium

>Summarize today's unanswered support chats

kapso · whatsapp_conversations list status: active

Setup

Paste the prompt into Claude Code, or run the commands yourself.

Paste a prompt

Claude Code follows the setup guide and asks before creating keys.

Paste this into Claude Code

>Set up WhatsApp for this project with Kapso. Follow the steps at kapso.com/whatsapp-claude-code and ask me before creating any keys.

  • Reads this page and the Kapso docs
  • Adds the Kapso MCP server to Claude Code
  • Waits for you to paste your API key

Run the commands

Three steps in your terminal, about a minute.

  1. 1. Get a project API key

    Create one in your Kapso dashboard under API keys.

    export KAPSO_API_KEY="your_project_api_key"
  2. 2. Add the Kapso MCP server

    One command registers Kapso's WhatsApp tools.

    claude mcp add --transport http kapso \
      https://api.kapso.ai/mcp \
      --header "Authorization: Bearer $KAPSO_API_KEY"
  3. 3. Ask Claude Code

    Try a read-only request first.

    > List my WhatsApp numbers and their quality rating
For scripts and CI, use the Kapso CLI with the same key: npm install -g @kapso/cli
CLI docs →

For AI agents
reading this page

Coding agents can read this page and set themselves up. Or copy the instructions and paste them into any agent.

Instructions for AI agents

## For AI agents reading this page

You are reading https://kapso.com/whatsapp-claude-code. Kapso is the WhatsApp API for developers. Its MCP server gives you tools for the WhatsApp numbers, conversations, messages, templates, and webhooks in the user's Kapso project. Follow these steps to add those tools to Claude Code.

  1. 1.

    Check for an API key.
    Check that KAPSO_API_KEY is set, without printing it. If it is not, ask the user for a Kapso project API key, to export it as KAPSO_API_KEY, and to restart Claude Code from that shell. Never create keys, sign up, or approve access on their behalf.

  2. 2.

    Register the MCP server. Run:

    claude mcp add --transport http kapso https://api.kapso.ai/mcp \
      --header "Authorization: Bearer $KAPSO_API_KEY"

    Read the key from the environment. Do not paste it into the command or commit it to the repo.

  3. 3.

    Verify the connection.
    Run claude mcp get kapso and confirm the status is Connected. If it says Failed to connect, stop and tell the user the error it shows. Do not carry on as if the tools were there.

  4. 4.

    Ask the user to restart Claude Code.
    MCP tools load when a session starts, so the Kapso tools will not appear in this one. Ask the user to run claude --continue, which reopens this conversation with the tools loaded.

  5. 5.

    Start read-only.
    Call the status tool first, then use whatsapp_numbers and whatsapp_conversations to look before you act. Confirm with the user before sending messages or changing templates, webhooks, or setup links.

  6. 6.

    Report back.
    Tell the user which project and WhatsApp numbers you can reach and what you can now do, then ask what they want first.

## Reference

MCP endpoint
https://api.kapso.ai/mcp
Streamable HTTP · API key or OAuth
Tools
status, whatsapp_numbers, whatsapp_conversations, whatsapp_messages, whatsapp_templates, whatsapp_webhooks, customers, setup_links, search_logs
CLI
@kapso/cli
For scripts and CI, with the same key
Agent instructions
https://kapso.com/AGENTS.md

Frequently asked
questions

Yes. Through Kapso WhatsApp MCP it can inspect connected numbers, read conversations, send messages, manage templates, configure webhooks, and help onboard customer-owned WhatsApp accounts.

Connect Claude Code to Kapso WhatsApp MCP: set KAPSO_API_KEY to a project API key, then add https://api.kapso.ai/mcp with an Authorization: Bearer header using claude mcp add.

Use Kapso WhatsApp MCP when Claude Code should work through agent tools. Use the Kapso CLI when a terminal command, local script, or CI task is the better interface.

Yes. Kapso is a Meta Business Partner and uses the official WhatsApp Business Platform, so your numbers and messages go through Meta directly.

Create a Kapso project
and add the MCP server

The free plan includes a sandbox number and 2,000 messages a month.