Model Context Protocol Server
A Model Context Protocol (MCP) server with a Telegram bot that provides YouTube search, Google search, and email tools using FastAPI and Google AI. Users interact via commands or natural language, with the server acting as an AI gateway to external services.
Installation
npx mcp-model-context-protocol-serverAsk AI about Model Context Protocol Server
Powered by Claude Β· Grounded in docs
I know everything about Model Context Protocol Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
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
.envfile 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:
/startor/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-botfor Telegram integrationgoogle-api-python-clientfor YouTube APIaiohttpfor async HTTP requestspython-dotenvfor environment variable managementfastapianduvicornfor 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.
