# π± Sinch MCP GPT SMS Server
An AI-native SMS assistant powered by GPT and MessageMedia β now with a live SMS report dashboard!
## β Features
- Send and receive SMS via GPT
- View full SMS conversation history
- Auto-reply via GPT using webhook
- Contextual memory per phone number
- MCP-compliant with `/meta` and `/function-schema`
- LangChain agent integration
- π Live SMS Report Dashboard (NEW!)
## π Live Dashboard Preview
Below is a screenshot of the embedded high bar chart showing SMS volume:

## π§ Architecture Overview
```plaintext
User β chat.html
β
GPT Chat Server (OpenAI-router.js)
β (tool calls)
MCP Server (index.js)
β
MessageMedia SMS API
```
- `index.js`: Core MCP server, webhook processor, `/context` + `/send` + `/report` endpoints
- `Openai-router.js`: ChatGPT proxy handling tool calls via OpenAI Functions
- `chat.html`: Interactive frontend for messaging and tools
- `sms_report_live_dashboard.html`: Live chart using `/report`
## π οΈ How to Run
```bash
npm install
OPENAI_API_KEY=your_key node start-all.js
```
- Access Chat UI: [http://localhost:3000/chat.html](http://localhost:3000/chat.html)
- Access Report Dashboard: [http://localhost:3000/sms_report_live_dashboard.html](http://localhost:3000/sms_report_live_dashboard.html)
## π Folder Structure
```plaintext
.
βββ index.js # MCP Server
βββ Openai-router.js # GPT Chat Interface
βββ webhook-log.json # Legacy logs (if not using MessageMedia)
βββ chat.html # GPT chat client
βββ sms_report_live_dashboard.html # Dashboard with Chart.js
βββ langchain_mcp_agent.py # LangChain integration script
βββ .env # Environment variables
βββ public/
β βββ sms_report_preview.png # Chart screenshot
```
## π¦ Tools
- [x] `get_sms_context`
- [x] `send_sms`
- [x] `show_sms_report` (NEW)
## π Roadmap
- π Auto-classification of replies
- π Sentiment + urgency scoring
- π€ Unified Copilot with webhook/CLI/chat
## π SMS Report Chart
A new feature has been added to display a live dashboard of SMS volume by day.
You can now ask in the `chat.html` interface:
> "Show me my report history of +61412345678"
The assistant will respond with an embedded report like this:
