Telegram AI Assistant with multi-MCP servers

Telegram AI Assistant with multi-MCP servers

telegram-ai-mcp-assistant-bot•byshettysaish20

A Telegram-based AI agent that uses multiple MCP servers for web search, document processing, math, Gmail, and Google Sheets tasks.

License: MIT License•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Includes a Gmail MCP server for sending, reading, and trashing emails.
  • •Includes a Google Sheets MCP server for creating, updating, and sharing spreadsheets.
  • •Includes a web search MCP server that searches via DuckDuckGo and fetches webpage content.
  • •Includes document processing and math MCP servers, with dynamic tool discovery across servers.

BEST FOR

  • •Running an agent that combines web search results into Google Sheets.
  • •Sending emails through Telegram requests.
  • •Users who want a Telegram-accessible assistant with memory and configurable persona.

ABOUT TELEGRAM-AI-MCP-ASSISTANT-BOT

Telegram AI Assistant with multi-MCP servers is cataloged as an MCP server attributed to shettysaish20. A Telegram-based AI agent that uses multiple MCP servers for web search, document processing, math, Gmail, and Google Sheets tasks. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Telegram AI Assistant with multi-MCP servers are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the bot communicate with its MCP servers?

It supports both stdio and sse transport protocols for connecting to MCP servers.

How are MCP server tools discovered?

The bot initializes a MultiMCP dispatcher that automatically discovers tools from all configured MCP servers.

Upstream README

View this exact version on GitHub

README.md · e550df509819 · Fetched 2026-11-13 12:56:48 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Telegram AI Assistant Bot

Overview

The Telegram AI Assistant Bot is a reasoning-driven AI agent, named Cortex-R, designed to interact with users via Telegram. It uses multiple Model Context Protocol (MCP) servers to perform various tasks such as web searches, document processing, mathematical calculations, and Google services integration (e.g., Gmail and Google Sheets). The bot employs both stdio and sse transport protocols to communicate with these MCP servers.

Features

  • Telegram Integration: The bot interacts with users through Telegram, responding to their queries and tasks.
  • Multi-MCP Server Support: Utilizes multiple MCP servers for diverse functionalities.
    • Gmail integration for email management.
    • Google Sheets integration for spreadsheet operations.
    • Web search capabilities using DuckDuckGo.
    • Document processing and semantic search.
    • Mathematical calculations.
  • Dynamic Tool Discovery: Automatically discovers tools from MCP servers during initialization.
  • Customizable Agent Strategy: Supports different strategies like conservative, retry-once, and explore-all.
  • Memory Management: Retrieves and stores memory items to enhance task-solving capabilities.
  • Configurable Persona: Allows customization of tone, verbosity, and behavior.

Architecture

The bot is built using the following components:

1. Telegram Bot Integration

The bot is implemented in telegram_agent.py using the python-telegram-bot library. It handles user messages and commands such as /start and /help. User queries are processed by the Cortex-R agent.

2. Core Components

  • Agent Loop (core/loop.py): Manages the main execution loop of the agent, including perception, planning, and tool execution.
  • Session Management (core/session.py): Handles communication with multiple MCP servers using stdio and sse transport protocols.
  • Strategy (core/strategy.py): Implements planning strategies for decision-making.

3. MCP Servers

The bot interacts with the following MCP servers:

  • Gmail Server (gmail_server.py): Manages email operations such as sending, reading, and trashing emails.
  • Google Sheets Server (mcp_gdrive_server.py): Handles spreadsheet operations like creating, updating, and sharing Google Sheets.
  • Web Search Server (mcp_server_3.py): Performs web searches using DuckDuckGo and fetches webpage content.
  • Document Processing Server (mcp_server_2.py): Processes documents for semantic search and indexing.
  • Math Server (mcp_server_1.py): Performs mathematical calculations.

4. Configuration

  • Profiles (config/profiles.yaml): Defines agent settings, including strategy, memory configuration, and MCP server details.
  • Models (config/models.json): Specifies the models used for text generation and embeddings.
  • Environment Variables (.env): Stores sensitive information like API keys and file paths.

Workflow

  1. Initialization:

    • The bot loads MCP server configurations from profiles.yaml.
    • Initializes the MultiMCP dispatcher to discover tools from all configured MCP servers.
  2. User Interaction:

    • Users interact with the bot via Telegram.
    • The bot processes user messages and determines the required tools to fulfill the task.
  3. Task Execution:

    • The agent uses perception to understand the user query.
    • Plans the next action using the defined strategy.
    • Executes the required tool from the appropriate MCP server.
    • Retrieves results and responds to the user.
  4. Memory Management:

    • Stores tool outputs and user queries as memory items.
    • Retrieves relevant memories to assist in task-solving.

Configuration

Environment Variables

Set the following variables in the .env file:

  • GEMINI_API_KEY: API key for the Gemini model.
  • SERVICE_ACCOUNT_PATH: Path to the Google service account JSON file.
  • DRIVE_FOLDER_ID: Google Drive folder ID for storing files.
  • CREDENTIALS_PATH: Path to the OAuth client credentials file.
  • TOKEN_PATH: Path to the token file for Google APIs.

MCP Server Configuration

Define MCP servers in config/profiles.yaml:

mcp_servers:
  - id: gmail
    type: stdio
    script: gmail_server.py
    cwd: <path-to-server>
  - id: gdrive
    type: stdio
    script: mcp_gdrive_server.py
    cwd: <path-to-server>
  - id: math
    type: sse
    script: mcp_server_1.py
    url: http://localhost:8000/sse
    cwd: <path-to-server>
  - id: documents
    type: stdio
    script: mcp_server_2.py
    cwd: <path-to-server>
  - id: websearch
    type: stdio
    script: mcp_server_3.py
    cwd: <path-to-server>

Installation

  1. Clone the repository:
    git clone <repository-url>
    cd <repository-folder>
    
  2. Sync dependencies using uv:
    uv sync
    
  3. Set up environment variables in .env.
  4. Start the Telegram bot:
    uv run telegram_agent.py
    

Usage

  • Start the bot on Telegram using the /start command.
  • Send queries or tasks to the bot, such as:
    • "Find the current F1 standings and share them in a Google Sheet."
    • "Send an email to example@gmail.com with the subject 'Meeting Update'."

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Telegram AI Assistant with multi-MCP servers from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/telegram-ai-mcp-assistant-bot)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent