Model Context Protocol (MCP) enables LLMs to query available phone numbers, inspect inboxes, and test verification flows autonomously via standardized tools.
The Model Context Protocol (MCP), created by Anthropic, establishes an open standard for connecting AI assistants to external developer tools and data sources. This guide details how SMSRiver's native MCP server enables autonomous AI agents (such as Claude Code and Cursor) to interact with phone verification inboxes directly.
1 Core MCP Telephony Tools
SMSRiver exposes 8 standard MCP tools:
1. list_countries: Query available global country pools and active trunk counts.
2. get_active_numbers: Retrieve provisioned phone numbers for a target country.
3. inspect_inbox: Fetch received SMS messages with sender, timestamp, and body.
4. extract_otp: Parse verification codes and magic links from recent messages.
5. generate_synthetic_sms: Inject simulated carrier events for deterministic testing.
6. calculate_segments: Compute GSM-7 vs UCS-2 billable segment math.
7. validate_webhook_payload: Validate JSON payloads against Twilio/Telnyx schemas.
8. check_system_health: Inspect carrier latency and gateway peering metrics.
2 MCP Configuration for Claude Desktop & Claude Code
{
"mcpServers": {
"smsriver": {
"command": "npx",
"args": ["-y", "@smsriver/mcp-server"],
"env": {
"SMSRIVER_API_KEY": "sk_live_your_api_key_here"
}
}
}
}Frequently Asked Questions • Model Context Protocol & AI Agents
SMSRiver supports both local stdio transport (for local CLI coding assistants) and remote Server-Sent Events (SSE) for cloud agent architectures.