How 1fancy/sms8-sms-gateway works
SMS8 is an SMS/OTP gateway exposed through an MCP server, with companion CLI, web, React, native-plugin, and mobile-SDK interfaces. The primary workflow is an AI client calling an MCP tool: the PHP entry point dispatches JSON-RPC, the registry authenticates and invokes a tool handler, and SMS8 routes messaging through a paired Android phone. The README documents the broader product capabilities and client packages. Several tool implementations and package internals were not excerpted, so their connections are shown only where the README or source index supports them.
Main entry points: ToolRegistry.php Tool registry · index.php HTTP entry · SMS8.kt Android SDK · SMS8.swift Swift SDK
Components 28
MCP server
- HTTP entry
index.php - JSON-RPC dispatch
lib/JsonRpc.php - Tool registry
lib/ToolRegistry.php - API-key auth
lib/Auth.php
Gateway tools
- Setup context
tools/setup_sms8.php - Send SMS
tools/send_sms.php - Send OTP
tools/send_otp.php - Verify OTP
tools/send_otp.php - Wait for OTP
tools/wait_for_otp.php - Read messages
tools/get_messages.php - List devices
tools/list_devices.php - Check balance
tools/get_balance.php - Configure webhook
tools/create_webhook.php
Client packages
- MCP launcher
npm-packages/sms8-mcp/bin/sms8-mcp.js - SMS command-line clients
npm-packages/sms8-cli/bin/sms8.js - React OTP hook
npm-packages/react-sms-otp/src/react.tsx - OTP form
npm-packages/react-sms-otp/src/OtpForm.tsx - OTP input
npm-packages/react-sms-otp/src/OtpInput.tsx - Capacitor plugin
npm-packages/capacitor-sms-otp-send-verify/src/definitions.ts - Cordova plugin
npm-packages/cordova-plugin-sms-otp-send/www/SmsOtp.js
Mobile SDKs
- Android SDK
sdks/sms8-android/sms8/src/main/java/io/sms8/SMS8.kt - Android autofill
sdks/sms8-android/sms8/src/main/java/io/sms8/autofill/SMSRetriever.kt - Swift SDK
sdks/sms8-swift/Sources/SMS8/SMS8.swift - iOS OTP field
sdks/sms8-swift/Sources/SMS8/OTPTextField.swift
Web presence
- Documentation pages
pages/api.php
Other components
- AI coding tool
- SMS8 platform
- Paired Android phone
Connections 29
- AI coding tool → HTTP entry: calls MCP
README.md - HTTP entry → JSON-RPC dispatch: dispatches
index.php - HTTP entry → Tool registry: loads tools
index.php - JSON-RPC dispatch → Tool registry: routes tool calls
lib/JsonRpc.php - Tool registry → API-key auth: authenticates
lib/ToolRegistry.php - Tool registry → Setup context: invokes
tools/setup_sms8.php - Tool registry → Send SMS: invokes
- Tool registry → Send OTP: invokes
- Tool registry → Verify OTP: invokes
- Tool registry → Wait for OTP: invokes
tools/wait_for_otp.php - Tool registry → Read messages: invokes
- Tool registry → List devices: invokes
- Tool registry → Check balance: invokes
- Tool registry → Configure webhook: invokes
tools/create_webhook.php - Send SMS → SMS8 platform: sends through
README.md - Send OTP → SMS8 platform: sends through
README.md - Wait for OTP → Paired Android phone: waits for code
README.md - SMS8 platform → Paired Android phone: routes SMS
README.md - AI coding tool → MCP launcher: launches
README.md - SMS command-line clients → SMS8 platform: uses gateway
README.md - React OTP hook → SMS8 platform: calls MCP API
- OTP form → OTP input: renders
npm-packages/react-sms-otp/src/OtpForm.tsx - Capacitor plugin → SMS8 platform: provides OTP access
README.md - Cordova plugin → SMS8 platform: provides OTP access
README.md - Android SDK → SMS8 platform: uses API
README.md - Android SDK → Android autofill: offers autofill
README.md - Swift SDK → SMS8 platform: uses API
README.md - Swift SDK → iOS OTP field: offers autofill field
README.md - Documentation pages → AI coding tool: documents integration
pages/api.php