Asterisk S2S MCP Server
MCP Server for automated conversational phone calls using Asterisk with Speech-to-Speech capabilities, allowing users to make phone conversations as easily as writing a prompt.
Tools
phone_make_call
Realizar una llamada telefónica conversacional automatizada
phone_get_status
Obtener el estado actual de una llamada telefónica
phone_get_active_calls
Obtener lista de llamadas telefónicas activas en este momento
phone_health_check
Verificar el estado de salud del sistema telefónico
phone_get_logs
Obtener logs del sistema telefónico para debugging
phone_get_last_result
Obtener el último resultado procesado de una llamada específica
phone_cancel_call
Cancelar una llamada telefónica en curso
phone_get_metrics
Obtener métricas y estadísticas del sistema telefónico
phone_get_conversation_history
Obtener el historial de conversaciones telefónicas recientes
README
🌟 Asterisk S2S MCP Server
<div align="center">
🚀 MCP Server for automated conversational phone calls using Asterisk with Speech-to-Speech
Make phone conversations as easy as a prompt! 📞✨
</div>
🏗️ System Architecture
graph TB
subgraph "MCP Client"
A[Claude Desktop] --> B[MCP Client]
end
subgraph "MCP Server"
B --> C[Asterisk S2S MCP]
C --> D[Phone Tools]
C --> E[Real-time Assistant]
end
subgraph "Backend Services"
D --> F[Asterisk Server]
E --> G[Speech-to-Speech API]
F --> H[Phone Network]
end
subgraph "Monitoring"
C --> I[Health Check]
C --> J[Metrics & Logs]
C --> K[Call History]
end
style A fill:#e1f5fe
style C fill:#f3e5f5
style F fill:#fff3e0
style G fill:#e8f5e8
📞 Phone Call Flow
sequenceDiagram
participant U as User
participant C as Claude/MCP
participant S as MCP Server
participant A as Asterisk API
participant P as Phone
U->>C: "Call John to remind about appointment"
C->>S: phone_make_call()
S->>A: POST /make-call
A->>P: Initiate call
P-->>A: Connection established
A-->>S: CallID + Status
S-->>C: Call initiated ✅
C-->>U: "📞 Call started with John"
Note over A,P: Real-time S2S conversation
A->>S: Callback with result
S->>S: Process transcript
U->>C: "How did the call go?"
C->>S: phone_get_last_result()
S-->>C: Detailed result
C-->>U: "✅ John confirmed the appointment"
🛠️ MCP Components
mindmap
root((Asterisk S2S MCP))
Core Tools
phone_make_call
phone_get_status
phone_cancel_call
Monitoring
phone_health_check
phone_get_metrics
phone_get_logs
History
phone_get_conversation_history
phone_get_active_calls
phone_get_last_result
Configuration
Environment Variables
MCP Client Config
Asterisk Integration
🚀 Installation & Usage
🎯 Option 1: NPX (Recommended)
# One command and you're ready! 🚀
npx @grec0/mcp-s2s-asterisk@latest
🔧 Option 2: Global Installation
npm install -g @grec0/mcp-s2s-asterisk
mcp-s2s-asterisk
⚙️ Step-by-Step Configuration
flowchart LR
A[1. Install MCP] --> B[2. Configure Variables]
B --> C[3. Configure MCP Client]
C --> D[4. Ready to use! 🎉]
style A fill:#ffcdd2
style B fill:#fff3e0
style C fill:#e8f5e8
style D fill:#e1f5fe
🔐 Environment Variables
# 🌐 Asterisk API URL
export PHONE_API_URL="http://192.168.4.44:8000"
# 🔑 Authentication key
export PHONE_API_KEY="api-key"
# 🔄 Callback URL for results
export MCP_CALLBACK_URL="http://localhost:3000"
📱 MCP Client Configuration
{
"mcpServers": {
"asterisk-s2s": {
"command": "npx",
"args": ["@grec0/mcp-s2s-asterisk@latest"],
"env": {
"PHONE_API_URL": "http://192.168.4.44:8000",
"PHONE_API_KEY": "api-key",
"MCP_CALLBACK_URL": "http://localhost:3000"
}
}
}
}
🧰 Available Tools
<table> <tr> <td width="50%">
📞 Calls
- 🔥
phone_make_call- Make phone calls - 📊
phone_get_status- Get call status - ❌
phone_cancel_call- Cancel calls - 📱
phone_get_active_calls- Active calls
</td> <td width="50%">
📈 Monitoring
- ❤️
phone_health_check- System health - 📊
phone_get_metrics- Advanced metrics - 📝
phone_get_logs- Detailed logs - 🗂️
phone_get_conversation_history- History
</td> </tr> </table>
💡 Use Cases
graph LR
subgraph "Automation"
A[Appointment<br/>Reminders]
B[Booking<br/>Confirmations]
C[Automated<br/>Surveys]
end
subgraph "Support"
D[Customer<br/>Service]
E[Ticket<br/>Follow-up]
F[Data<br/>Verification]
end
subgraph "Sales"
G[Automated<br/>Prospecting]
H[Lead<br/>Follow-up]
I[Customer<br/>Qualification]
end
style A fill:#ffcdd2
style B fill:#f8bbd9
style C fill:#e1bee7
style D fill:#c5cae9
style E fill:#bbdefb
style F fill:#b3e5fc
style G fill:#b2dfdb
style H fill:#c8e6c9
style I fill:#dcedc8
🔄 Call States
stateDiagram-v2
[*] --> Starting
Starting --> Connecting: API Request
Connecting --> Speaking: Connection OK
Connecting --> Failed: No answer
Speaking --> Completed: Conversation OK
Speaking --> Cancelled: User Cancel
Completed --> [*]
Failed --> [*]
Cancelled --> [*]
note right of Speaking : Real-time<br/>Speech-to-Speech
note right of Completed : Result processed<br/>and saved
📖 Complete Usage Example
🎬 Scenario: Medical Appointment Confirmation
// 1️⃣ User tells Claude:
"Call María González at 555-0123 to confirm her appointment tomorrow at 3pm"
// 2️⃣ Claude automatically uses:
phone_make_call({
usuario: "María González",
telefono: "555-0123",
proposito: "Confirm medical appointment for tomorrow 3pm",
timeout: 60
})
// 3️⃣ Automatic result:
"✅ Call completed. María confirmed her appointment for tomorrow at 3pm.
She also asked to change the time to 2:30pm if possible."
🚦 Monitoring Dashboard
pie title Call Distribution by Status
"Completed" : 65
"In Progress" : 15
"Failed" : 12
"Cancelled" : 8
xychart-beta
title "Daily Calls (Last Week)"
x-axis [Mon, Tue, Wed, Thu, Fri, Sat, Sun]
y-axis "Number of Calls" 0 --> 50
bar [23, 34, 28, 41, 38, 15, 8]
🔧 Local Development
📋 Requirements
- 🟢 Node.js >= 18.0.0
- 📦 npm or pnpm
- 🔧 TypeScript
🛠️ Quick Setup
# 📥 Clone repository
git clone <repository-url>
cd mcp-s2s-asterisk
# 📦 Install dependencies
npm install
# 🔨 Build project
npm run build
# 🚀 Run server
npm run start
📋 Available Scripts
| Script | Description | Command |
|---|---|---|
| 🔨 | Compile TypeScript | npm run build |
| 👀 | Development mode | npm run dev |
| 🧪 | Run tests | npm run test |
| 🔍 | MCP Inspector | npm run inspector |
| 📦 | Release patch | npm run release:patch |
📊 Performance Metrics
graph TB
subgraph "Response Time"
A[Connection: ~2s]
B[Establishment: ~3s]
C[Conversation: Variable]
D[Processing: ~1s]
end
subgraph "Success Rates"
E[Connection: 95%]
F[Completed: 87%]
G[Satisfaction: 92%]
end
style E fill:#c8e6c9
style F fill:#c8e6c9
style G fill:#c8e6c9
🔒 Security & Compliance
- 🔐 Authentication: Mandatory API Key
- 🛡️ Encryption: TLS/SSL in transit
- 📝 Logs: Complete call auditing
- 🔒 Privacy: Locally processed data
- ✅ GDPR: Privacy compliance
🤝 Contributing
<div align="center">
Do you like the project? We'd love your contribution!
</div>
📄 License
<div align="center">
MIT License - Use it, modify it, distribute it freely
</div>
<div align="center">
🌟 Give it a star if you like the project! ⭐
Made with ❤️ by @grec0
Transforming phone communication with conversational AI
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。