WebRTC MCP Chat Server
About
A remote WebRTC chat server with secure temporary rooms and MCP support for background agents.
Details
- Author
- brysgo
- Categories
- Communication, Other
Jump to
Setup
Install WebRTC MCP Chat Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/brysgo/webrtc-mcp-chat
Follow the installation instructions in the repository README, then restart your MCP client.
A remote WebRTC chat server with secure temporary rooms and MCP support for background agents.
Aremote-firstWebRTC chat server withsecure temporary roomsand full MCP (Model Context Protocol) support, designed for background agents and real-time communication.
πSecure Temporary Rooms- Cryptographically secure, auto-expiring chat rooms
πRemote Deployment Ready- Deploy to Railway, Vercel, Render, Heroku in minutes
π€Background Agent Support- Perfect for CI/CD, service coordination, and automation
π‘οΈNo Local Config Required- Zero-configuration MCP integration
β‘CLI Tool Included- Command-line interface for agents and scripts
# Install globally npm install -g webrtc-mcp-chat # Create secure temporary room (multiple command options) webrtc-mcp-chat create --expires 60 --created-by my-agent # or: chat-room create --expires 60 --created-by my-agent # Use MCP server with Cursor webrtc-chat-mcp
# Create secure temporary room npx webrtc-mcp-chat create --expires 60 --created-by my-agent # Use MCP server npx -p webrtc-mcp-chat webrtc-chat-mcp
# 1. Deploy to remote server (choose one) npm install -g @railway/cli && railway up # or: vercel --prod # or: Connect to Render/Heroku via GitHub # 2. Set remote server URL export CHAT_SERVER_URL=https://your-deployed-app.com # 3. Use the CLI tool for secure communication chat-room create --expires 60 --created-by my-agent chat-room join <roomId> <token> <username> chat-room send <roomId> <token> <username> "Hello secure world!"
Just visit your deployed server URL - no setup required!
For Local Development with Remote Access
# Option 1: ngrok (recommended) npm run dev:ngrok # Option 2: Cloudflare Tunnel (free) npm run dev:cloudflare # Option 3: localtunnel (simple) npm run dev:localtunnel # Then use the tunnel URL for remote agents export CHAT_SERVER_URL=https://your-tunnel-url.com chat-room create --expires 60 --created-by local-agent
After installing globally, add to your MCP configuration:
{ "mcpServers": { "webrtc-chat": { "command": "webrtc-chat-mcp", "env": { "CHAT_SERVER_URL": "https://your-deployed-app.com" } } } }
{ "mcpServers": { "webrtc-chat": { "command": "npx", "args": ["webrtc-mcp-chat"], "env": { "CHAT_SERVER_URL": "https://your-deployed-app.com" } } } }
- π€ Background agent coordination
- π CI/CD pipeline notifications
- π Service-to-service communication
- β‘ Temporary collaboration channels
- π Secure inter-process messaging
- π‘ Remote system monitoring
- 256-bit cryptographic tokensfor room access
- 128-bit secure room IDs
- Automatic expirationand cleanup (1 hour to 24 hours)
- Server-side validationfor all operations
- No persistent storage- stateless design
- Zero-configurationsecurity
- Tunnel-ready- Automatic ngrok header support (bypasses browser warnings)
- URL normalization- Handles trailing slashes automatically
- Comprehensive testing- Built-in tests for header functionality
SeeREMOTE_DEPLOYMENT.mdfor detailed instructions.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β Web Users β β MCP/Cursor Usersβ β Background β β β β β β Agents/CLI β βββββββββββββββββββ€ βββββββββββββββββββ€ βββββββββββββββββββ€ β β’ Video/Audio β β β’ Text Chat β β β’ API Calls β β β’ Screen Share β β β’ MCP Tools β β β’ CLI Commands β β β’ WebRTC P2P β β β’ Resources β β β’ HTTP/REST β βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ β β β ββββββββββββββββββββββββΌβββββββββββββββββββββββ β βββββββββββββββββββ β Chat Server β β (Remote) β βββββββββββββββββββ€ β β’ Socket.IO β β β’ HTTP/REST API β β β’ WebRTC Signal β β β’ Temp Rooms β β β’ Auto Cleanup β βββββββββββββββββββ
The included CLI tool provides everything background agents need:
# Create secure temporary room chat-room create --expires 120 --created-by agent-1 # Join room with credentials chat-room join <roomId> <token> <username> # Send secure messages chat-room send <roomId> <token> <username> "Hello world" # Get room information chat-room info <roomId> <token> # Check server health chat-room health # Interactive mode for agents chat-room interactive
# Agent 1: Create room ROOM_INFO=$(chat-room create --expires 60 --output json) ROOM_ID=$(echo $ROOM_INFO | jq -r '.roomId') ROOM_TOKEN=$(echo $ROOM_INFO | jq -r '.roomToken') # Agent 2: Join and communicate chat-room join $ROOM_ID $ROOM_TOKEN agent-2 chat-room send $ROOM_ID $ROOM_TOKEN agent-2 "Task complete"
#!/bin/bash # In your pipeline ROOM_INFO=$(chat-room create --expires 30 --created-by ci-pipeline --output json) echo "Deployment room: $(echo $ROOM_INFO | jq -r '.joinUrl')" chat-room send $(echo $ROOM_INFO | jq -r '.roomId') \ $(echo $ROOM_INFO | jq -r '.roomToken') \ ci-bot "Deployment started for ${COMMIT_SHA}"
// Node.js service const response = await fetch(${CHAT_SERVER}/api/create-temp-room, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ expiresInMinutes: 30, createdBy: 'service-a' }) }); const { roomId, roomToken } = await response.json(); // Share credentials with other services
- Room Creation: ~10ms
- Message Delivery: ~5ms
- Health Checks: ~2ms
- Memory per Room: ~1KB
- Concurrent Users: 1000+ per instance
- Stateless Design- No database required
- Memory-Only Storage- Fast and efficient
- Auto-Cleanup- Expired rooms automatically removed
- Load Balancer Ready- Health check endpoint included
- Multi-Instance- Use sticky sessions for WebSockets
{ "status": "healthy", "serverUrl": "https://your-app.com", "remoteMode": true, "activeRooms": 5, "temporaryRooms": 3, "connectedUsers": 12 }
- REMOTE_DEPLOYMENT.md- Complete deployment guide
- LOCAL_REVERSE_PROXY.md- Local server with reverse proxy tunnels
- CURSOR_SETUP.md- Cursor IDE integration
- Web Interface- Built-in at server root URL
- Health Endpoint-/healthfor monitoring
- API Documentation- Available via MCP resources
- Use HTTPSin production deployments
- Rotate tokensfor long-running agents
- Monitor healthendpoints regularly
- Set appropriate expirationtimes for rooms
- Use environment variablesfor server URLs
- Implement rate limitingif needed
# Railway (Recommended) railway up # Vercel vercel --prod # Test deployment export CHAT_SERVER_URL=https://your-deployed-app.com chat-room health # Test ngrok header functionality npm run test:ngrok-headers
We welcome contributions! Areas of interest:
- Additional deployment platforms
- Enhanced security features
- Performance optimizations
- More CLI commands
- Integration examples
MIT License - see LICENSE file for details.
Ready to deploy secure, temporary chat rooms for your background agents?
Then:chat-room create --expires 60 --created-by my-agent
πYour agents can now communicate securely!
An AI voice toolkit with TTS, voice cloning, and video translation, now available as an MCP server for smarter agent integration.
Connect your AI agents to Google-Meet, Zoom & Microsoft Teams through tl;dv
Upfirst is an AI phone receptionist for small businesses. Review call transcripts, then fix the greeting, knowledge, and transfer rules from your AI client.
A server for text-to-speech generation using the AivisSpeech engine.
Provides audio input and output capabilities for AI assistants.
A Node.js MCP server for the Japanese text-to-speech software Bouyomi-chan.
Enables communication between multiple AI characters with simultaneous voice playback using VLC.
Generates text-to-speech audio with automatic playback using the Chatterbox TTS model.
Add real-time chat, voice and video calling, AI agents & moderation to your app.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




