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
- Infobip account (opens in a new tab). If you do not have one, create a free trial account (opens in a new tab).
- Infobip API key with the
whatsapp:message:send
scope. Find out more about API keys and scopes. - An AI client (e.g., Claude Desktop) with the Infobip WhatsApp MCP server. For integration details, see the MCP integration guide.
- 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). - 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.
{
"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 -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.
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.
{
`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`
}
{
"bulkId": "17528356386858989599978",
"messages": [
{
"messageId": "17528356386858989599979",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "447415774332"
}
]
}
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.
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.
