Voice Assistant MCP Demo
Provides a backend API for an Android voice assistant app, handling command processing, session management, and task interactions via a push-to-talk interface.
Integrates with Google's Gemini API for natural language processing of voice commands, enabling the gateway to interpret user intent and generate Vietnamese responses.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Voice Assistant MCP Demoviệc hôm nay có gì"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Voice Assistant MCP Demo — Phase 1: Cloud Backend
Ba service Python chạy độc lập, kết nối qua URL env vars.
api_server → mcp_server → gateway ← Android app / curlChạy local (test Phase 1)
pip install -r requirements.txt
cp .env.example .env # điền GEMINI_API_KEY và GATEWAY_SHARED_TOKEN
# Terminal 1
python api_server.py # :8000
# Terminal 2
python mcp_server.py # :8001 (MCP_BASE_URL=http://localhost:8000 đã có trong .env)
# Terminal 3
python gateway.py # :8002Test bằng curl:
# Không có auth token (để trống GATEWAY_SHARED_TOKEN trong .env khi test local)
curl -X POST http://localhost:8002/command \
-H "Content-Type: application/json" \
-d '{"text": "việc hôm nay có gì", "session_id": "test-1"}'
# Kết quả mong đợi:
# {"speech": "Hôm nay bạn có 4 việc, trong đó 3 việc chưa xong...", "session_id": "test-1"}
# Multi-turn — follow-up cùng session
curl -X POST http://localhost:8002/command \
-H "Content-Type: application/json" \
-d '{"text": "đánh dấu xong việc gọi khách hàng", "session_id": "test-1"}'Related MCP server: Dokploy MCP Server
Deploy lên Render (3 service riêng)
Bước 1 — Push repo lên GitHub
git init && git add . && git commit -m "init phase 1"
git remote add origin <your-github-repo-url>
git push -u origin mainBước 2 — Tạo Service 1: API Server
Render Dashboard → New → Web Service → chọn repo
Name:
task-apiBuild Command:
pip install -r requirements.txtStart Command:
python api_server.pyEnvironment Variables:
PORT→ để Render tự điền
Sau khi deploy xong, copy URL dạng https://task-api-xxxx.onrender.com.
Bước 3 — Tạo Service 2: MCP Server
Name:
task-mcpStart Command:
python mcp_server.pyEnvironment Variables:
API_BASE_URL→ URL của Service 1 (bước 2)
Sau khi deploy, copy URL: https://task-mcp-xxxx.onrender.com.
Bước 4 — Tạo Service 3: Gateway
Name:
task-gatewayStart Command:
python gateway.pyEnvironment Variables:
MCP_BASE_URL→ URL của Service 2 (bước 3)GEMINI_API_KEY→ key từ Google AI StudioGATEWAY_SHARED_TOKEN→ chuỗi ngẫu nhiên (dùngopenssl rand -hex 16)
Bước 5 — Test end-to-end trên cloud
GATEWAY_URL=https://task-gateway-xxxx.onrender.com
TOKEN=your_shared_token
curl -X POST $GATEWAY_URL/command \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $TOKEN" \
-d '{"text": "việc hôm nay có gì", "session_id": "s1"}'Lưu ý cold-start: Render free tier ngủ sau 15 phút idle. Request đầu tiên mất ~30s. Chấp nhận được cho demo.
Biến môi trường tổng hợp
Service | Biến | Bắt buộc | Ghi chú |
api_server |
| auto | Render tự set |
mcp_server |
| auto | |
mcp_server |
| ✓ | URL của api_server |
gateway |
| auto | |
gateway |
| ✓ | URL của mcp_server |
gateway |
| ✓ | Google AI Studio |
gateway |
| khuyến nghị | Bảo vệ endpoint public |
Cấu trúc request/response gateway
POST /command
Headers: X-Auth-Token: <token> (nếu có GATEWAY_SHARED_TOKEN)
Body:
{
"text": "lệnh giọng nói đã chuyển thành text",
"session_id": "uuid-từ-app"
}Response:
{
"speech": "Câu trả lời tiếng Việt tự nhiên để đọc lên",
"session_id": "uuid-từ-app"
}Session tự reset sau 30 phút không có request.
Mốc Phase 1 ✓
curl POST /command {"text": "việc hôm nay có gì"}
→ {"speech": "Hôm nay bạn có ..."}Khi test xong → sang Phase 2 (Android push-to-talk).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nhattan-dev/voice-assistant-mcp-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server