How to integrate Whatsapp MCP with LlamaIndex

Connect LlamaIndex to Whatsapp MCP. Send contact card to new lead, get business profile details for support, and more using natural language, with authentication handled for you.

Whatsapp logoWhatsapp
Oauth2Api Key

WhatsApp is a business messaging platform for secure, automated customer communication. It streamlines chat workflows and customer outreach using the WhatsApp Business API.

127 Tools1 Triggers

Introduction

This guide walks you through connecting Whatsapp to LlamaIndex using the Composio tool router. By the end, you'll have a working Whatsapp agent that can send messages and media, manage message templates, build WhatsApp Flows, update your business profile, and create QR codes through natural language commands.

This guide will help you understand how to give your LlamaIndex agent real control over a Whatsapp account through Composio's Whatsapp MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate Whatsapp with

TL;DR

Here's what you'll learn:
  • Set your OpenAI and Composio API keys
  • Install LlamaIndex and Composio packages
  • Create a Composio Tool Router session for Whatsapp
  • Connect LlamaIndex to the Whatsapp MCP server
  • Build a Whatsapp-powered agent using LlamaIndex
  • Interact with Whatsapp through natural language

What is LlamaIndex?

LlamaIndex is a data framework for building LLM applications. It provides tools for connecting LLMs to external data sources and services through agents and tools.

Key features include:

  • ReAct Agent: Reasoning and acting pattern for tool-using agents
  • MCP Tools: Native support for Model Context Protocol
  • Context Management: Maintain conversation context across interactions
  • Async Support: Built for async/await patterns

What is the Whatsapp MCP server, and what's possible with it?

The WhatsApp MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your WhatsApp account. It provides structured and secure access to your WhatsApp Business account settings, profiles, templates, flows, and phone configuration, so your agent can manage business details, register phone numbers, maintain templates, update flows, and review account settings on your behalf.

  • Business profile management: Have your agent update your business description, contact information, and other WhatsApp Business profile settings.
  • Phone number administration: Direct your agent to register or deregister a WhatsApp Business phone number and set its two-step verification PIN.
  • Message template management: Let the agent browse the template library and create or update templates for your WhatsApp Business account.
  • Flow and commerce configuration: Instruct your agent to review Flow assets, update Flow configurations, and check commerce settings for your business phone number.
  • Account oversight and access: Have your agent review owned or shared business accounts, inspect compliance and encryption details, manage assigned user access, and subscribe your application to account notifications.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Step by step10 STEPS
1

Prerequisites

Before you begin, make sure you have:
  • Python 3.8/Node 16 or higher installed
  • A Composio account with the API key
  • An OpenAI API key
  • A Whatsapp account and project
  • Basic familiarity with async Python/Typescript
2

Getting API Keys for OpenAI, Composio, and Whatsapp

OpenAI API key (OPENAI_API_KEY)
  • Go to the OpenAI dashboard
  • Create an API key if you don't have one
  • Assign it to OPENAI_API_KEY in .env
Composio API key and user ID
  • Log into the Composio dashboard
  • Copy your API key from Settings
    • Use this as COMPOSIO_API_KEY
  • Pick a stable user identifier (email or ID)
    • Use this as COMPOSIO_USER_ID
3

Installing dependencies

npm install @composio/llamaindex @llamaindex/openai @llamaindex/tools @llamaindex/workflow dotenv

Create a new Typescript project and install the necessary dependencies:

  • @composio/llamaindex: Composio's LlamaIndex integration
  • @llamaindex/openai: OpenAI LLM integration
  • @llamaindex/tools: MCP client for LlamaIndex
  • @llamaindex/workflow: Workflow framework for LlamaIndex
  • dotenv: Environment variable management
4

Set environment variables

bash
OPENAI_API_KEY=your-openai-api-key
COMPOSIO_API_KEY=your-composio-api-key
COMPOSIO_USER_ID=your-user-id

Create a .env file in your project root:

These credentials will be used to:

  • Authenticate with OpenAI's GPT-5 model
  • Connect to Composio's Tool Router
  • Identify your Composio user session for Whatsapp access
5

Import modules

import "dotenv/config";
import readline from "node:readline/promises";
import { stdin as input, stdout as output } from "node:process";

import { Composio } from "@composio/core";

import { mcp } from "@llamaindex/tools";
import { agent as createAgent } from "@llamaindex/workflow";
import { openai } from "@llamaindex/openai";

