Newcontext-mode—Save 98% of your AI coding agent's context windowLearn more
MCP Directory
ServersClientsBlog

context-mode

Save 98% of your AI coding agent's context window. Works with Claude Code, Cursor, Copilot, Codex, and more.

Try context-mode
MCP Directory

Model Context Protocol Directory

MKSF LTD
Suite 8805 5 Brayford Square
London, E1 0SG

MCP Directory

  • About
  • Blog
  • Documentation
  • Contact

Menu

  • Servers
  • Clients

© 2026 model-context-protocol.com

The Model Context Protocol (MCP) is an open standard for AI model communication.
Powered by Mert KoseogluSoftware Forge
  1. Home
  2. Clients
  3. fast-mcp-telegram

fast-mcp-telegram

GitHub
Website

Telegram MCP Server and HTTP-MTProto bridge | Multi-user, web setup, Docker and MTProto-Proxy ready

39
11
<img alt="Hero image" src="https://github.com/user-attachments/assets/635236f6-b776-41c7-b6e5-0dd14638ecc1" />

Python Version
License: MIT
Docker Ready
Health Status

Fast MCP Telegram Server - Production-ready Telegram integration for AI assistants with comprehensive search, messaging, and direct API access capabilities.

Demo

  1. Open https://tg-mcp.l1979.ru/setup to begin the authentication flow.
  2. After finishing, you'll receive a ready-to-use mcp.json with your Bearer token.
  3. Use the config with your MCP client to check out this MCP server capabilities.
  4. Or try the HTTP-MTProto Bridge right away with curl (replace TOKEN):
curl -X POST "https://tg-mcp.l1979.ru/mtproto-api/messages.SendMessage" \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"params": {"peer": "me", "message": "Hello from Demo!"}}'

Features

FeatureDescription
:closed_lock_with_key: Multi-User AuthenticationProduction-ready Bearer token auth with session isolation and LRU cache management
:globe_with_meridians: HTTP-MTProto BridgeDirect curl access to any Telegram API method with entity resolution and safety guardrails
:mag: Unified Message APISingle get_messages tool for search, browse, read by IDs, and replies - 5 modes in one
:speech_balloon: Universal RepliesGet replies from channel posts, forum topics, or any message with one parameter
:mag_right: Intelligent SearchGlobal & per-chat message search with multi-query support and intelligent deduplication
:building_construction: Dual TransportSeamless development (stdio) and production (HTTP) deployment support
:file_folder: Secure File HandlingRich media sharing with SSRF protection, size limits, album support, optional HTTP attachment streaming
:envelope: Advanced MessagingSend, edit, reply, post to forum topics, formatting, file attachments, and phone number messaging
:microphone: Voice TranscriptionAutomatic speech-to-text for Premium accounts with parallel processing and polling
:card_file_box: Unified Session ManagementSingle configuration system for setup and server, with multi-account support
:busts_in_silhouette: Smart Contact DiscoverySearch users, groups, channels with uniform entity schemas, forum detection, profile enrichment
:file_folder: Folder FilteringFilter chats by dialog folder (archived, custom folders) with integer ID or name matching
:robot: Bot Chat DetectionBots identified with type: "bot" and filterable via chat_type="bot"
:zap: High PerformanceAsync operations, parallel queries, connection pooling, and memory optimization
:shield: Production ReliabilityAuto-reconnect, structured logging, comprehensive error handling with clear actionable messages
:dart: AI-OptimizedLiteral parameter constraints, LLM-friendly API design, and MCP ToolAnnotations
:globe_with_meridians: Web Setup InterfaceBrowser-based authentication flow with immediate config generation
🚀 MTProto Proxy SupportConnect via MTProto proxy with automatic Fake TLS (EE prefix) and standard proxy detection

Quick Start (pip)

1. Install

pip install fast-mcp-telegram

2. Authenticate

fast-mcp-telegram-setup --api-id="your_api_id" --api-hash="your_api_hash" --phone-number="+123456789"

Or use the web interface: run fast-mcp-telegram and open /setup

Quick Start (uvx)

1. First-time setup

uvx --from fast-mcp-telegram fast-mcp-telegram-setup --api-id="your_api_id" --api-hash="your_api_hash" --phone-number="+123456789"

Sessions are stored in ~/.config/fast-mcp-telegram/ and persist between uvx invocations.

2. Configure MCP Client

STDIO:

{
  "mcpServers": {
    "telegram": {
      "command": "uvx",
      "args": ["fast-mcp-telegram"],
      "env": {
        "API_ID": "your_api_id",
        "API_HASH": "your_api_hash"
      }
    }
  }
}

HTTP_AUTH:

{
  "mcpServers": {
    "telegram": {
      "url": "https://your-server.com",
      "headers": {
        "Authorization": "Bearer AbCdEfGh123456789..."
      }
    }
  }
}

4. Start Using

{"tool": "search_messages_globally", "params": {"query": "hello", "limit": 5}}
{"tool": "get_messages", "params": {"chat_id": "me", "limit": 10}}
{"tool": "send_message", "params": {"chat_id": "me", "message": "Hello!"}}

Deploy to Production

This project uses GitHub Actions for automatic builds and deployments.

  1. Fork this repository
  2. Add secrets in GitHub Settings: SSH_HOST, SSH_USER, SSH_PRIVATE_KEY
  3. Edit .env in your fork
  4. Push to main — deployment happens automatically

Manual deployment: Use scripts/sync-remote-config.sh

See Deployment Guide for details.

Security

  • Bearer token authentication with session isolation
  • SSRF protection for file downloads
  • Dangerous method blocking with opt-in override

See SECURITY.md for details.

Documentation

  • Installation Guide - Local and production setup
  • Deployment Guide - Docker and VDS deployment
  • Tools Reference - Complete tools documentation
  • MTProto Bridge - Direct API access via curl
  • Operations Guide - Monitoring and troubleshooting

License

MIT License - see LICENSE

Repository

LE
leshchenko1979

leshchenko1979/fast-mcp-telegram

Created

April 25, 2025

Updated

April 13, 2026

Language

Python

Category

AI