CTRLK

Send WhatsApp using an Infobip MCP server and an AI client

|

View as Markdown

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. If you do not have one, create a free trial account.
  2. If using API key authorization, an Infobip API key with the whatsapp:message:send scope. Find out more about API keys and scopes. Skip this step for OAuth.
  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. If you want to configure a custom sender, request a new number or an alphanumeric sender through the Infobip account or use the Infobip Numbers API.
  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.

REQUEST SAMPLES
json
1{
2 "mcpServers": {
3 "infobip-whatsapp": {
4 "command": "npx",
5 "args": [
6 "mcp-remote",
7 "https://mcp.infobip.com/whatsapp",
8 "--header",
9 "Authorization: App ${INFOBIP_API_KEY}"
10 ],
11 "env": {
12 "INFOBIP_API_KEY": "<Your Infobip API Key here>"
13 }
14 }
15 }
16}

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
1curl -X POST "https://mcp.infobip.com/whatsapp" \
2 -H 'Authorization: App e08545ef7f5ffa50a4470da8388776e1-1391ec96-f7c1-43f9-8304-96880ab047d4' \
3 -H 'Content-Type: application/json' \
4 -H 'Accept: application/json, text/event-stream' \
5 -d '{
6 "jsonrpc": "2.0",
7 "method": "tools/list",
8 "id": 1
9 }'
  • 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
1Create a WhatsApp message that advertises Shift Conference ticket options.
2* Use this site for reference: https://shift.infobip.com/.
3* Use this sender number 447860088970.
4* Send to this number 447415774332.
5* Include a brief conference description and a link to the conference website.
6* 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
bash
1{
2 `to`: `447415774332`,
3 `from`: `447860088970`,
4 `content`: {
5 `caption`: `πŸš€ SHIFT CONFERENCE 2025 - WHERE CODE MEETS COAST!
6 
7Join 5000+ developers at Southeastern Europe's largest tech event in stunning Zadar, Croatia! πŸ‡¦πŸ‡·
8 
9πŸ“… September 14-16, 2025
10πŸ“ KreΕ‘imir Δ†osiΔ‡ Hall, Zadar
11 
12✨ What's waiting for you:
13β€’ 80+ world-class speakers & tech leaders
14β€’ Interactive workshops & hands-on coding sessions
15β€’ Networking with global developer community
16β€’ Epic afterparties by the Mediterranean Sea
17β€’ Cutting-edge talks on AI, cloud, mobile & more
18 
19🎟️ TICKET OPTIONS:
20β€’ Early Bird Special (Limited time - best price!)
21β€’ Regular Conference Pass
22β€’ VIP Experience with exclusive access
23β€’ Student discounts available
24β€’ Workshop-only passes
25 
26🌐 Get tickets & full info: https://shift.infobip.com/
27 
28#ShiftConf2025 #Developers #Croatia #TechConference`,
29 `mediaUrl`: `https://shift.infobip.com/Infobip-Shift.jpg`
30 },
31 `notifyUrl`: `https://webhook.site/shift-image-ad-delivery`,
32 `callbackData`: `shift_conference_image_ad_2025`
33}

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
1Summary
2βœ… Shift Conference advertising message sent successfully!
3πŸ“Έ Image Message Details:
4Image:
5 
6πŸ–ΌοΈ URL: https://shift.infobip.com/Infobip-Shift.jpg
7πŸ“± Type: Visual advertisement with conference branding
8 
9Caption Content:
10 
11πŸš€ Headline: "SHIFT CONFERENCE 2025 - WHERE CODE MEETS COAST!"
12πŸ‘₯ Scale: 5000+ developers at Southeastern Europe's largest tech event
13πŸ‡­πŸ‡· Location: Stunning Zadar, Croatia
14πŸ“… Dates: September 14-16, 2025
15πŸ“ Venue: KreΕ‘imir Δ†osiΔ‡ Hall, Zadar
16 
17Conference Highlights:
18 
19✨ 80+ world-class speakers & tech leaders
20πŸ’» Interactive workshops & hands-on coding sessions
21🀝 Networking with global developer community
22πŸŽ‰ Epic afterparties by the Mediterranean Sea
23πŸ”¬ Cutting-edge talks on AI, cloud, mobile & more
24 
25Ticket Options Advertised:
26 
27🎟️ Early Bird Special (Limited time - best price!)
28🎫 Regular Conference Pass
29πŸ‘‘ VIP Experience with exclusive access
30πŸŽ“ Student discounts available
31πŸ”§ Workshop-only passes
32 
33Call-to-Action:
34 
35🌐 Website: https://shift.infobip.com/
36πŸ“± Hashtags: #ShiftConf2025 #Developers #Croatia #TechConference
37 
38πŸ“Š Message Status:
39 
40βœ… Message ID: df78f3a4-f6a6-4110-b633-26ef4cb19bc2
41βœ… Status: PENDING_ENROUTE (being delivered)
42βœ… Callback Data: shift_conference_image_ad_2025
43βœ… Delivery Tracking: Configured
44 
45The 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