dotenv.config();

Create a new file called whatsapp_llamaindex_agent.ts and import the required modules:

Key imports:

  • dotenv.config loads .env at runtime
  • readline gives us a simple CLI chat loop
  • Composio is the main Composio SDK client
  • mcp connects to an MCP endpoint
  • createAgent builds a LlamaIndex agent
  • openai configures the LLM backend
6

Load environment variables and initialize Composio

const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
const COMPOSIO_API_KEY = process.env.COMPOSIO_API_KEY;
const COMPOSIO_USER_ID = process.env.COMPOSIO_USER_ID;

if (!OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!COMPOSIO_API_KEY) throw new Error("COMPOSIO_API_KEY is not set");
if (!COMPOSIO_USER_ID) throw new Error("COMPOSIO_USER_ID is not set");

What's happening:

This ensures missing credentials cause early, clear errors before the agent attempts to initialise.

7

Create a Tool Router session and build the agent function

async function buildAgent() {

  console.log(`Initializing Composio client...${COMPOSIO_USER_ID!}...`);
  console.log(`COMPOSIO_USER_ID: ${COMPOSIO_USER_ID!}...`);

  const composio = new Composio({
    apiKey: COMPOSIO_API_KEY,
    provider: new LlamaindexProvider(),
  });

  const session = await composio.create(
    COMPOSIO_USER_ID!,
    {
      toolkits: ["whatsapp"],
    },
  );

  const mcpUrl = session.mcp.url;
  console.log(`Composio Tool Router MCP URL: ${mcpUrl}`);

  const server = mcp({
    url: mcpUrl,
    clientName: "composio_tool_router_with_llamaindex",
    requestInit: {
      headers: {
        "x-api-key": COMPOSIO_API_KEY!,
      },
    },
    // verbose: true,
  });

  const tools = await server.tools();

  const llm = openai({ apiKey: OPENAI_API_KEY, model: "gpt-5" });

  const agent = createAgent({
    name: "composio_tool_router_with_llamaindex",
        description : "An agent that uses Composio Tool Router MCP tools to perform actions.",
    systemPrompt:
      "You are a helpful assistant connected to Composio Tool Router."+
"Use the available tools to answer user queries and perform Whatsapp actions." ,
    llm,
    tools,
  });

  return agent;
}

What's happening here:

  • We create a Composio client using your API key and configure it with the LlamaIndex provider
  • We then create a tool router MCP session for your user, specifying the toolkits we want to use (in this case, whatsapp)
  • The session returns an MCP HTTP endpoint URL that acts as a gateway to all your configured tools
  • LlamaIndex will connect to this endpoint to dynamically discover and use the available Whatsapp tools.
  • The MCP tools are mapped to LlamaIndex-compatible tools and plug them into the Agent.
8

Create an interactive chat loop

async function chatLoop(agent: ReturnType<typeof createAgent>) {
  const rl = readline.createInterface({ input, output });

  console.log("Type 'quit' or 'exit' to stop.");

  while (true) {
    let userInput: string;

    try {
      userInput = (await rl.question("\nYou: ")).trim();
    } catch {
      console.log("\nAgent: Bye!");
      break;
    }

    if (!userInput) {
      continue;
    }

    const lower = userInput.toLowerCase();
    if (lower === "quit" || lower === "exit") {
      console.log("Agent: Bye!");
      break;
    }

    try {
      process.stdout.write("Agent: ");

      const stream = agent.runStream(userInput);
      let finalResult: any = null;

      for await (const event of stream) {
        // The event.data contains the streamed content
        const data: any = event.data;

        // Check for streaming delta content
        if (data?.delta) {
          process.stdout.write(data.delta);
        }

        // Store final result for fallback
        if (data?.result || data?.message) {
          finalResult = data;
        }
      }

      // If no streaming happened, show the final result
      if (finalResult) {
        const answer =
          finalResult.result ??
          finalResult.message?.content ??
          finalResult.message ??
          "";
        if (answer && typeof answer === "string" && !answer.includes("[object")) {
          process.stdout.write(answer);
        }
      }

      console.log(); // New line after streaming completes
    } catch (err: any) {
      console.error("\nAgent error:", err?.message ?? err);
    }
  }

  rl.close();
}

