
シェア:
Benjamin Aronov is a developer advocate at Vonage. He is a proven community builder with a background in Ruby on Rails. Benjamin enjoys the beaches of Tel Aviv which he calls home. His Tel Aviv base allows him to meet and learn from some of the world's best startup founders. Outside of tech, Benjamin loves traveling the world in search of the perfect pain au chocolat.
Spread Holiday Cheer with AI Agents and Vonage MCP Messaging Tools
Automate personalized messaging across WhatsApp, RCS, and SMS using AI agents and the Vonage MCP Server!
Introduction
As your business scales, one-size-fits-all messaging just doesn’t cut it. Some users prefer SMS. Others expect WhatsApp. And with RCS adoption growing, supporting multiple channels is becoming essential. The challenge? Personalizing messaging across channels, languages, and preferences without building and maintaining complex infrastructure.
Can you guess the solution? AI! By leveraging AI assistants like Windsurf or Cursor inside your IDE, you can delegate repetitive, logic-heavy communication tasks to an agent. It’s an ideal use case for AI-assisted multi-channel messaging.
In this tutorial, you'll learn how to integrate an AI agent with the Vonage MCP Server to send personalized, channel-aware holiday messages based on contact preferences. Using a simple CSV file, you’ll configure the AI to read messaging preferences, choose the right delivery channel, handle fallback logic, and even localize greetings by language. Whether you're saying Happy Hanukkah or Merry Christmas, this workflow lets you scale your outreach without writing a full app.
Screen recording of an AI agent in Windsurf reading a CSV file of holiday contacts and generating personalized messages using the Vonage Tooling MCP Server, with some data fields obscured for privacy.
Understanding Our AI Agent
If you're new to the Model Context Protocol (MCP) or AI agents, check out our intro post:Introducing MCP: AI Meets Programmable Communications With Vonage
A quick refresher: MCP servers give AI agents (like Windsurf or Claude) the ability to discover and safely use developer functionality, called tools, without hardcoding every API call. Instead of writing integration logic from scratch, the server exposes capabilities like Send an SMS or Check My Balance, and the agent decides how and when to use them.
This tutorial relies on the Vonage Tooling MCP Server, which exposes a set of Vonage tools your agent can access directly from your IDE. This post uses these five messaging tools:
whatsapp-send-textwhatsapp-send-text-with-sms-failoverrcs-send-textrcs-send-text-with-sms-failoversms
The AI agent uses these tools to read a contact's preferences, choose the right channel (e.g., WhatsApp in Europe, SMS in the U.S.), and send a personalized message. If a preferred channel fails, the server automatically falls back to SMS using built-in failover logic.
These tools wrap a unified messaging function that formats phone numbers, checks credentials, and routes the message to the right channel. If a preferred channel fails, it can automatically fall back to SMS
Each channel has its own lightweight wrapper sendWhatsAppText, sendRCSText, sendSMSText), and each is registered as an MCP tool that the agent can discover and use directly.
Now let’s hook up our agent to use these tools!
See the full logic >> Check out
sendChannelMessage()and the tool registrations in index.ts.
Prerequisites
WhatsApp Business Account: you’ll need to have a WhatsApp Business enabled in your Vonage API account.
A registered RCS Business Messaging (RBM) agent
A phone with RCS enabled for testing
IDE with AI Agent Capabilities like VS Code, Cursor, or Windsurf.
This tutorial will use Windsurf.
Step 1: Create a Vonage Application with RCS and WhatsApp
You might think that our agent can create a Vonage application. Sadly, not yet. But our Server is Open Source, so you can help us out and add that functionality through a PR! For now you’ll have to create your app through the Vonage Dashboard or CLI.
To create an application, go to the Create an Application page on the Vonage Dashboard, and define a Name for your Application.

