MCP Server Documentation
UniSMS MCP (Model Context Protocol) server allows AI assistants like Claude, Cursor, and OpenCode to send SMS, check message status, and check credits directly through a standardized protocol.
What is MCP?
The Model Context Protocol (MCP) is an open protocol that enables AI models to interact with external tools and data sources. Through MCP, your AI assistant can send SMS messages, retrieve message status, and check your account credits — all from within your conversation.
The MCP server uses the same Basic Authentication as the REST API. Use your API Secret key as the username and leave the password empty.
Authorization: Basic Base64Encode(API_SECRET_KEY:)
(Most libraries automatically encode this to Base64)
You can find your API Secret key in your account dashboard.
How It Works
The UniSMS MCP server uses SSE (Server-Sent Events) transport for real-time bidirectional communication. Here's the connection flow:
Connect to SSE Endpoint
Your AI client connects to GET /mcp/sse
using Basic Authentication. The server establishes an SSE stream and sends an
endpoint
event containing the URL for sending JSON-RPC messages.
Initialize Session
The client sends an initialize
request to the message endpoint. The server responds with its capabilities and protocol version.
List Available Tools
The client calls tools/list
to discover available tools (send_sms, get_sms, get_credits).
Call Tools
The AI model invokes tools via tools/call
requests. The server executes the tool and returns results as JSON-RPC responses.
Endpoints
| Method | URL | Description |
|---|---|---|
| GET | /mcp/sse |
Establish SSE connection |
| POST | /mcp/message |
Send JSON-RPC messages |
Example Conversations
Here are real examples of how an AI agent uses the UniSMS MCP tools during a conversation. The agent automatically calls the appropriate tools based on your natural language requests.
I'll send that SMS for you right now.
Calling tool: send_sms
{recipient: "+639123456789", content: "Your order has been shipped! Track it at https://track.example.com/ with the tracking code: UTRCK222", sender_id: "UniSMS"}
Tool result: SMS sent successfully. Message ID: msg_84e8b93b-6315-46af-a686, status: sent
SMS sent successfully to +639123456789. The message has been queued for delivery. Your reference ID is
msg_84e8b93b-6315-46af-a686
— you can use this to check the delivery status later.
Let me look up that message for you.
Calling tool: get_sms
{reference_id: "msg_84e8b93b-6315-46af-a686"}
Tool result: SMS found
Here's the status of your message:
- Status: sent
- Recipient: +639123456789
- Content: Your order has been shipped! Track it at...
- Created: 2026-03-16 14:32:44 UTC
Let me check your credit balance.
Calling tool: get_credits
{}
Tool result: Remaining SMS credits: 100
You have 100 SMS credits remaining in your account. Each standard SMS (up to 160 characters) uses 1 credit. Longer messages use additional credits based on message length.
Multi-Step Conversations
The AI agent can chain multiple tool calls in a single conversation. For example, you could ask: "Send an SMS to +639123456789 saying 'Hello!', then check my credits." The agent will call
send_sms
first, then get_credits, and summarize both results.
Client Setup
Configure your AI assistant to connect to the UniSMS MCP server. Choose your client below.
Add the UniSMS MCP server to Claude Desktop by editing the configuration file.
Configuration File Location
| OS | Path |
|---|---|
macOS |
~/Library/Application Support/Claude/claude_desktop_config.json
|
Windows |
%APPDATA%\Claude\claude_desktop_config.json
|
Configuration
{
"mcpServers": {
"unisms": {
"url": "https://unismsapi.com/mcp/sse",
"headers": {
"Authorization": "Basic YOUR_BASE64_ENCODED_CREDENTIALS"
}
}
}
}
Steps
-
Generate your Base64 credentials:
echo -n 'YOUR_SECRET_KEY:' | base64 - Open the Claude Desktop configuration file
- Add the UniSMS server configuration above
- Restart Claude Desktop
- Start a new conversation and ask Claude to send an SMS
Add the UniSMS MCP server using the Claude Code CLI or by editing the configuration file directly.
Option 1: CLI Command (Recommended)
claude mcp add --transport http --header "Authorization: Basic YOUR_BASE64_CREDENTIALS" unisms https://unismsapi.com/mcp/sse
Option 2: Edit .mcp.json
Create or edit .mcp.json in your project root:
{
"mcpServers": {
"unisms": {
"type": "http",
"url": "https://unismsapi.com/mcp/sse",
"headers": {
"Authorization": "Basic ${UNISMS_CREDENTIALS}"
}
}
}
}
Steps
- Run the
claude mcp addcommand above - Verify the connection:
claude mcp list - Start a conversation and ask Claude to send an SMS
Add the UniSMS MCP server to Cursor by creating or editing the MCP configuration file.
Configuration File Locations
| Scope | Path |
|---|---|
Project |
.cursor/mcp.json |
Global |
~/.cursor/mcp.json |
Configuration
{
"mcpServers": {
"unisms": {
"url": "https://unismsapi.com/mcp/sse",
"headers": {
"Authorization": "Basic YOUR_BASE64_ENCODED_CREDENTIALS"
}
}
}
}
Steps
-
Create the
.cursordirectory in your project root (if it doesn't exist) - Create or edit
.cursor/mcp.jsonwith the configuration above -
Restart Cursor or reload the window (
Cmd+Shift+P→ "Reload Window") - Verify the server shows a green dot in Settings → Tools & MCP
- Switch to Agent mode and ask Cursor to send an SMS
Add the UniSMS MCP server to OpenCode by editing the configuration file.
Configuration File Locations
| Scope | Path |
|---|---|
Project |
opencode.json
or opencode.jsonc
|
Global |
~/.config/opencode/opencode.json |
Configuration
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"unisms": {
"type": "remote",
"url": "https://unismsapi.com/mcp/sse",
"headers": {
"Authorization": "Basic YOUR_BASE64_ENCODED_CREDENTIALS"
},
"enabled": true
}
}
}
Steps
- Create or edit
opencode.jsonin your project root - Add the UniSMS server configuration above
- Verify the connection:
opencode mcp list - Ask OpenCode to send an SMS
Connect the UniSMS MCP server to N8N's AI Agent node to enable automated SMS workflows. N8N includes a built-in MCP Client Tool node — no third-party installation required.
Prerequisites
- N8N instance (self-hosted or cloud, v1.30+)
- AI Agent node (built-in)
- MCP Client Tool node (built-in, part of langchain nodes)
Step 1: Create a Workflow
Create a new workflow and add the following nodes:
- Trigger — e.g., Webhook, Schedule, or Manual Trigger
- AI Agent — The main agent node that processes requests
- MCP Client Tool — Connect to the AI Agent's Tools input
Step 2: Configure the MCP Client Tool Node
In the MCP Client Tool node settings, configure the following:
| Field | Value |
|---|---|
SSE Endpoint |
https://unismsapi.com/mcp/sse |
Authentication |
Header Auth |
Header Name |
Authorization |
Header Value |
Basic YOUR_BASE64_ENCODED_CREDENTIALS |
Step 3: Configure the AI Agent Node
Connect the MCP Client Tool node to the AI Agent's Tools input. Set the agent's system prompt to describe what it can do:
You are an SMS assistant. You can send SMS messages, check message status, and check account credits using the UniSMS tools available to you.
When sending an SMS, always confirm the recipient number and message content with the user before sending.
Example Workflow
Webhook Trigger
↓
AI Agent (with MCP Client Tool)
↓
Respond to Webhook
Testing
Send a POST request to your webhook URL with a JSON body like:
{
"message": "Send an SMS to +639123456789 saying 'Hello from N8N!'"
}
The AI Agent will process the request, call the send_sms
tool via MCP, and return the result.
Available Tools
send_sms
Send SMS
Send an SMS text message to a single phone number.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
recipient |
string |
Yes | Destination PH phone number in international format (e.g., +639003456789) |
content |
string |
Yes | The text content of the SMS message (max 670 characters) |
sender_id |
string |
Yes | Registered SenderID from UniSMS platform |
Example Response
{
"content": [
{
"type": "text",
"text": "SMS sent successfully. Message ID: msg_84e8b93b-6315-46af-a686, status: sent"
}
]
}
Error Response
{
"isError": true,
"content": [
{
"type": "text",
"text": "Failed to send SMS because it failed validation: [errors]"
}
]
}
get_sms
Get SMS
Get a single SMS message using its reference ID.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
reference_id |
string |
Yes | The unique reference ID to identify the SMS message |
Example Response
{
"content": [
{
"type": "text",
"text": "{\n \"reference_id\": \"msg_84e8b93b-6315-46af-a686\",\n \"status\": \"sent\",\n \"recipient\": \"+639123456789\",\n \"content\": \"Hello from UniSMS!\",\n \"metadata\": {},\n \"fail_reason\": null,\n \"sender_id\": \"UniSMS\",\n \"created\": \"2026-03-16T14:32:44Z\"\n}"
}
]
}
Message Statuses
get_credits
Get Credits
Get remaining SMS credits in your account.
Input Schema
No parameters required.
Example Response
{
"content": [
{
"type": "text",
"text": "Remaining SMS credits: 100"
}
]
}