MCP server for SMS and WhatsApp: connect your AI agent to DiceX
DiceX has MCP servers ready for its services, so an AI agent can send SMS and WhatsApp messages and read reports, using your API key and within the limits you set on it.
5 min read
An MCP server for SMS and WhatsApp lets an AI agent do more than draft a message: it can actually send it, then check what happened. DiceX has MCP servers ready for its services, so your AI assistant or agent can send messages and read reports through DiceX. Every connection runs on an API key you create, and you can put a spending cap and an IP restriction on that key, so the agent works only within what you allow. This guide explains what the connection gives an agent, the two ways to connect, and how to keep it under control.
Why use an MCP server for SMS and WhatsApp
An AI tool with no access to communication services can only suggest. It can write the perfect order update, but someone still has to copy it into a panel and press send. Connecting the agent closes that gap:
- A support agent that confirms an order and sends the customer an SMS.
- An operations agent that reads delivery reports and flags messages that did not arrive.
- An assistant that sends a WhatsApp reminder when a booking changes. The same is true in reverse: the agent can read incoming messages and report back, instead of you checking a panel.
What DiceX services an agent can reach
Whatever the DiceX panels do, the documented API does too, and the MCP servers are ready for DiceX services. The services include:
Service | What the API covers |
|---|---|
Single, bulk and per-recipient sends, one-time codes from templates, the status of each message and incoming messages | |
Messages, files, polls, contacts and locations; the status of each message and incoming messages | |
Voice messages by automated call, and their status | |
Meetings, folders and participants, and attendance reports |
| Account | Account details and balance, sub-accounts and contact groups | Which of these your agent actually uses is up to you and the key you give it.
Two ways to connect an AI agent
Route 1: MCP
MCP (Model Context Protocol) is an open standard for connecting AI applications to outside tools. If your agent framework or AI assistant supports MCP, connect it to DiceX's MCP servers. In MCP, a connected tool can discover what a server offers and call it; with DiceX, that means the agent can act on DiceX services, for example to send a message or read a report, doing only what you have allowed it to do.
Route 2: the OpenAPI description
If your tool can call an API but does not speak MCP, use the public OpenAPI description:
```
https://gateway.dicex.me/swagger/v1/swagger.json
```
Give it to your agent, code generator or function-calling setup. It describes every public endpoint, so the tool can build correct requests to the base address https://gateway.dicex.me. Each request carries your key in the ApiKey header. The documentation shows the same endpoints with sample requests and responses, which helps when you check what the agent sent.
Setting it up, step by step
- Create a DiceX account. One account covers every service.
- Top up your wallet. What the agent sends is paid from your wallet, as in the panels.
- Create a key for the agent. In the developer panel, create an API key with a descriptive title, such as «support agent». The DiceX team reviews new keys, and a key can be used once it is approved.
- Set the limits on that key. Choose a spending cap, and if the agent runs on a fixed server, allow only that server's IP address.
- Connect the agent. Use MCP if your tool supports it, or give it the OpenAPI description.
- Test with a small task. Ask the agent to send one SMS to your own number and check its status, before you let it work with customers.
Keeping the agent under control
Connecting a tool does not mean it runs campaigns without your permission. The controls are on the key:
- One key per agent. A separate key for each agent or use means you can see and limit each one on its own, and delete one without touching the others.
- Spending cap. Set the maximum the key may spend. Choose «Limited» and enter the amount; an agent that loops by mistake stops at that ceiling instead of draining your wallet.
- IP restriction. Allow only the addresses the agent's requests come from, as single IPs or ranges. If the list is empty, every IP is allowed, so fill it in for a server-side agent.
- Keep the key secret. Do not put it in prompts, chat logs or shared files. If it is exposed, delete it and create a new one.
It also helps to tell the agent, in its own instructions, what it may and may not send. The key's limits are your hard boundary; the instructions are the soft one.
Does it work with every AI agent?
DiceX does not claim that. Any tool that supports MCP or calling an API can connect; whether a given agent fits depends on whether it supports one of those routes. What it can do once connected depends on the API key and the permissions you give it.
Related reading: how the AI SMS generator in the SMS panel works, and how to set up API key security with spending caps and IP restriction.
Next step
Create a key with a spending cap in the developer panel, connect your agent through MCP or the OpenAPI description, and test it with a single message. For more on how DiceX uses AI, including the writing assistant in the SMS panel, see the AI hub; for the API itself, see the developers hub and the developers page.
Frequently asked questions
Does DiceX have an MCP server for SMS and WhatsApp?
Yes. MCP servers are ready for DiceX services, so an AI agent can send messages and read reports through them.
Which AI tools can connect?
Any tool that supports MCP or calling an API can connect to DiceX services. What it does depends on the API key and the permissions you give it.
How do I stop an agent from overspending?
Give the agent its own API key and set a spending cap on that key in the developer panel. You can also restrict the key to the IP addresses the agent runs from.
What if my tool does not support MCP?
Give it the public OpenAPI description of DiceX services at gateway.dicex.me/swagger/v1/swagger.json, so it can build API requests directly.