Restream MCP Server for Multi-Platform Stream Management
Manage multi-platform live streams with the Restream MCP server, control channels, and access real-time streaming analytics.
npx -y @shaktech786/restream-mcp-serverOverview
Restream MCP Server is a lightweight API server that helps teams manage multi-platform live streaming workflows and collect real-time analytics. It centralizes control of streaming channels and abstracts platform-specific operations (start/stop streams, update destinations), while providing unified metrics about stream health and audience engagement across destinations.
Designed for developers and operations teams, the server acts as a control plane and telemetry collector: it exposes REST endpoints for channel and stream management, and provides real-time analytics feeds (WebSocket / SSE) for dashboards or automation. This makes it easier to build monitoring tools, automate stream actions, and integrate streaming data into analytics pipelines without dealing with each platform’s API directly.
Features
- Channel management: create, update, list, and delete stream channels and destinations
- Stream control: start, stop, and schedule streams across multiple platforms
- Real-time telemetry: WebSocket / Server-Sent Events (SSE) feeds for live metrics
- Unified analytics: aggregated metrics (viewers, bitrate, dropped frames) across destinations
- Authentication: API key / token-based access control
- Extensible configuration: plugin hooks or connectors for new streaming platforms
- Docker-friendly: run as a container for production deployments
- Logging and metrics: request logging and basic observability hooks
Installation / Configuration
Clone the repository and install dependencies (Node.js example):
Create a .env file with required variables (example):
PORT=3000
API_KEY=supersecretapikey
MONGO_URI=mongodb://localhost:27017/restream
LOG_LEVEL=info
WEBSOCKET_PATH=/ws
Start the server in development:
# or
Run with Docker:
Configuration notes:
- API_KEY (or token provider) secures administrative endpoints.
- MONGO_URI (or other DB connection) stores channel and analytics metadata.
- You can swap persistence to Redis or another store by editing the connector layer in configuration.
Available Tools / Resources
- REST HTTP API (JSON) — primary interface for management operations
- WebSocket / SSE endpoint — subscribe to live telemetry and events
- OpenAPI / Swagger (if provided) — use for client generation and interactive testing
- Postman collection (optional) — ready-made requests for common workflows
- Example client snippets — cURL, Node.js, and browser WebSocket examples inside the repo
Sample endpoints overview:
| Method | Path | Purpose |
|---|---|---|
| POST | /api/channels | Create a channel with destinations |
| GET | /api/channels | List channels |
| GET | /api/channels/:id | Get channel details |
| PUT | /api/channels/:id | Update channel configuration |
| DELETE | /api/channels/:id | Remove channel |
| POST | /api/streams/:channelId/start | Start stream on channel |
| POST | /api/streams/:channelId/stop | Stop stream on channel |
| GET | /api/analytics/:channelId | Fetch recent aggregated metrics |
| WS/SSE | /ws or /events | Real-time telemetry feed |
Authentication: pass an API key in the Authorization header:
Authorization: Bearer <API_KEY>
Use Cases
Centralized Stream Control for a Production Studio
- Use the MCP server to store channel destinations (YouTube, Twitch, Facebook) and trigger start/stop commands from a single dashboard. Schedule automated start/stop during events to ensure consistent multi-platform distribution.
Live Monitoring Dashboard
- Connect a dashboard (Grafana, custom React app) to the server’s WebSocket feed to visualize viewers, bitrate, and dropped frames in real time. Configure alerts when bitrate drops or audience count falls below thresholds.
Automated Failover and Recovery
- Subscribe to telemetry events and implement a small automation worker that reroutes a destination or restarts the stream when the server reports persistent errors for a particular platform. This reduces manual intervention during live events.
Analytics Pipeline for Post-Event Reporting
- Collect aggregated session metrics via the analytics endpoints and export them to a data warehouse. Correlate viewership and quality metrics with marketing or user segments to inform future streaming strategies.
Integrations with CI/CD or Scheduling Tools
- Trigger stream configuration updates as part of a CI/CD pipeline (e.g., update destinations for a new release) or integrate with calendar-based scheduling services to automate event streams.
Examples
Create a channel (curl):
Subscribe to real-time telemetry (wscat example):
# Receive JSON messages for telemetry events
Fetch analytics:
For full reference and source code, see the project repository: https://github.com/shaktech786/restream-mcp-server.