If you intend to use an API that uses Webhooks, you will need a private key. Click “Generate public and private key”, your download should start automatically. Store it securely; this key cannot be re-downloaded if lost. It will follow the naming convention private_<your app id>.key. This key can now be used to authenticate API calls. Note: Your key will not work until your application is saved.
Choose the capabilities you need (e.g., Voice, Messages, RTC, etc.) and provide the required webhooks (e.g., event URLs, answer URLs, or inbound message URLs). These will be described in the tutorial.
To save and deploy, click "Generate new application" to finalize the setup. Your application is now ready to use with Vonage APIs.
Requirements for Your App
Enable Messages capabilities. You can add dummy URLs for the webhooks.
Generate a public and private key, you’ll use that later to configure your MCP Server.
Link Your WhatsApp and RCS accounts
Screenshot from the Vonage API Dashboard showing RCS and WhatsApp accounts linked to an application under the 'Link external accounts' tab, with options to unlink each.
Step 2: Create a CSV of Contacts
The beautiful thing about IDE-Integrated AI Assistants is that they can read whatever files are open. For production applications, you’ll want to create a full project with some sort of database. For this fun use case, just create a simple CSV and open it in Windsurf:
touch holiday_contacts.csv
windsurf holiday_contacts.csvInside the CSV, add contacts with their phone numbers, communication preferences, and preferred holidays. You can also add more context for each contact to help the AI Agent generate a more personalized message, I’ve included preferred language.
Here’s an example CSV, replace with phone numbers that you can test:
name,phone,rcs?,whatsapp?,preferred_holiday,preferred_language
Boris Shomris,11233214567,no,yes,hanukkah,hebrew
Alberto Roberto,34123321456,yes,yes,christmas,spanish
Henry Mulenberry,11233214567,yes,no,new_year,english
Sasha Pasha,44123321457,no,yes,kwanza,english
Tenzin Kenzin,86123321458,yes,no,bodhi_day,hindi Step 3: Configure Your MCP Server
Now you’ll need to give Cascade in Windsurf (or your Cursor/VS Code agent) access to the Vonage Tooling server. Open the Cascade panel (option+command+B). Click on the plugin icon and then click the settings icon. You can also open the mcp_config.json directly. By default it’s in Users>{your_user}>.codeium>windsurf>mcp.json.
There, add the Vonage Tooling server to your mcpServers object:
{
"mcpServers": {
"vonage-tooling": {
"command": "npx",
"args": ["-y", "@vonage/vonage-mcp-server-api-bindings"],
"env": {
"VONAGE_API_KEY": "your_api_key_here",
"VONAGE_API_SECRET": "your_api_secret_here",
"VONAGE_APPLICATION_ID": "your_application_id_here",
"VONAGE_PRIVATE_KEY64": "your_private_key_base64_here",
"VONAGE_WHATSAPP_NUMBER": "+1234567890",
"RCS_SENDER_ID": "YourBrandName",
"VONAGE_VIRTUAL_NUMBER": "+1234567890"
}
}
}
}
Find your
API_KEYandAPI_SECRETon the API Settings page in the Vonage Dashboard.The
APPLICATION_ID,VONAGE_WHATSAPP_NUMBER, andRCS_SENDER_IDcan all be found on the application page for the application you created in step 1. You can reuse yourVONAGE_WHATSAPP_NUMBERvalue for theVONAGE_VIRTUAL_NUMBERvalue, which is used to send SMS.The Private Key we generated before is not in base64 yet. You’ll need to convert using Dwane Hemming’s Private Key to Environment Variable tool and then paste it in for
VONAGE_PRIVATE_KEY64.
After you’ve added all the environment variables, restart Windsurf. When you open Cascade you should see that the Vonage-Tooling server is available with tools. How cool! You can see that I also have the Vonage Documentation Server available.
Confirmation in Windsurf that the Vonage Tooling MCP Server is active and connected, as seen in the Cascade panel.
Step 4: Test with Your AI Agent
Once you’ve got your CSV of contacts ready and have given Cascade access to the Vonage tools, that’s it! Now it’s time to experiment with prompts and see how engaging, heart-felt, or funny your AI Agent can be.
Example of a personalized holiday greeting sent via WhatsApp using the Vonage MCP Tooling Server, customized with name and Spanish-language message content.
Try different prompts to test their behavior. For instance, I had a test user who had both RCS and WhatsApp set to yes in the CSV, but only his RCS number actually worked. The expected behaviour should be “try RCS, then try WhatsApp, and only then send the SMS failover”. However, the following prompt went immediately WhatsApp -> SMS failover.
Send a personalized holiday greeting for my
friends in the holiday_contracts.csv. RCS and
WhatsApp are preferred over SMS but if RCS or
WhatsApp don't work you can failover to SMS.
Use the preferences you find in the csvMaybe adding a column ranking the user’s communications preferences would’ve given the agent enough context to do this correctly. Experiment and let us know on our Community Slack!
Conclusion
Did you have any problems setting up your agent? Maybe you want to create a dedicated chatbot with full application functionality to work outside your IDE? If so, check out Adding Vonage APIs to Your AI Agent. That chatbot was the inspiration for this post! All I had to do was add the desired Tools to our MCP Server.
Do you want to see more tools in the server? It’s open source! So build the future you seek. I’ll be giving more details in a future blog post, but basically... we’d love to see some PRs!
Have a question or something to share? Join the conversation on the Vonage Community Slack, stay up to date with the Developer Newsletter, follow us on X (formerly Twitter), subscribe to our YouTube channel for video tutorials, and follow the Vonage Developer page on LinkedIn, a space for developers to learn and connect with the community. Stay connected, share your progress, and keep up with the latest developer news, tips, and events!
シェア:
Benjamin Aronov is a developer advocate at Vonage. He is a proven community builder with a background in Ruby on Rails. Benjamin enjoys the beaches of Tel Aviv which he calls home. His Tel Aviv base allows him to meet and learn from some of the world's best startup founders. Outside of tech, Benjamin loves traveling the world in search of the perfect pain au chocolat.