What's happening:

  • We're creating a direct terminal interface to chat with Whatsapp
  • The LLM's responses are streamed to the CLI for faster interaction.
  • The agent uses context to maintain conversation history
  • The agent processes the request, selects appropriate Whatsapp tools, and returns a result
  • We extract the answer from the result data structure and display it to the user
  • You can type 'quit' or 'exit' to stop the chat loop gracefully
  • Agent responses and any errors are streamed in a clear, readable format
9

Define the main entry point

async function main() {
  try {
    const agent = await buildAgent();
    await chatLoop(agent);
  } catch (err) {
    console.error("Failed to start agent:", err);
    process.exit(1);
  }
}

main();

What's happening here:

  • We're orchestrating the entire application flow
  • The agent gets built with proper error handling
  • Then we kick off the interactive chat loop so you can start talking to Whatsapp
10

Run the agent

npx ts-node llamaindex-agent.ts

When prompted, authenticate and authorise your agent with Whatsapp, then start asking questions.

Complete Code

Here's the complete code to get you started with Whatsapp and LlamaIndex:

import "dotenv/config";
import readline from "node:readline/promises";
import { stdin as input, stdout as output } from "node:process";

import { Composio } from "@composio/core";
import { LlamaindexProvider } from "@composio/llamaindex";

import { mcp } from "@llamaindex/tools";
import { agent as createAgent } from "@llamaindex/workflow";
import { openai } from "@llamaindex/openai";

dotenv.config();

const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
const COMPOSIO_API_KEY = process.env.COMPOSIO_API_KEY;
const COMPOSIO_USER_ID = process.env.COMPOSIO_USER_ID;

if (!OPENAI_API_KEY) {
    throw new Error("OPENAI_API_KEY is not set in the environment");
  }
if (!COMPOSIO_API_KEY) {
    throw new Error("COMPOSIO_API_KEY is not set in the environment");
  }
if (!COMPOSIO_USER_ID) {
    throw new Error("COMPOSIO_USER_ID is not set in the environment");
  }

async function buildAgent() {

  console.log(`Initializing Composio client...${COMPOSIO_USER_ID!}...`);
  console.log(`COMPOSIO_USER_ID: ${COMPOSIO_USER_ID!}...`);

  const composio = new Composio({
    apiKey: COMPOSIO_API_KEY,
    provider: new LlamaindexProvider(),
  });

  const session = await composio.create(
    COMPOSIO_USER_ID!,
    {
      toolkits: ["whatsapp"],
    },
  );

  const mcpUrl = session.mcp.url;
  console.log(`Composio Tool Router MCP URL: ${mcpUrl}`);

  const server = mcp({
    url: mcpUrl,
    clientName: "composio_tool_router_with_llamaindex",
    requestInit: {
      headers: {
        "x-api-key": COMPOSIO_API_KEY!,
      },
    },
    // verbose: true,
  });

  const tools = await server.tools();

  const llm = openai({ apiKey: OPENAI_API_KEY, model: "gpt-5" });

  const agent = createAgent({
    name: "composio_tool_router_with_llamaindex",
    description:
      "An agent that uses Composio Tool Router MCP tools to perform actions.",
    systemPrompt:
      "You are a helpful assistant connected to Composio Tool Router."+
"Use the available tools to answer user queries and perform Whatsapp actions." ,
    llm,
    tools,
  });

  return agent;
}

async function chatLoop(agent: ReturnType<typeof createAgent>) {
  const rl = readline.createInterface({ input, output });

  console.log("Type 'quit' or 'exit' to stop.");

  while (true) {
    let userInput: string;

    try {
      userInput = (await rl.question("\nYou: ")).trim();
    } catch {
      console.log("\nAgent: Bye!");
      break;
    }

    if (!userInput) {
      continue;
    }

    const lower = userInput.toLowerCase();
    if (lower === "quit" || lower === "exit") {
      console.log("Agent: Bye!");
      break;
    }

    try {
      process.stdout.write("Agent: ");

      const stream = agent.runStream(userInput);
      let finalResult: any = null;

      for await (const event of stream) {
        // The event.data contains the streamed content
        const data: any = event.data;

        // Check for streaming delta content
        if (data?.delta) {
          process.stdout.write(data.delta);
        }

        // Store final result for fallback
        if (data?.result || data?.message) {
          finalResult = data;
        }
      }

      // If no streaming happened, show the final result
      if (finalResult) {
        const answer =
          finalResult.result ??
          finalResult.message?.content ??
          finalResult.message ??
          "";
        if (answer && typeof answer === "string" && !answer.includes("[object")) {
          process.stdout.write(answer);
        }
      }

      console.log(); // New line after streaming completes
    } catch (err: any) {
      console.error("\nAgent error:", err?.message ?? err);
    }
  }

  rl.close();
}

