CARRIER TRUNKS: 24 ACTIVE | GATEWAY: D1 EDGE REPLICATED | SYSTEM STATUS: OPERATIONAL
MODEL CONTEXT PROTOCOL (MCP) READY

Multi-Tenant Virtual Carrier Pools

Architecting multi-tenant SMS testing for B2B SaaS. Isolate customer verification environments using dedicated virtual numbers.

tenant_pool.py
Architecture / SaaS
def get_tenant_test_inbox(tenant_id: str) -> str:
    # Lookup dedicated synthetic inbox by workspace tenant
    inbox = SyntheticInbox.objects.filter(workspace__workspace_slug=tenant_id).first()
    return inbox.phone_number if inbox else "+12025550101"
docker-compose.yml
REST API v1
services:
  test-worker:
    environment:
      SMSRIVER_TENANT_ID: "tenant_enterprise_beta"
      SMSRIVER_API_KEY: "${SMSRIVER_API_KEY}"

Implementation Walkthrough

1

Separate Failure & Security Domains

Avoid shared public inboxes for sensitive enterprise customer test runs (AGENTS.md Rule 16).

2

Allocate Dedicated Virtual Lines

Assign distinct E.164 phone numbers to each tenant to prevent cross-customer message collisions.

3

Enforce Granular Log Retention

Configure tenant-specific data retention purges complying with SOC 2 and GDPR requirements.

Supported MCP Agent Tools

list_countries
alias: sms_list_numbers

Discover supported countries, inventory counts, and carrier capabilities by source type.

get_number_capabilities
alias: sms_get_capabilities

Check line types, SMS capabilities, carrier limitations, and rental costs for a phone number or ISO country.

create_test_inbox
alias: sms_create_inbox

Create an isolated synthetic test inbox for deterministic webhook integration testing without real carriers.

generate_test_sms
aliases: sms_generate_sms, sms_create_synthetic_message

Inject zero-carrier-cost synthetic SMS inbound events directly into webhook endpoints for CI/CD test automation.

simulate_delivery_failure
alias: sms_simulate_failure

Simulate carrier drops, 10DLC rejections, DND blocks, and queue timeouts to verify retry handling.

inspect_webhook_events
alias: sms_inspect_webhooks

Query recorded test events, delivery status, latency, and raw carrier webhook payloads within plan retention.

replay_test_event
alias: sms_replay_event

Replay an existing test event to re-trigger local webhooks or reproduce failed integration test cases.

get_usage_summary
alias: sms_get_usage

Inspect current billing plan, monthly quota, consumed requests, and remaining units across REST and MCP.

Copied to clipboard