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 with detailed information (available balance, account balance, credit limit, withheld amount)
- Single SMS Transaction: Send SMS messages to individual recipients
Installation
Using pip
pip install promotexter-mcp
Using uvx (recommended)
uvx promotexter-mcp
Quick Start
1. Get Your Promotexter Credentials
You'll need:
- API Key
- API Secret
- Sender ID (must be whitelisted in your Promotexter account)
Get these from your Promotexter dashboard at https://promotexter.com
2. Set Environment Variables
export PROMOTEXTER_API_KEY="your_api_key_here"
export PROMOTEXTER_API_SECRET="your_api_secret_here"
export PROMOTEXTER_SENDER_ID="your_sender_id_here"
Or create a .env file:
PROMOTEXTER_API_KEY=your_api_key_here
PROMOTEXTER_API_SECRET=your_api_secret_here
PROMOTEXTER_SENDER_ID=your_sender_id_here
3. Configure MCP Client
For Claude Desktop
Add to your MCP settings file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"promotexter": {
"command": "uvx",
"args": ["promotexter-mcp"],
"env": {
"PROMOTEXTER_API_KEY": "your_api_key_here",
"PROMOTEXTER_API_SECRET": "your_api_secret_here",
"PROMOTEXTER_SENDER_ID": "your_sender_id_here"
}
}
}
}
Or using environment variables from your shell:
{
"mcpServers": {
"promotexter": {
"command": "uvx",
"args": ["promotexter-mcp"]
}
}
}
For Claude Code CLI
Add to your MCP settings:
{
"mcpServers": {
"promotexter": {
"command": "uvx",
"args": ["promotexter-mcp"],
"env": {
"PROMOTEXTER_API_KEY": "your_api_key_here",
"PROMOTEXTER_API_SECRET": "your_api_secret_here",
"PROMOTEXTER_SENDER_ID": "your_sender_id_here"
}
}
}
}
Available Tools
get_balance
Get the current account balance from Promotexter.
Parameters: None
Returns:
- Available Balance
- Account Balance
- Credit Limit
- Withheld Amount
Example:
get_balance()
Response:
Available Balance: 486
Account Balance: 486
Credit Limit: 0
Withheld: 0
send_sms
Send a single SMS message via Promotexter.
Parameters:
to(required): Recipient mobile number in international format (e.g., 639170000001)text(required): Message content (maximum 1000 characters)reference_id(optional): Your own 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
- Unit Cost
- Message Parts count
- Operator Code
- Recipient number
- Sender ID
- Reference ID (if provided)
Example:
send_sms(
to="639170000001",
text="Hello! This is a test message.",
reference_id="test-001"
)
Response:
SMS Sent Successfully!
Message ID: abc123...
Remaining Balance: 485.50
Transaction Cost: 0.50
Unit Cost: 0.50
Message Parts: 1
Operator: PHLSMART
To: 639170000001
From: DEMO
Reference ID: test-001
Development
Running Locally
- Clone the repository:
git clone https://github.com/johnalvero/promotexter-mcp.git
cd promotexter-mcp
- Install dependencies:
pip install -e .
- Run the server:
python -m promotexter_mcp.server
Testing with MCP Inspector
fastmcp dev promotexter_mcp/server.py
API Documentation
For more information about the Promotexter API, visit:
- API Documentation: https://promotexter.docs.apiary.io/
- Promotexter Website: https://promotexter.com
Security Notes
- Never commit your API credentials to version control
- Use environment variables or secure credential management systems
- The sender ID must be whitelisted in your Promotexter account before use
- Ensure proper validation of recipient numbers before sending
- Test thoroughly in a development environment before production use
Error Handling
The server includes comprehensive error handling for:
- Missing or invalid credentials
- HTTP errors from the Promotexter API
- Invalid parameters
- Network timeouts
- Message length validation (max 1000 characters)
- Invalid phone number formats
Requirements
- Python 3.10 or higher
- fastmcp >= 2.13.0
- httpx >= 0.27.0
License
MIT License - see LICENSE file for details
Support
For issues related to:
- This MCP server: Open an issue at https://github.com/johnalvero/promotexter-mcp/issues
- Promotexter API: Contact Promotexter support at https://promotexter.freshdesk.com/
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
0.1.1 (2025-11-01)
- Updated documentation with correct installation instructions
- Added uvx support in configuration examples
- Improved README with detailed examples and responses
- Added package exclusions for cleaner distribution
0.1.0 (2025-11-01)
- Initial release
- Balance inquiry tool
- Single SMS transaction tool
- Environment-based configuration
- Comprehensive error handling
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.1.tar.gz.
File metadata
- Download URL: promotexter_mcp-0.1.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba4b65088add41f2099904ed029fa2a9b96d3cc748d5f5fffa876ce3296b11c8
|
|
| MD5 |
3873bb60f55b7a58ddbe1b9e76ab05fe
|
|
| BLAKE2b-256 |
b63f55d0bc7be1e80ea746676bf0d2f7cefd7e812dd515ff92db35365f5b9bf8
|
File details
Details for the file promotexter_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: promotexter_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 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 |
586b296ee42c3f56d54580972ebd51700141a9573acea06c9e3ff097b787c01c
|
|
| MD5 |
38762a9f804411eb3e6434042877a46a
|
|
| BLAKE2b-256 |
1dc736cb4bf5cf9a4f8a46ee9968dba08ad98d9aea04214e3265e0bb9f0a750c
|