get_icecast_best_practices
Get tailored Icecast configuration recommendations based on listener count: small (under 50), medium (50-500), or large (500+). Optimize streaming server performance and reliability for your audience size.
Instructions
Get general best practices and recommendations for Icecast configuration based on use case
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"useCase": "<useCase>"
},
"name": "get_icecast_best_practices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| useCase | Yes | Use case: 'small' (< 50 listeners), 'medium' (50-500 listeners), 'large' (500+ listeners) |
Implementation Reference
- src/index.ts:340-354 (registration)Tool registration in the ListToolsRequestHandler, defining the tool name, description, and input schema with a 'useCase' enum parameter.
{ name: "get_icecast_best_practices", description: "Get general best practices and recommendations for Icecast configuration based on use case", inputSchema: { type: "object", properties: { useCase: { type: "string", description: "Use case: 'small' (< 50 listeners), 'medium' (50-500 listeners), 'large' (500+ listeners)", enum: ["small", "medium", "large"], }, }, required: ["useCase"], }, }, - src/index.ts:400-532 (handler)Handler logic that receives the useCase argument and returns pre-defined best practices markdown content for small, medium, or large Icecast deployments.
if (name === "get_icecast_best_practices") { const useCase = args.useCase as string; const practices: Record<string, string> = { small: `# Best Practices for Small Streams (< 50 listeners) ## Limits - clients: 64-128 - sources: 4 - queue-size: 524288 (512KB) - burst-size: 65535 (64KB) - threadpool: 4-8 ## Security - Always set source-password and admin-password - Change admin username from default 'admin' - Use strong passwords (16+ characters) ## Mount Points - Configure explicit mount point with metadata - Set fallback mount for reliability - Consider dump-file for recording ## Performance - Keep log level at 3 (info) or lower - Enable log archiving - Monitor log files regularly ## Behind Reverse Proxy - Set use-x-forwarded-for to 1 - Configure hostname to your domain - Let proxy handle SSL/TLS`, medium: `# Best Practices for Medium Streams (50-500 listeners) ## Limits - clients: 256-512 - sources: 8 - queue-size: 1048576 (1MB) - burst-size: 131072 (128KB) - threadpool: 16-32 ## Security - Use strong unique passwords - Consider IP-based restrictions for admin - Enable relay authentication if using relays - Regular password rotation ## Mount Points - Multiple mount points for different bitrates - Fallback mounts configured - Consider on-demand relays for scaling ## Performance - Monitor resource usage - Consider multiple listen-sockets if needed - Use appropriate timeouts (client: 30s) - Enable burst-on-connect for better UX ## Reliability - Set up monitoring/alerts - Regular log analysis - Consider backup stream source ## Behind Reverse Proxy - use-x-forwarded-for: 1 - Proper hostname configuration - Load balancing if needed`, large: `# Best Practices for Large Streams (500+ listeners) ## Limits - clients: 1024-2048+ - sources: 16+ - queue-size: 2097152+ (2MB+) - burst-size: 262144+ (256KB+) - threadpool: 32-64 ## Security - Strict authentication on all endpoints - IP whitelisting for admin access - Separate relay passwords - Regular security audits ## Architecture - Multiple Icecast instances with load balancing - Relay/edge servers for geographic distribution - Dedicated source server - CDN integration consideration ## Mount Points - Multiple bitrate options - Separate mobile/desktop streams - Fallback chain configured - Metadata management system ## Performance - Dedicated hardware/VMs - Network bandwidth monitoring - Multiple listen-sockets on different IPs - Optimized timeouts - Minimal logging in production ## Monitoring - Real-time listener analytics - Resource monitoring (CPU, RAM, bandwidth) - Automated alerting - Log aggregation ## Reliability - Redundant source connections - Automated failover - Geographic redundancy - Regular backup testing ## Behind Reverse Proxy/CDN - use-x-forwarded-for: 1 - Proper hostname for directory listings - Consider HLS/DASH for better scaling - Cache static content aggressively`, }; const content = practices[useCase] || "Invalid use case. Use: small, medium, or large"; return { content: [ { type: "text", text: content, }, ], }; }