async function main() {
  try {
    const agent = await buildAgent();
    await chatLoop(agent);
  } catch (err: any) {
    console.error("Failed to start agent:", err?.message ?? err);
    process.exit(1);
  }
}

main();

Conclusion

You've successfully connected Whatsapp to LlamaIndex through Composio's Tool Router MCP layer. Key takeaways:
  • Tool Router dynamically exposes Whatsapp tools through an MCP endpoint
  • LlamaIndex's ReActAgent handles reasoning and orchestration; Composio handles integrations
  • The agent becomes more capable without increasing prompt size
  • Async Python provides clean, efficient execution of agent workflows
You can easily extend this to other toolkits like Gmail, Notion, Stripe, GitHub, and more by adding them to the toolkits parameter.
TOOLS & TRIGGERS

Supported Tools and Triggers

Every Whatsapp action and event your agent gets out of the box.

Accept business solution

Accept an invitation for the authenticated partner app to join a Multi-Partner Solution.

Accept solution deactivation

Accept a pending Multi-Partner Solution deactivation request.

Add business phone number

Add a preverified phone number to a partner-owned pool clients can purchase from.

Approve group join requests

Approve pending WhatsApp group join requests by their join request IDs.

Assign user

Assign a Facebook user or system user to a WhatsApp Business Account with specified tasks.

Block WhatsApp Users

Block one or more WhatsApp users to prevent them from sending messages to your business phone number.

Configure WhatsApp Conversational Automation

Configure conversational automation for a WhatsApp Business phone number, including welcome-message enablement, custom commands, and ice breaker prompts.

Create business account

Create a WhatsApp Business Account under a business portfolio.

Create business solution

Create a Multi-Partner Solution between an owner app and a partner app.

Create WhatsApp Flow

Create a WhatsApp Flow for the WhatsApp Business Account bound to the connection.

Create group

Submit creation of a WhatsApp group for a business phone number.

Create group invite link

Reset a WhatsApp group's invite link and return its replacement.

Create WhatsApp Max Price Agreement

Create a max price agreement for WhatsApp marketing messages pricing.

Create message template

Create a new message template for the WhatsApp Business Account.

Create obo mobility intent

Create an On-Behalf-Of mobility intent for an eligible WhatsApp Business Account.

Create phone number

Create a phone number registration within a WhatsApp Business Account.

Create QR Code

Create a new QR code with a prefilled message for a WhatsApp Business phone number.

Create schedule

Create a campaign schedule for the connection's WhatsApp Business Account.

Create upload session for WhatsApp

Create a resumable upload session for large file uploads to WhatsApp.

Delete flow

Delete a WhatsApp Flow that is in DRAFT status.

Delete group

Delete a WhatsApp group and remove all participants, including the business.

Delete group invite link

Delete an existing WhatsApp group invite link using the Groups invite link API.

Delete WhatsApp Media

Delete a WhatsApp media file previously uploaded via the Media API.

Delete message template

Delete a WhatsApp Business Account message template by name, permanently removing all language variants unless a template ID is supplied to target one variant.

Delete preverified number

Permanently delete a pre-verified phone number from the pre-verified list.

Delete QR Code

Delete a specific QR code from a WhatsApp Business phone number.

Deprecate flow

Irreversibly retire a published WhatsApp Flow by marking it DEPRECATED.

Deregister WhatsApp Business Phone Number

Deregister a WhatsApp Business phone number from the Cloud API.

Download media

Download a WhatsApp media asset using its short-lived media URL.

Edit message template

Edit an existing WhatsApp message template by ID.

Get account number

Retrieve a WhatsApp Account Number node's status and configuration.

Get WhatsApp Business Account Activities

Retrieve a paginated activity history for the WhatsApp Business Account bound to the connection, including administrative actions such as phone number verifications and user additions.

Get assigned business accounts

Retrieve one page of WhatsApp Business Accounts assigned to a specific Meta user.

Get assigned users

List users assigned to a WhatsApp Business Account in a business context.

