MCP-Model-Context-Protocol-Server

vichu12232003/MCP-Model-Context-Protocol-Server

3.2

If you are the rightful owner of MCP-Model-Context-Protocol-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This is a Model Context Protocol server that integrates Telegram bot functionality with YouTube and Google search capabilities.

MCP (Model Context Protocol) Server

This is a Model Context Protocol server that integrates Telegram bot functionality with YouTube and Google search capabilities. Users can search for videos and web content directly through Telegram commands.

Features

  • 🤖 Telegram bot interface
  • 🎥 YouTube video search
  • 🔍 Google web search
  • ⚡ Fast and asynchronous operations
  • 🔐 Secure API key management

Prerequisites

  • Python 3.8 or higher
  • A Telegram Bot Token (get from @BotFather)
  • YouTube API Key (from Google Cloud Console)
  • Google Custom Search API Key and Search Engine ID

Setup

  1. Clone the repository:
git clone <your-repo-url>
cd mcp
  1. Create a virtual environment and activate it:
python -m venv venv
# On Windows
.\venv\Scripts\activate
# On Unix or MacOS
source venv/bin/activate
  1. Install dependencies:
pip install -e .
  1. Create a .env file in the root directory with your API keys:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
YOUTUBE_API_KEY=your_youtube_api_key_here
GOOGLE_SEARCH_API_KEY=your_google_search_api_key_here
GOOGLE_SEARCH_ENGINE_ID=your_google_search_engine_id_here

Running the Server

To start the MCP server:

python main.py

Usage

Once the bot is running, you can interact with it on Telegram using these commands:

  • /start or /help - Show available commands
  • /yt <query> - Search for YouTube videos
  • /google <query> - Search Google

Examples:

/yt how to make pizza
/google python programming tutorials

Development

The project uses:

  • python-telegram-bot for Telegram integration
  • google-api-python-client for YouTube API
  • aiohttp for async HTTP requests
  • python-dotenv for environment variable management
  • fastapi and uvicorn for the API server (future expansion)

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.