✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

MCP Server: Your Ultimate Telegram Music Bot Solution

Tired of clunky music bots that lag and spam your Telegram groups? Introducing MCP Server, a streamlined and feature-rich Telegram Music Bot crafted in Python using the robust Pyrogram and Py-Tgcalls libraries. This isn’t just another bot; it’s a complete music management solution designed for seamless integration and optimal performance. Whether you’re a casual listener or a hardcore audiophile, MCP Server delivers a superior music experience directly within your Telegram chats.

What is MCP Server?

MCP Server is an open-source Telegram Music Bot that allows you to play music and audio streams directly in your Telegram group chats. Built with speed, efficiency, and user-friendliness in mind, it supports a wide range of sources, including YouTube videos, live streams, and local audio/video files. It utilizes the Model Context Protocol (MCP) principles by interacting with external data sources (like YouTube) and integrating with Telegram’s voice chat features, effectively providing context (music) to the “language model” (the group chat).

Key Features That Set MCP Server Apart

  • Fast & Lightweight: Experience virtually instantaneous streaming. MCP Server begins playing your selections as they download and convert, eliminating lengthy waiting times and avoiding the creation of unnecessary files. This translates to a smoother, more responsive user experience.
  • Safe & Secure: Admin controls ensure that only authorized users can access sensitive commands, preventing misuse and maintaining order within your groups. This role-based access control adds a crucial layer of security.
  • Clean & Spam-Free: Bid farewell to cluttered chats. MCP Server automatically removes outdated playing notifications, keeping your conversations focused and organized. This automated cleanup enhances readability and prevents information overload.
  • Cool Controls: Take command of your music with intuitive controls. Switch between stream modes, loop tracks, pause, resume, mute, and unmute on the fly. These dynamic controls provide unparalleled flexibility and customization.
  • Rich Thumbnails: Enjoy visually appealing thumbnails that accompany your music selections, enhancing the overall aesthetic of your Telegram chats. These thumbnails provide a visual cue for the current song, improving the user experience.
  • Versatile Streaming: Stream virtually anything you desire. MCP Server supports audio and video files, YouTube videos (regardless of length), YouTube live streams, playlists, and even custom live streams such as radio broadcasts or M3U8 links. This versatility makes it a truly universal music solution.
  • Multi-Chat Streaming: Simultaneously broadcast different content in multiple chats, each with its own unique song queue. This feature is perfect for managing music across multiple communities or groups.
  • Multilingual Support: MCP Server speaks your language, offering support for a wide array of languages thanks to its dedicated team of translators. This localization ensures accessibility and ease of use for a global audience.

Use Cases: Unleash the Power of MCP Server

  • Enhance Telegram Communities: Create a vibrant and engaging atmosphere in your Telegram groups by providing a constant stream of music and entertainment.
  • Personal Music Hub: Use MCP Server to manage and play your personal music library directly within Telegram.
  • Educational Purposes: Share audio lectures, podcasts, and other educational content with students or group members.
  • Live Events and Broadcasts: Stream live music performances, DJ sets, or radio shows directly to your Telegram audience.
  • Background Music for Work or Study Groups: Create a productive and enjoyable environment for collaborative work or study sessions.

Deployment Options: Choose Your Path

MCP Server offers flexible deployment options to suit your technical expertise and infrastructure:

  • Heroku Deployment: The simplest method. One-click deployment to Heroku makes setup a breeze – simply fork the repository and click the “Deploy to Heroku” button.

  • Self-Hosting: For greater control and customization, self-hosting provides a more hands-on approach. Detailed instructions are provided for both legacy and Docker-based installation methods.

    • Legacy Method: Clone the repository, install the necessary dependencies, configure your environment variables, and run the main.py script.
    • Docker Build Method: Clone the repository, configure your environment variables, build a Docker image, and run the container. This approach offers greater portability and isolation.

Configuration: Tailor MCP Server to Your Needs

MCP Server offers a comprehensive set of configuration options, allowing you to fine-tune its behavior to your specific requirements. Key configuration parameters include:

  • API_ID and API_HASH: Your Telegram app credentials, obtained from the Telegram API website.
  • SESSION: Your Pyrogram string session, generated via a dedicated tool.
  • SUDOERS: A list of user IDs with administrative privileges.
  • BOT_TOKEN: Your Telegram bot token (optional, but recommended).
  • QUALITY: The desired stream quality (high, medium, or low).
  • PREFIX: The command prefix(es) for interacting with the bot.
  • LANGUAGE: The bot’s language.
  • STREAM_MODE: The default stream mode (audio or video).
  • ADMINS_ONLY: A flag to restrict /play commands to administrators only.
  • SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET: Your Spotify API credentials (optional, for Spotify integration).

Commands: Master the Music

MCP Server boasts a rich set of commands for controlling playback and managing your music queue. Essential commands include:

  • !ping: Verify the bot’s status.
  • !start / !help: Display the help message.
  • !mode / !switch: Toggle between audio and video stream modes.
  • !p / !play: Play a song or add it to the queue.
  • !radio / !stream: Play a live stream.
  • !pl / !playlist: Play an entire YouTube playlist.
  • !skip / !next: Skip to the next song.
  • !m / !mute: Mute the current stream.
  • !um / !unmute: Unmute the stream.
  • !ps / !pause: Pause the stream.
  • !rs / !resume: Resume the stream.
  • !list / !queue: Display the current song queue.
  • !mix / !shuffle: Shuffle the queue.
  • !loop / !repeat: Enable or disable loop mode.
  • !lang / !language: Set the bot’s language.
  • !ip / !import: Import a queue from a file.
  • !ep / !export: Export the queue to a file.
  • !stop / !leave: Stop playback and leave the voice chat.
  • !update / !restart: Update and restart the bot.

Contribute and Support MCP Server

MCP Server thrives on community contributions. Whether you’re a developer, translator, or simply an enthusiastic user, your contributions are invaluable. Report bugs, suggest new features, translate the bot into new languages, or contribute code improvements – all contributions are welcome.

For assistance, join the support group or open an issue on the GitHub repository. Your feedback helps improve MCP Server for everyone.

MCP and UBOS: A Synergistic Future

MCP Server exemplifies the power of the Model Context Protocol (MCP) in action. By integrating with external data sources and providing context to Telegram’s voice chat functionality, it delivers a superior user experience. UBOS, a full-stack AI Agent Development Platform, shares this vision of seamlessly connecting AI models with real-world data and tools.

UBOS enables businesses to orchestrate AI Agents, connect them with enterprise data, and build custom AI Agents using their own LLM models and Multi-Agent Systems. Imagine integrating MCP Server with UBOS, allowing AI Agents to dynamically control music playback based on user preferences, group activity, or even real-time events. The possibilities are limitless. UBOS is dedicated to bringing the transformative power of AI Agents to every business department, and MCP Server represents a key building block in this exciting future.

Featured Templates

View More

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.