Get WhatsApp Business Account Details

Retrieve configuration and status details for the WhatsApp Business Account bound to the connection, including account review status, business verification status, timezone, and ownership details.

Get business bot

Retrieve a WhatsApp Business Bot's prompts, commands and welcome-message setting.

Get WhatsApp Business Compliance Info

Retrieve comprehensive business compliance information for a WhatsApp Business phone number.

Get Business Encryption

Retrieve the WhatsApp Business public key and its signature verification status.

Get business portfolio

Retrieve a Meta business portfolio's ID, name and timezone identifier.

Get business profile

Get the business profile information for a WhatsApp Business phone number.

Get business profile node

Retrieve a WhatsApp Business Profile node by its profile ID.

Get call permissions

Check permission to call one WhatsApp user from a business phone number.

Get client WhatsApp Business Accounts

Retrieve WhatsApp Business Accounts shared with or managed by a business portfolio.

Get WhatsApp Commerce Settings

Get commerce settings for a WhatsApp Business phone number.

Get connected client businesses

Retrieve one page of client businesses connected to a Meta application.

Get extended credits

Retrieve one page of a Meta Business Portfolio's extended credit lines.

Get flow

Get one WhatsApp Flow's metadata, validation errors, preview, or health.

Get Flow Assets

List assets associated with a WhatsApp Flow.

Get group

Retrieve metadata about one WhatsApp group by its group ID.

Get Join Requests

Retrieve pending join requests for a WhatsApp group to help manage group membership.

Get max price agreements

Check the max price beta agreement status for a Meta business portfolio.

Get media info

Get metadata and download URL for uploaded WhatsApp media.

Get WhatsApp Message History

Retrieve message history for a WhatsApp Business phone number.

Get message history events

Retrieve one page of delivery status events for a Message History ID.

Get message templates

Get all message templates for the WhatsApp Business Account.

Get migration intent

Retrieve a WhatsApp Business Account migration intent's status and linked accounts.

Get official business account status

Retrieve Official Business Account (OBA) application status for a business phone number.

Get owned WhatsApp Business Accounts

Retrieve WhatsApp Business Accounts owned by a business portfolio.

Get phone number

Retrieve detailed information about a specific WhatsApp Business phone number.

Get phone numbers

Retrieve a page of phone numbers registered to the connection's WhatsApp Business Account.

Get preverified number

Retrieve a pre-verified phone number's verification status, owner, and expiry.

Get preverified number partners

List partner businesses with access to a pre-verified WhatsApp phone number.

Get qr code

Retrieve one message QR code by phone number ID and QR code identifier.

Get reach estimate

Estimate WhatsApp marketing message reach and costs at different max prices.

Get WhatsApp Schedules

Retrieve campaign schedules for the WhatsApp Business Account configured on the connection.

Get WhatsApp Cloud API Settings

Get Cloud API settings for a WhatsApp Business phone number.

Get solution access token

Retrieve an onboarded client's business integration system user access token.

Get Subscribed Apps

Get all applications currently subscribed to webhooks for a WhatsApp Business Account.

Get message template library

Browse the pre-built message template library for WhatsApp Business Account.

Get template status

Get the status and details of a specific message template.

Get upload offset

Get the byte offset of an interrupted resumable upload.

List blocked users

Retrieve one page of blocked users for a WhatsApp Business phone number.

List business accounts

List WhatsApp Business Accounts owned by a business portfolio.

List business solutions

List one page of Multi-Partner Solutions owned by or partnered with a Meta app.

List WhatsApp Flows

List all WhatsApp Flows associated with the WhatsApp Business Account.

List WhatsApp Groups

List all WhatsApp groups associated with a business phone number.

List on behalf requests

List one page of in-progress on-behalf requests for a WhatsApp Business Account.

List preverified numbers

List pre-verified phone numbers available to a business portfolio.

List qr codes

Get a list of all QR codes for a WhatsApp Business phone number.

List WhatsApp Solutions

Retrieve a paginated list of Multi-Partner Solutions for the WhatsApp Business Account configured on the connection, including status and owner application information when returned.

Manage call

Initiate, pre-accept, accept, reject or terminate a WhatsApp WebRTC call.

Migrate flows

Copy up to 100 Flows between WABAs owned by the same Meta business.

Onboard marketing partners

Send a partner-initiated MM Lite onboarding request to an end business.

