CoinCub is a sophisticated Telegram bot that acts as a crypto research assistant. Powered by Google's Gemini and live data from the CoinGecko MCP, it provides real-time token analysis, comparisons, and conversational insights directly in your chat.
This project was developed for the CoinGecko MCP Hackathon 2025.
- Single Token Analysis: Get a full overview of any cryptocurrency, including price, market cap, volume, volatility, and liquidity.
- Dual Token Comparison: Compare two tokens side-by-side with a clean, formatted Markdown table.
- Dynamic AI Model Fallback: Automatically switches to a secondary AI model if the primary one is busy or unavailable, ensuring high uptime and a seamless user experience.
- Real-Time News Integration: Fetches the latest headlines from top crypto news sources (CoinDesk, CoinTelegraph, Decrypt) to provide context for market movements.
- Conversational AI: Ask general questions or follow-ups. The bot uses chat history to understand context.
- Automated Risk Assessment: Automatically flags risk indicators like low liquidity, low volume, and high volatility.
- Intelligent Intent-Driven: Understands various user intents, from simple price checks ("how's btc?") to complex risk analysis.
- Backend: Python 3.10+
- Telegram Framework:
python-telegram-bot(v20+) - AI & Language Model: Google Gemini via the official CLI
- Core Data Source: CoinGecko's Model Context Protocol (MCP)
- News Feeds: RSS from CoinDesk, CoinTelegraph, Decrypt
- Concurrency:
asyncio
Follow these instructions to get a local copy up and running.
- Python 3.10 or higher
- A Telegram Bot Token from @BotFather
- An environment with the Gemini CLI configured and authenticated, Google Gemini API Key from Google AI Studio
- RSS Feed URLs (optional but recommended)
-
Set up the Google Gemini CLI:
- This project requires the Gemini command-line tool to be installed and authenticated with your Google AI API key.
- Please follow the official instructions here to set it up: https://github.com/google-gemini/gemini-cli/blob/main/README.md
npm install -g @google/gemini-cli
-
Clone the repository:
git clone https://github.com/DevDiner/coincub-cryptocopilot.git cd cryptocopilot -
Create and activate a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate -
Install the required dependencies:
pip install -r requirements.txt
-
Set up your environment variables:
- Copy the example
.env.examplefile to a new.envfile:cp .env.example .env
- Open the
.envfile and fill in your actual API keys and tokens.
- Copy the example
-
Run the bot:
python telegram_bot.py
The bot will start listening for messages.
To run this project, you will need to add the following environment variables to your .env file:
COINCUB_BOT_TOKEN=(Telegram bot token)RSS_COINDESK=(Full URL for CoinDesk RSS feed)RSS_COINTELEGRAPH=(Full URL for CoinTelegraph RSS feed)RSS_DECRYPT=(Full URL for Decrypt RSS feed)
A key component of CoinCub is the detailed system prompt located in prompt/GEMINI.md. This file acts as the bot's "constitution," defining its personality, tools, and response formats for various user intents. This allows for rapid iteration on the bot's behavior without changing the core Python code.
This project is a submission for the CoinGecko MCP Hackathon. It demonstrates the power of combining a large language model with real-time, high-quality financial data from the CoinGecko MCP to create a useful tool for crypto enthusiasts.





