Tutorials
Send a WhatsApp message with an Infobip MCP server and an AI client
Send WhatsApp using an Infobip MCP server and an AI client

Send WhatsApp using an Infobip MCP server and an AI client

This tutorial will teach you how to prompt an AI client to send a WhatsApp message. In this example, we use Claude Desktop but you can use any AI client that supports MCP integrations.

Prerequisites

  1. Infobip account (opens in a new tab). If you do not have one, create a free trial account (opens in a new tab).
  2. Infobip API key with the whatsapp:message:send scope. Find out more about API keys and scopes.
  3. An AI client (e.g., Claude Desktop) with the Infobip WhatsApp MCP server. For integration details, see the MCP integration guide.
  4. Sender. If in a free trial, use the Infobip test sender 447860099299 and activate it (opens in a new tab). If you want to configure a custom sender, request a new number or an alphanumeric sender through the Infobip account (opens in a new tab) or use the Infobip Numbers API (opens in a new tab).
  5. Destination - a phone number to which the message will be sent. If in a free trial, you can only send messages to a verified phone number.

Integrate the Infobip WhatsApp MCP server with your AI client

Navigate to your AI client's MCP settings and add the Infobip WhatsApp MCP server.

json
{
  "mcpServers": {
    "ib-whatsapp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.infobip.com/whatsapp",
        "--header",
        "Authorization: App ${INFOBIP_API_KEY}"
      ],
      "env": {
        "INFOBIP_API_KEY": "<Your Infobip API Key here>"
      }
    }
  }
}

Restart your AI client and you should see the Infobip WhatsApp MCP server on the list of available tools. For more integration details, see the MCP integration guide.

Send a WhatsApp message

In your AI client, write a prompt to send a WhatsApp message.

Key points about the prompt:

  • Specify the sender and destination(s).
  • Specify additional features you wish to include. Ask AI to show you available features or call the MCP server directly.
cURL
curl -X POST "https://mcp.infobip.com/whatsapp" \
  -H 'Authorization: App e08545ef7f5ffa50a4470da8388776e1-1391ec96-f7c1-43f9-8304-96880ab047d4' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "id": 1
  }'
  • Describe your use case so that the AI can craft an adequate message.
  • Include limitations (e.g., one message, specific delivery window) and personalized details (e.g., specific URL, image, etc.); otherwise, the AI will use made-up details to fill in the gaps.
AI prompt example
Create a WhatsApp message that advertises Shift Conference ticket options.
* Use this site for reference: https://shift.infobip.com/.
* Use this sender number 447860088970.
* Send to this number 447415774332.
* Include a brief conference description and a link to the conference website.
* use this image: https://shift.infobip.com/Infobip-Shift.jpg

The AI will choose an endpoint and create a request based on your specifications. Review and change it if need be. Once approved, the AI will send the message.

In this example, since the prompt specified an image, the AI chose an endpoint that allows for sending images over WhatsApp.

Send WhatsApp image message endpoint
{
  `to`: `447415774332`,
  `from`: `447860088970`,
  `content`: {
    `caption`: `πŸš€ SHIFT CONFERENCE 2025 - WHERE CODE MEETS COAST!
 
Join 5000+ developers at Southeastern Europe's largest tech event in stunning Zadar, Croatia! πŸ‡¦πŸ‡·
 
πŸ“… September 14-16, 2025
πŸ“ KreΕ‘imir Δ†osiΔ‡ Hall, Zadar
 
✨ What's waiting for you:
β€’ 80+ world-class speakers & tech leaders
β€’ Interactive workshops & hands-on coding sessions  
β€’ Networking with global developer community
β€’ Epic afterparties by the Mediterranean Sea
β€’ Cutting-edge talks on AI, cloud, mobile & more
 
🎟️ TICKET OPTIONS:
β€’ Early Bird Special (Limited time - best price!)
β€’ Regular Conference Pass
β€’ VIP Experience with exclusive access
β€’ Student discounts available
β€’ Workshop-only passes
 
🌐 Get tickets & full info: https://shift.infobip.com/
 
#ShiftConf2025 #Developers #Croatia #TechConference`,
    `mediaUrl`: `https://shift.infobip.com/Infobip-Shift.jpg`
  },
  `notifyUrl`: `https://webhook.site/shift-image-ad-delivery`,
  `callbackData`: `shift_conference_image_ad_2025`
}

Report status

Once the AI sends the message, it will return a summary of what it did and if prompted will retrieve a delivery report, if available.

AI summary
Summary
βœ… Shift Conference advertising message sent successfully!
πŸ“Έ Image Message Details:
Image:

πŸ–ΌοΈ URL: https://shift.infobip.com/Infobip-Shift.jpg
πŸ“± Type: Visual advertisement with conference branding

Caption Content:

πŸš€ Headline: "SHIFT CONFERENCE 2025 - WHERE CODE MEETS COAST!"
πŸ‘₯ Scale: 5000+ developers at Southeastern Europe's largest tech event
πŸ‡­πŸ‡· Location: Stunning Zadar, Croatia
πŸ“… Dates: September 14-16, 2025
πŸ“ Venue: KreΕ‘imir Δ†osiΔ‡ Hall, Zadar

Conference Highlights:

✨ 80+ world-class speakers & tech leaders
πŸ’» Interactive workshops & hands-on coding sessions
🀝 Networking with global developer community
πŸŽ‰ Epic afterparties by the Mediterranean Sea
πŸ”¬ Cutting-edge talks on AI, cloud, mobile & more

Ticket Options Advertised:

🎟️ Early Bird Special (Limited time - best price!)
🎫 Regular Conference Pass
πŸ‘‘ VIP Experience with exclusive access
πŸŽ“ Student discounts available
πŸ”§ Workshop-only passes

Call-to-Action:

🌐 Website: https://shift.infobip.com/
πŸ“± Hashtags: #ShiftConf2025 #Developers #Croatia #TechConference

πŸ“Š Message Status:

βœ… Message ID: df78f3a4-f6a6-4110-b633-26ef4cb19bc2
βœ… Status: PENDING_ENROUTE (being delivered)
βœ… Callback Data: shift_conference_image_ad_2025
βœ… Delivery Tracking: Configured

The message combines an eye-catching visual with comprehensive conference information and clear ticket options, making it an effective advertisement for the Shift Conference!

And that's it! You have successfully sent a WhatsApp message using AI and an Infobip MCP server.

WhatsApp message sent with Infobip WhatsApp MCP server

Useful links

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary
Service status

Copyright @ 2006-2025 Infobip ltd.

Service Terms & ConditionsPrivacy policyTerms of use