# Send Viber using an Infobip MCP server and an AI client
---

This tutorial will show you how to send a Viber Business Message using AI prompts. In this example, we use Claude Desktop but you can use any AI client that supports MCP integrations.

## Prerequisites

1. [Infobip account](https://portal.infobip.com/login/?callback=https%3A%2F%2Fportal.infobip.com%2F). If you do not have one, create a [free trial account](https://www.infobip.com/signup).
2. If using **API key authorization**, an Infobip API key with the `viber-bm:message:send` scope. Find out more about [API keys and scopes](https://www.infobip.com/docs/essentials/api-essentials/api-authorization). **Skip this step for OAuth.**
3. An AI client (e.g., Claude Desktop) with the Infobip Viber MCP server. For integration details, see the [MCP integration guide](https://www.infobip.com/docs/tutorials/integrate-infobip-mcp-server-with-mcp-client).
4. Sender. If in a free trial, use the Infobip test sender, `IBSelfServe`.
   If you want to configure a custom sender, request a new number or an alphanumeric sender through the [Infobip account](https://portal.infobip.com/channels-and-numbers/channels/sms/overview) or use the [Infobip Numbers API](https://www.infobip.com/docs/api/platform/numbers).
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](https://www.infobip.com/docs/essentials/getting-started/free-trial#register-multiple-numbers-and-emails).

## Integrate the Infobip Viber MCP server with your AI client

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

```json
{
  "mcpServers": {
    "infobip-viber": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.infobip.com/viber",
        "--header",
        "Authorization: App ${INFOBIP_API_KEY}"
      ],
      "env": {
        "INFOBIP_API_KEY": "<your api here infobip key>"
      }
    }
  }
}
```

```json
{
  "mcpServers": {
    "infobip-viber": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.infobip.com/viber"
      ]
    }
  }
}
```

Once you restart your AI client, you should see the Infobip Viber MCP server on the list of available tools.
For more integration details, see the [MCP integration guide](https://www.infobip.com/docs/tutorials/integrate-infobip-mcp-server-with-mcp-client).

## Send a Viber message

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

Key points about the prompt:

- Specify the sender and destination(s).
- Specify additional features you wish to include, e.g. buttons, media sending and managing, tracking, scheduling, etc. Check out [Viber Business Messages](https://www.infobip.com/docs/api/channels/viber/viber-business-messages/send-viber-messages) API reference.
- 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.

```curl
Send a promotional Viber message to 441134960001 introducing Infobip and their communication solutions.
1. Include a logo image: 
2. Add a call-to-action button that directs users to learn more about the Infobip communications platform as a service: https://www.infobip.com.
3. Make the message engaging and professional, highlighting how Infobip helps businesses connect with customers globally.
4. Use IBSelfServe as a sender.
```

The AI will create a request that you can then review and change if need be. Once you approve the message, the AI will send it.

```bash
{
  `messages`: [
    {
      `sender`: `IBSelfServe`,
      `content`: {
        `text`: `🌐 Connect with customers globally through Infobip's powerful communication platform!

 Transform your business communications with our comprehensive suite of messaging, voice, and engagement solutions. From SMS and email to chatbots and vide calls - we help you reach customers anywhere, anytime.

✨ Trusted by thousands of businesses worldwide
📱 Omnichannel customer experiences
🚀 Scale your communications effortlessly
        `, 
        `type`: `IMAGE`,
        `button`: {
          `title`: `VIEW OFFER NOW`,
          `action`: `https://www.infobip.com/cpaas-x`
        },
        `mediaUrl`: ``
      },
      `options`: {
        `label`: `PROMOTIONAL`
      },
      `destinations`: [
        {
          `to`: `447415774332`
        }
      ]
    }
  ]
}
```

```bash
{
 "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.

```curl
Summary
Perfect! I've successfully sent a promotional Viber message to 447415774332 introducing Infobip and their communication solutions. Here's what was included in the message:
Message Details:

Sender: IBSelfServe
Recipient: 447415774332
Content Type: Image with text and button
Logo: Infobip's horizontal orange logo from Wikipedia
Message: Professional and engaging copy highlighting Infobip's global reach, trusted customer base, and comprehensive communication solutions
Call-to-Action Button: "Learn More" button directing to https://www.infobip.com/cpaas-x
Label: Marked as PROMOTIONAL content

Message Status:

Bulk ID: 17528356386858989599978
Message ID: 17528356386858989599979
Status: PENDING_ACCEPTED (Message sent to next instance)

The message effectively showcases Infobip's key value propositions including their global reach (190+ countries), large customer base (70,000+ companies), omnichannel capabilities, and easy integration options. The visual appeal of the logo combined with the clear call-to-action should help drive engagement and interest in Infobip's CPaaS platform.
```

That's it! You have successfully sent a Viber Business Message using AI and an Infobip MCP server.

## Useful links

- [Infobip MCP docs](https://www.infobip.com/mcp/)
- [Viber Business Messages API reference](channels/viber/viber-business-messages)
- [Response status and error codes](https://www.infobip.com/docs/essentials/api-essentials/response-status-and-error-codes)