MCP server for Promotexter SMS API - Send SMS and check balance via Model Context Protocol
Project description
Promotexter MCP Server
A Model Context Protocol (MCP) server for integrating with the Promotexter SMS API. This server provides tools for sending SMS messages and checking account balance.
Features
- Balance Inquiry: Check your current Promotexter account balance
- Single SMS Transaction: Send SMS messages to individual recipients
Installation
-
Clone this repository or create the files in your project directory
-
Install dependencies:
pip install -e .
Or install directly:
pip install mcp httpx
Configuration
Environment Variables
Set the following environment variables with your Promotexter API credentials:
export PROMOTEXTER_API_KEY="your_api_key_here"
export PROMOTEXTER_API_SECRET="your_api_secret_here"
export PROMOTEXTER_SENDER_ID="your_sender_id_here"
You can also add these to a .env file:
PROMOTEXTER_API_KEY=your_api_key_here
PROMOTEXTER_API_SECRET=your_api_secret_here
PROMOTEXTER_SENDER_ID=your_sender_id_here
MCP Settings
Add the server to your MCP settings file (usually ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"promotexter": {
"command": "python",
"args": ["/path/to/promotexter-mcp/promotexter_server.py"],
"env": {
"PROMOTEXTER_API_KEY": "your_api_key_here",
"PROMOTEXTER_API_SECRET": "your_api_secret_here",
"PROMOTEXTER_SENDER_ID": "your_sender_id_here"
}
}
}
}
Or if you want to use environment variables from your shell:
{
"mcpServers": {
"promotexter": {
"command": "python",
"args": ["/path/to/promotexter-mcp/promotexter_server.py"]
}
}
}
Available Tools
get_balance
Get the current account balance from Promotexter.
Parameters: None
Returns: Account balance information
Example:
get_balance()
send_sms
Send a single SMS message via Promotexter.
Parameters:
to(required): Recipient mobile number (must be valid mobile number format)text(required): Message content (maximum 1000 characters)reference_id(optional): Optional reference ID for tracking
Note: The sender ID is configured via the PROMOTEXTER_SENDER_ID environment variable and must be whitelisted in your Promotexter account.
Returns: SMS send response with transaction details including:
- Message ID
- Remaining balance
- Transaction cost
- Message parts count
- Operator code
Example:
send_sms(
to="639170000001",
text="Hello! This is a test message.",
reference_id="test-001"
)
API Documentation
For more information about the Promotexter API, visit: https://promotexter.docs.apiary.io/
Security Notes
- Never commit your API credentials to version control
- Use environment variables or secure credential management
- The sender ID (configured via
PROMOTEXTER_SENDER_ID) must be whitelisted in your Promotexter account - Ensure proper validation of recipient numbers before sending
Error Handling
The server includes comprehensive error handling for:
- Missing or invalid credentials
- HTTP errors from the API
- Invalid parameters
- Network timeouts
- Message length validation
Development
To run the server directly:
python promotexter_server.py
Requirements
- Python 3.10+
- mcp >= 1.0.0
- httpx >= 0.27.0
License
MIT
Support
For issues related to:
- The MCP server: Open an issue in this repository
- Promotexter API: Contact Promotexter support at https://promotexter.freshdesk.com/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file promotexter_mcp-0.1.0.tar.gz.
File metadata
- Download URL: promotexter_mcp-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbf597f6cb4fbb883c8e2286796c0daac2e6d64d493f7384f2b10caa759538d5
|
|
| MD5 |
1fc101d50872cebe6946f26c7f0343c4
|
|
| BLAKE2b-256 |
63a0cf8da1c518250c183d5fb16564aed89b757fb323e21bd104ff316d9df0c3
|
File details
Details for the file promotexter_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: promotexter_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55c613b1c2d47175d6525ef880dbf3380563f8c4d341fc1a2b038c8d284c204f
|
|
| MD5 |
81cf88bcf56e541eb6f818ef50cb8c63
|
|
| BLAKE2b-256 |
f031eb3dfc79257286eb0bddd2ea66bbcd7fe5a818623a2282ed5657b668d8be
|