Deployed · read-only integration

MaiTG — AI-Powered Telegram Communication System

Sole creator · AI-assisted development

MaiTG lets me retrieve Telegram information, understand conversation context and prepare replies through ChatGPT. I took the product from a personal need to two deployed services, with seven read-only tools.

Mai represents “My / My AI”; TG represents Telegram.

View project showcase on GitHub

Overview and role

I designed, implemented and deployed MaiTG as its sole human creator, using ChatGPT to help develop the architecture, generate and revise code, and troubleshoot problems.

I executed the PowerShell commands and CLI workflows, managed Git/GitHub and cloud configuration, inspected results, tested functionality and deployed both services.

The problem

I wanted to retrieve Telegram information, understand the context of conversations and prepare responses without leaving ChatGPT. MaiTG began as a solution to my own communication needs.

What I built

I built a Python backend using FastAPI and Telethon to retrieve Telegram information. The first integration used custom GPT Actions; a separate MCP adapter became the next stage, connecting ChatGPT to the same backend.

The working result is a read-only connection: ChatGPT can use retrieved context to summarize information and draft replies. The integration does not send, edit or delete messages, or mark them read.

Development approach and decisions

I used ChatGPT throughout development, turning its proposed code and instructions into working services through my own execution, inspection, corrections and testing.

  • Kept the working Telegram backend separate from the MCP adapter, preserving its existing behavior as the integration evolved.
  • Authenticated both service boundaries: Auth0 OAuth/JWT between ChatGPT and MCP, and separate bearer authentication between MCP and the backend.
  • Enforced privacy restrictions in backend logic and kept the integration read-only.
  • Deployed the backend and adapter as two independent Render services for separate troubleshooting and releases.

Troubleshooting and validation

Seven local privacy and peer-ID regression tests passed, and I exercised all seven read-only tools through ChatGPT.

  • Corrected Telegram peer-ID matching that affected exclusions and folder membership, then strengthened exclusions across conversation discovery and direct history.
  • Increased an upstream timeout from 20 to 45 seconds; subsequent tested calls succeeded.
  • Added diagnostic logging without message contents or credentials.
  • Established support for manually populated folders; automatic rule-based folders remain limited.

Current functionality and limitations

Seven read-only tools support folders, pending conversations, history, and conversation/message search. ChatGPT can summarize the retrieved information and draft replies for me to review.

  • Automatic rule-based folder support remains incomplete.
  • Intermittent rate-limit errors were investigated; a permanent resolution was not established.
  • Customer-scale reliability and commercial or productivity impact have not been measured.

How the services connect

  1. ChatGPT

    Retrieve context · summarize · draft replies

  2. MCP adapter

    Auth0 OAuth/JWT · separate Render service

  3. Telegram backend

    Bearer authentication · Python, FastAPI, Telethon · separate Render service

Architecture overview

Development workflow

PowerShell · Git/GitHub · HTTPX · Render CLI

Validation used my own automated and manual tests; no independent security audit has been performed.

Back to work