Publish WhatsApp Flow

Publish a WhatsApp Flow to make it available for use.

Register WhatsApp Business Phone Number

Register a WhatsApp Business phone number for use with WhatsApp Cloud API.

Reject business solution

Reject a pending partnership or deactivation request for a Multi-Partner Solution.

Reject group join requests

Reject pending requests to join a WhatsApp group, individually or in bulk.

Reject solution deactivation

Reject a pending Multi-Partner Solution deactivation request.

Remove Assigned User from WhatsApp Business Account

Remove an assigned user's access from the WhatsApp Business Account bound to the connection.

Remove group participants

Request removal of one to eight WhatsApp group participants.

Request preverified number code

Request a verification code for a business-owned pre-verified phone number.

Request solution deactivation

Ask the partner to deactivate an owned WhatsApp Multi-Partner Solution.

Request verification code

Request an SMS or voice verification code for a WhatsApp Business phone number.

Send contacts

Send contacts WhatsApp number.

Send encrypted message

Send a caller-encrypted WhatsApp message and return the encrypted response.

Send interactive buttons

Send an interactive button message with up to 3 reply buttons to a WhatsApp user.

Send interactive list

Send an interactive list message to a WhatsApp number.

Send location

Send a location message with coordinates, name, and address to a WhatsApp user.

Send marketing message

Send an approved marketing template through the Marketing Messages API.

Send media

Send a media message to a WhatsApp number using a media URL.

Send media by

Send media using a media ID from previously uploaded media.

Send message

Send a text message to a WhatsApp user.

Send template message

Send a template message to a WhatsApp number.

Set business encryption

Set the RSA public key used to encrypt WhatsApp message payloads and data channel requests.

Set obo mobility intent

Set OBO mobility intent for a Multi-Partner Solution associated with a client WABA.

Set solution migration intent

Set migration intent for a Multi-Partner Solution associated with a WABA.

Set WhatsApp Two-Step Verification PIN

Set or reset the two-step verification PIN for a WhatsApp Business phone number.

Share preverified numbers

Share a number from a business's pre-verified phone number pool with a partner.

Subscribe to WABA Webhooks

Subscribe your application to webhook notifications for the WhatsApp Business Account configured on the connection, using the configured app webhook settings.

Unblock WhatsApp Users

Unblock WhatsApp users so they can contact the business phone number again.

Unsubscribe from WABA Webhooks

Unsubscribe your application from webhook events for the connection-bound WhatsApp Business Account, for example when cleaning up an integration.

Update WhatsApp Flow Metadata

Update metadata for a WhatsApp Flow including its name, categories, and endpoint URI.

Update business account settings

Update a WhatsApp Business Account's name or timezone identifier.

Update business compliance info

Create or update regulatory compliance information for a WhatsApp Business phone number.

Update WhatsApp Business Profile

Update WhatsApp Business Profile information including business details, contact information, and profile settings.

Update business profile node

Update a WhatsApp Business Profile directly by its profile node ID.

Update WhatsApp commerce settings

Set or update commerce settings for a WhatsApp Business phone number.

Update Flow JSON

Update the Flow JSON configuration for an existing WhatsApp Flow by uploading a file or inline JSON.

Update group

Update an existing WhatsApp group's subject, description, or photo.

Update official business account status

Submit OBA application information or update application data for a phone number.

Update WhatsApp Cloud API Settings

Update Cloud API settings for a WhatsApp Business phone number.

Upload file chunk

Upload raw file bytes to a resumable upload session and return its file handle.

Upload media

Upload media files (images, videos, audio, documents, stickers) to WhatsApp servers.

Upsert message template

Create or update a message template for the WhatsApp Business Account.

Verify Phone Number OTP Code

Verify the OTP code for a pre-verified phone number.

Verify preverified number code

Verify an OTP for a pre-verified phone number to complete verification.

Who Am I

Return the identity (name) of the connected WhatsApp (Meta) account.

FAQ

Frequently asked questions

With a standalone Whatsapp MCP server, the agents and LLMs can only access a fixed set of Whatsapp tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Whatsapp and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. LlamaIndex fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Whatsapp tools.

Yes, absolutely. You can configure which Whatsapp scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Whatsapp data and credentials are handled as safely as possible.

Start with Whatsapp.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Whatsapp tool your agent needs.Free to start.

Start building