🚀 Sinch MCP Server — Developer Preview
This repository contains the source code for the Sinch MCP server, which offers a suite of tools to interact with the Sinch APIs. While this README focuses on using the MCP server with the Claude Desktop client, it's also compatible with any other MCP client.
✨ Features
Tools Overview
Here's a list of the tools available in the MCP server. Note that all phone numbers must be provided in E.164 format (e.g., +33612345678 for France).
Conversation Tools
| Tool |
Description |
Tags |
| send-text-message |
Send a plain text message to a recipient on a supported channel. Example prompt: "Send a quick update to the phone number +33612345678 on SMS." |
conversation, notification |
| send-media-message |
Send an image, video, or document via a media message. Example prompt: "Send the product brochure PDF to the phone number +33612345678 on WhatsApp." |
conversation, notification |
| send-template-message |
Send a message using a predefined template (e.g., WhatsApp or omni-template). Example prompt: "Send the appointment reminder template in Spanish to this user on Messenger." |
conversation, notification |
| send-choice-message |
Send a message that includes interactive choices (buttons or quick replies). Example prompt: "Send a RCS survey about preferred ice cream flavor to +33662162504 with the following choices: Vanilla, Strawberry, Hazelnut". |
conversation, notification |
| send-location-message |
Send a location pin or coordinates to a user. Example prompt: "Send a pin to the Guggenheim Museum location in Bilbao to the phone number +33612345678." |
conversation, notification |
| get-message-events |
Retrieve events related to a given message (text, media, choice, ...), such as delivery status or read receipts. ⚠️ Only the events received during the time the MCP server is online can be retrieved. Example prompt: "What is the delivery status of the message 01JXYH8RB8MZCAFR117KQAQMQ0 ?" |
conversation, notification |
| list-all-apps |
List all configured Conversation apps in the Sinch account. Example prompt: "What messaging apps do I have set up in my account?" |
conversation, notification |
| list-messaging-templates |
List all omni-channel and channel-specific message templates. Example prompt: "Show me all message templates in my account." |
conversation, notification |
Email tools (Mailgun)
| Tool |
Description |
Tags |
| send-email |
Send an email using a predefined HTML template or raw HTML/text content. Example prompt: "Send a welcome email to john@example.com using our onboarding template." |
email, notification |
| list-email-templates |
List all email templates available for a specific domain. Example prompt: "What email templates do I have available?" |
email, notification |
| retrieve-email-info |
Retrieve metadata, content and delivery status for a specific email message. Example prompt: "Can you get the delivery status of the email with ID ?" |
email, notification |
| list-email-events |
Retrieve and group recent email delivery events, such as bounces, opens, or clicks. Example prompt: "Show me all recent email activity for my account." |
email |
| analytics-metrics |
Retrieve email analytics metrics, such as open rates or click-through rates. Example prompt: "What are the open rates during the last week?" |
email |
Verification Tools
| Tool |
Description |
Tags |
| number-lookup |
Lookup a phone number for its status and capabilities. Example prompt: "Lookup for the following phone number capabilities: +33501020304." |
verification |
| start-sms-verification |
Initiate an SMS verification by sending an OTP to a user's phone number. Example prompt: "Start phone verification for the number +33612345678." |
verification |
| report-sms-verification |
Submit a one-time password (OTP) to complete SMS verification. Example prompt: "Verify the phone number with this code: 1234." |
verification |
Voice Tools
| Tool |
Description |
Tags |
| tts-callout |
Place a voice call and read aloud a message using Text-to-Speech. Example prompt: "Call the phone number +33612345678 and say: 'Your appointment is tomorrow at 10 AM.'" |
voice, notification |
| conference-call |
Start a voice call to one or more participants and connect them to a shared conference. Example prompt: "Call John (+33612345678) and Lisa (+34987654321) and connect them to a conference room." |
voice |
| manage-conference-participant |
Mute, unmute, hold, or resume an individual participant in a conference call. Example prompt: "Mute the caller with ID xyz789 in the conference." |
voice |
| close-conference |
End a conference call by disconnecting all the participants using the ID of the conference. Example prompt: "End the current conference call with ID abc123." |
voice |
Configuration Tools
| Tool |
Description |
Tags |
| sinch-mcp-configuration |
List all available tools in the Sinch MCP server and their status. If a tool is disabled, it will display the reason why. Example prompt: "Which tools are available in the Sinch MCP server?" |
|
🚀 Quick Start
Prerequisites
API credentials
To use the APIs utilized by the MCP tools, you'll need the following credentials:
- Conversation API credentials:
- (Required)
CONVERSATION_PROJECT_ID: Select the project you want to use from your Sinch Build dashboard (Located at the left of the top toolbar).
- (Required)
CONVERSATION_KEY_ID: Select or create a new access key in the Access keys section of the Sinch Build dashboard.
- (Required)
CONVERSATION_KEY_SECRET: This is the secret associated with the Access Key you selected or created in the previous step. Be cautious, as the Access Key Secret is only shown once when you create the Access Key. If you lose it, you'll need to create a new Access Key.
CONVERSATION_APP_ID: This is the ID of the conversation app you want to use. You can find it in the Conversation API / Apps section of the Sinch Build dashboard. If you don't set it, you'll have to specify it in the prompt.
CONVERSATION_REGION: This is the region where your conversation app and templates are located. It can be us, eu, or br. If you don't set it, it defaults to us.
- When using the SMS channel, you can also set the
DEFAULT_SMS_ORIGINATOR environment variable to the phone number that will be used as the sender for SMS messages. Depending on your country, this setting may be required.
- You can also set the
GEOCODING_API_KEY environment variable to your Google Geocoding API key if you want to use the location feature. This is needed to convert an address to a latitude/longitude pair.
NGROK_AUTH_TOKEN: If you want to use the tool get-message-events, you have to be able to receive events related to a message. If this variable is set, the MCP server will open a tunnel to your local machine using ngrok. If you don't set this variable, the MCP server will not be able to receive events related to a message.
- Verification API credentials: Navigate to the Verification / Apps section of the Sinch Build dashboard and create a new app or select an existing one. You'll need the following credentials:
- (Required)
VERIFICATION_APPLICATION_KEY
- (Required)
VERIFICATION_APPLICATION_SECRET
- Voice API credentials: Navigate to the Voice / Apps section of the Sinch Build dashboard and create a new app or select an existing one. You'll need the following credentials:
- (Required)
VOICE_APPLICATION_KEY
- (Required)
VOICE_APPLICATION_SECRET
- You can also set the
CALLING_LINE_IDENTIFICATION environment variable to the phone number that will be displayed to the user when they receive a call.
- Mailgun API credentials: Navigate to the Mailgun / Domains section of the Mailgun dashboard and create a new domain or select an existing one. You'll need the following credentials:
- (Required)
MAILGUN_API_KEY
MAILGUN_DOMAIN
MAILGUN_SENDER_ADDRESS
MCP Server Configuration
The Sinch MCP server is available as an NPM package for execution. Here's how to set it up in the Claude Desktop configuration file (claude_desktop_config.json). Remember to populate the environment variables with your own credentials:
{
"mcpServers": {
"sinch": {
"command": "npx",
"args": [
"-y",
"@sinch/mcp"
],
"env": {
"CONVERSATION_PROJECT_ID": "",
"CONVERSATION_KEY_ID": "",
"CONVERSATION_KEY_SECRET": "",
"CONVERSATION_APP_ID": "",
"CONVERSATION_REGION": "",
"DEFAULT_SMS_ORIGINATOR": "",
"GEOCODING_API_KEY": "",
"NGROK_AUTH_TOKEN": "",
"VERIFICATION_APPLICATION_KEY": "",
"VERIFICATION_APPLICATION_SECRET": "",
"VOICE_APPLICATION_KEY": "",
"VOICE_APPLICATION_SECRET": "",
"CALLING_LINE_IDENTIFICATION": "",
"MAILGUN_API_KEY": "",
"MAILGUN_DOMAIN": "",
"MAILGUN_SENDER_ADDRESS": ""
}
}
}
}
📦 Installation
Running the MCP Server locally
Option 1: Start the MCP server with stdio using Claude Desktop
To run the MCP server locally with Claude Desktop, you'll need to clone the repository and build the MCP server. This option is ideal for local development and testing.
Step 1: Clone the repository
git clone https://github.com/sinch/sinch-mcp-server.git
Step 2: Build the MCP server
cd sinch-mcp-server
npm install
npm run build
Step 3: Setup Claude Desktop configuration
Here's an example of how to configure the MCP server in the Claude Desktop configuration file (claude_desktop_config.json):
{
"mcpServers": {
"sinch": {
"command": "node",
"args": [
"/your/path/to/sinch-mcp-server/dist/index.js"
],
"env": {
"CONVERSATION_PROJECT_ID": "",
"CONVERSATION_KEY_ID": "",
"CONVERSATION_KEY_SECRET": "",
"CONVERSATION_APP_ID": "",
"CONVERSATION_REGION": "",
"DEFAULT_SMS_ORIGINATOR": "",
"GEOCODING_API_KEY": "",
"NGROK_AUTH_TOKEN": "",
"VERIFICATION_APPLICATION_KEY": "",
"VERIFICATION_APPLICATION_SECRET": "",
"VOICE_APPLICATION_KEY": "",
"VOICE_APPLICATION_SECRET": "",
"CALLING_LINE_IDENTIFICATION": "",
"MAILGUN_API_KEY": "",
"MAILGUN_DOMAIN": "",
"MAILGUN_SENDER_ADDRESS": ""
}
}
}
}
Step 4: (Optional) Filter the tools available in the MCP server
Too many tools can lead to a larger context, higher token usage, and more confusion for the LLM when selecting the appropriate tool.
You can filter the available tools in the MCP server using the tags option. For example, if you only want to use the conversation tools, you can add the following options to the args array:
"args": [
"/your/path/to/sinch-mcp-server/dist/index.js",
"--tags",
"conversation"
],
You can combine multiple tags by separating them with commas. For instance, if you want to use both conversation and verification tools, you can use the following command:
"args": [
"/your/path/to/sinch-mcp-server/dist/index.js",
"--tags",
"conversation,verification"
],
If you want to use all the tools, you can omit the --tags option or use the tag all:
"args": [
"/your/path/to/sinch-mcp-server/dist/index.js",
"--tags",
"all"
],
Option 2: Start the MCP server remotely and connect to it using SSE
With this option, you can run the MCP server on a remote machine and connect to it using Server-Sent Events (SSE). This is useful if you want to run the MCP server on a cloud server or a dedicated machine.
By default, Claude Desktop will connect to the MCP server using STDIO. We'll use the supergateway library to connect to the MCP server using SSE.
Step 1: Build the MCP server
cd sinch-mcp-server
npm install
npm run build
Step 2: Set up the MCP server configuration
Copy the file .template.env and rename it .env. Then replace the placeholders with your own credentials and delete any key you don't need. The .env file should look like this:
# Conversation tools related environment variables
CONVERSATION_PROJECT_ID=
CONVERSATION_KEY_ID=
CONVERSATION_KEY_SECRET=
## Optional but recommended: the App ID holding your channels integration configuration. If not set it must be present in the prompt
CONVERSATION_APP_ID=
## Optional, defaults to "us". Other possible values are "eu" and "br"
CONVERSATION_REGION=
## Needed only if you want to send SMS messages: it is the number that will be used as the sender for SMS messages
DEFAULT_SMS_ORIGINATOR=
## Needed only if you want to send location messages: it converts an address to a latitude/longitude pair
GEOCODING_API_KEY=
## Token to be obtained at https://dashboard.ngrok.com/get-started/your-authtoken to enable the "get-message-events" tool
NGROK_AUTH_TOKEN=
# Verification tools related environment variables
VERIFICATION_APPLICATION_KEY=
VERIFICATION_APPLICATION_SECRET=
# Voice tools related environment variables (Application key and secret can be the same as for Verification)
VOICE_APPLICATION_KEY=
VOICE_APPLICATION_SECRET=
## Needed only if you want to make calls: it is the number that will be displayed to the user when they receive a call
CALLING_LINE_IDENTIFICATION=
# Mailgun tools related environment variables
MAILGUN_DOMAIN=
MAILGUN_API_KEY=
MAILGUN_SENDER_ADDRESS=
Step 3: Start the MCP server
npm run start
By default, this command will start the MCP with all the tools available. If you want to filter the available tools in the MCP server, you can use the --tags option. For example, if you only want to use the conversation tools, you can modify the command as follows:
"start": "tsc && (npx -y supergateway --stdio \"node dist/index.js\" --port 8000 --baseUrl http://localhost:8000 --ssePath /sse --messagePath /message)"
"start": "tsc && (npx -y supergateway --stdio \"node dist/index.js --tag conversation\" --port 8000 --baseUrl http://localhost:8000 --ssePath /sse --messagePath /message)"
You can combine multiple tags by separating them with commas. For example, if you want to use both conversation and verification tools, you can use the following command:
"start": "tsc && (npx -y supergateway --stdio \"node dist/index.js --tag conversation,verification\" --port 8000 --baseUrl http://localhost:8000 --ssePath /sse --messagePath /message)"
Step 4: Configure the MCP server in Claude Desktop
You can then configure the MCP server in the Claude configuration file as follows:
{
"mcpServers": {
"sinch": {
"command": "npx",
"args": [
"-y", "supergateway", "--sse", "http://localhost:8000/sse"
]
}
}
}
(Replace the http://localhost:8000/sse with the URL of your MCP server if it's not running locally)
📚 Documentation
Contributing: Defining new tools
Tools are registered in the src/index.ts file.
- Conversation tools: Send various types of messages, list conversation apps, templates.
- Verification tools: Lookup for a number, perform a verification flow.
- Voice tools: Make a TTS call, create a conference call, manage participants.
- Email tools: Send emails, retrieve email information.
Tools are defined under src/tools/ and are registered in the index.ts file of their respective domain folder.
- Conversation tools:
src/tools/conversation/index.ts
- Verification tools:
src/tools/verification/index.ts
- Voice tools:
src/tools/voice/index.ts
- Email tools:
src/tools/email/index.ts