AI-Native SMS Assistant (V1)
An AI-powered SMS assistant that integrates with MessageMedia to send, receive, and manage SMS conversations. Built with Node.js and OpenAI’s GPT-4, it provides real-time context-aware messaging and a user-friendly dashboard.
Features
- Send SMS: Send messages via the
/send
endpoint. - Receive & Auto-Reply: Handle incoming messages with GPT-generated responses.
- Contextual Insights: Retrieve conversation context through the
/context
endpoint. - Dashboard: Visualize message logs and statuses.
- Chat Interface: Interact with the assistant via a web-based chat UI.
- Function Schema: OpenAI-compatible function schema for integration.
Installation
Clone the repository:
git clone https://github.com/larryfang/sms-mcp cd sms-mcp
Install dependencies:
npm install
Configure environment variables:
Create a
.env
file in the root directory and add the following:OPENAI_API_KEY=your_openai_api_key MESSAGE_API_KEY=your_messagemedia_api_key MESSAGE_API_SECRET=your_messagemedia_api_secret MESSAGE_BASE_URL=https://api.messagemedia.com MCP_SERVER_URL=http://localhost:3000
Start the server:
node index.js
The server will be running at
http://localhost:3000
.
Usage
Send SMS:
POST /send { "messages": [ { "destination_number": "+61400000000", "content": "Hello, this is a test message." } ] }
Retrieve Context:
POST /context { "phone_number": "+61400000000" }
Access Dashboard:
Navigate to
http://localhost:3000/dashboard
to view message logs.Chat Interface:
Open
http://localhost:3000/chat.html
in your browser to interact with the assistant.
Project Structure
index.js
: Main server file with route implementations.public/
: Static files includingchat.html
.conversations/
: Stored conversation logs per user.webhook-log.json
: Logs of incoming and outgoing messages.
Architecture
Overview
The AI-Native SMS Assistant is designed to facilitate seamless SMS communication by integrating OpenAI’s GPT-4 for intelligent responses and MessageMedia for message delivery.
Components
Express Server (
index.js
)- Endpoints:
/send
,/context
,/webhook/reply
,/webhook/delivery
,/dashboard
,/meta
,/function-schema
.
- Endpoints:
OpenAI Integration
- Generates context-aware responses and classifies user intents.
MessageMedia Integration
- Sends and receives SMS messages and delivery reports.
Chat Interface (
public/chat.html
)- Web-based interface for interacting with the assistant.
Data Flow
- Sending Messages → via
/send
- Receiving & Auto-reply → via
/webhook/reply
- Context Retrieval → via
/context
- Logs UI → via
/dashboard
- Chat + Function Calls → via
/chat.html
Demo Script
Duration: ~5 minutes
Introduction
“Welcome to the AI-Native SMS Assistant demo. Today, we’ll showcase how this assistant streamlines SMS communications using OpenAI’s GPT-4 and MessageMedia.”
Sending an SMS
“We’ll use the /send
endpoint to dispatch a greeting to a user.”
Receiving and Auto-Replying
“Simulate an incoming message. The assistant processes it and replies intelligently.”
Retrieving Conversation Context
“Use the /context
endpoint to view message history and delivery reports.”
Exploring the Dashboard
“Visit /dashboard
to explore message logs visually.”
Chat Interface
“Interact naturally via chat.html
. It detects phone numbers, triggers GPT tools, and shows results contextually.”
License
MIT License
AI-Powered MCP Server
Project Details
- larryfang/sms-mcp
- Last Updated: 4/15/2025
Recomended MCP Servers
Enable AI assistants to interact directly with Bitcoin Ordinals inscriptions. Seamlessly integrates with Goose and Claude Desktop to...
MCP server for RAG-based document search and management
A Model Context Protocol (MCP) server for integrating Perplexity's AI API with LLMs.
A repository for MarkLogic MCP integration
MCP server for usegrant
A lightweight Model Context Protocol (MCP) server that enables your LLM to validate email addresses. This tool checks...
服务器、网络设备巡检和运维MCP工具
A MCP server providing realistic browser-like HTTP request capabilities with accurate TLS/JA3/JA4 fingerprints for bypassing anti-bot measures. It...
A Model Context Protocol (MCP) server that enables AI assistants to interact with HubSpot CRM data, providing built-in...
A VMware ESXi/vCenter management server based on MCP (Model Control Protocol), providing simple REST API interfaces for virtual...
A long-term memory storage system for LLMs using the Model Context Protocol (MCP) standard. This system helps LLMs...