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
- Clone the repository:
git clone <your-repo-url>
cd mcp
- Create a virtual environment and activate it:
python -m venv venv
# On Windows
.\venv\Scripts\activate
# On Unix or MacOS
source venv/bin/activate
- Install dependencies:
pip install -e .
- 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 integrationgoogle-api-python-client
for YouTube APIaiohttp
for async HTTP requestspython-dotenv
for environment variable managementfastapi
anduvicorn
for the API server (future expansion)
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.