Skip to main content
Glama

get_icecast_best_practices

Get configuration best practices and recommendations for Icecast streaming servers based on listener scale: small (<50), medium (50-500), or large (500+).

Instructions

Get general best practices and recommendations for Icecast configuration based on use case

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
useCaseYesUse case: 'small' (< 50 listeners), 'medium' (50-500 listeners), 'large' (500+ listeners)

Implementation Reference

  • The handler logic for the get_icecast_best_practices tool within the CallToolRequestHandler. It retrieves the useCase parameter and returns a markdown string of best practices tailored to small, medium, or large scale 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,
            },
          ],
        };
      }
  • The input schema definition for the get_icecast_best_practices tool, registered in the ListToolsRequestHandler response. Defines the required 'useCase' parameter with enum values.
      {
        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:319-357 (registration)
    Tool registration in the ListToolsRequestHandler where get_icecast_best_practices is listed along with its schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "analyze_icecast_config",
            description: "Analyze an Icecast XML configuration file and provide recommendations for improvements. Checks security, performance, capacity, and reliability settings.",
            inputSchema: {
              type: "object",
              properties: {
                configPath: {
                  type: "string",
                  description: "Path to the Icecast XML configuration file",
                },
                expectedListeners: {
                  type: "number",
                  description: "Expected number of concurrent listeners (optional, default: 100)",
                },
              },
              required: ["configPath"],
            },
          },
          {
            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"],
            },
          },
        ],
      };
    });

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/splinesreticulating/icecast-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server