Skip to content

bukvalni/MCP-agent

Repository files navigation

Telegram AI Agent Bot

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

Features

  • /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)

Requirements

  • Python 3.9+
  • Ubuntu 22.04+ / Debian 12+
  • Docker 24+ and Docker Compose v2

Quick Start (Local)

  1. Copy env file:
    cp .env.example .env
  2. Fill .env with your credentials.
  3. Create and activate venv, then install:
    python3 -m venv .venv && source .venv/bin/activate
    pip install -U pip
    pip install -r requirements.txt
  4. Run bot:
    python -m src.bot

Docker Run

cp .env.example .env
docker compose up -d --build

Systemd Autostart

To 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 -f

Repository Structure

README.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

MCP Tools

  • 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)

Notes

  • Chroma persists to ./data/chroma/
  • SQLite DB persists to ./data/memory.sqlite

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors