Production-ready Telegram bot with intelligent agent features:
- Integrates with Telegram via aiogram
- Three MCP tools: Web Search, Weather, GitHub
- Context memory (SQLite)
- Vector knowledge base (Chroma + embeddings)
- Dockerized, with docker-compose and optional systemd service
- /help: usage guide
- /health: liveness and readiness checks
- Session-scoped context memory with persistence
- Semantic search in vector knowledge base
- MCP-like tools exposed via
mcp_client.py(Web Search, Weather, GitHub)
- Python 3.9+
- Ubuntu 22.04+ / Debian 12+
- Docker 24+ and Docker Compose v2
- Copy env file:
cp .env.example .env
- Fill
.envwith your credentials. - Create and activate venv, then install:
python3 -m venv .venv && source .venv/bin/activate pip install -U pip pip install -r requirements.txt
- Run bot:
python -m src.bot
cp .env.example .env
docker compose up -d --buildTo enable automatic startup on system reboot:
# Copy service file to systemd directory
sudo cp mcp-telegram-bot.service /etc/systemd/system/
# Reload systemd
sudo systemctl daemon-reload
# Enable service to start on boot
sudo systemctl enable mcp-telegram-bot
# Start service
sudo systemctl start mcp-telegram-bot
# Check status
sudo systemctl status mcp-telegram-bot
# View logs
sudo journalctl -u mcp-telegram-bot -fREADME.md
docker-compose.yml
.env.example
requirements.txt
src/
bot.py
mcp_client.py
memory_manager.py
knowledge_base.py
conversations/
cursor_chat_log.md
report.md
- Web Search: via DuckDuckGo Lite HTTP API (no key) or SerpAPI (if provided)
- Weather: Open-Meteo (no key) or OpenWeather (if provided)
- GitHub: REST API with PAT (optional read-only)
- Chroma persists to
./data/chroma/ - SQLite DB persists to
./data/memory.sqlite