fast -telegram
Telegram MCP Server and HTTP-MTProto bridge | Multi-user auth, intelligent search, file sending, web setup | Docker & PyPI ready
claude mcp add --transport stdio leshchenko1979-fast-mcp-telegram python -m fast_mcp_telegram \ --env API_ID="your_api_id" \ --env API_HASH="your_api_hash" \ --env PHONE_NUMBER="+123456789"
How to use
Fast MCP Telegram provides production-grade Telegram integration for AI assistants with a unified toolset for messaging, search, and direct MTProto API access. The server exposes a suite of tools that allow you to search across chats, fetch messages, send and edit messages, and even interact with Telegram's MTProto methods via an HTTP bridge. You can run the server in multiple modes, including STDIO for development, and HTTP_NO_AUTH or HTTP_AUTH for production deployments with an Authorization Bearer token. Start by installing the Python package, authenticate with Telegram to generate an mcp.json, and then connect your MCP client using either the STDIO configuration or the HTTP authentication flow. The HTTP-MTProto Bridge lets you invoke Telegram API methods directly over HTTP, enabling flexible integration with external tools and workflows.
How to install
Prerequisites:
- Python 3.11+ installed on your system
- Network access to install Python packages
- Create and activate a virtual environment (optional but recommended):
python3 -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install the Fast MCP Telegram package from PyPI:
pip install fast-mcp-telegram
- Configure your MCP server (STDIO mode example): Create or edit the MCP config file to include the Python runtime pointing to the package:
{
"mcpServers": {
"telegram": {
"command": "fast-mcp-telegram",
"env": {
"API_ID": "your_api_id",
"API_HASH": "your_api_hash",
"PHONE_NUMBER": "+123456789"
}
}
}
}
- Start the server in a development STDIO mode by running the Python module (as configured in your mcp_config):
python -m fast_mcp_telegram
- For production with Bearer token (HTTP_AUTH): configure the HTTP server settings per your environment and ensure the Authorization header is sent with requests to the MTProto bridge.
Note: You can also run via the canonical Python module invocation in your MCP config as shown in the mcp_config example above.
Additional notes
Environment variables:
- API_ID: Your Telegram API ID obtained from my.telegram.org
- API_HASH: Your Telegram API hash corresponding to the API ID
- PHONE_NUMBER: The phone number associated with the Telegram account for authentication
Security:
- Use HTTP_AUTH mode in production to require Bearer tokens for all requests.
- Treat API_ID, API_HASH, and tokens as secrets; do not commit them to version control.
Troubleshooting:
- If authentication flow stalls, ensure the Telegram account is reachable and that network access to Telegram services is not blocked.
- When using the HTTP bridge, verify that CORS and firewall rules allow inbound traffic from your MCP clients.
- Enable verbose/logging in production to troubleshoot API method calls and responses.
Configuration options:
- STDIO mode: development with direct tool invocation
- HTTP_NO_AUTH: development HTTP server without auth
- HTTP_AUTH: production-ready HTTP server with Bearer auth
Related MCP Servers
better-chatbot
Just a Better Chatbot. Powered by Agent & MCP & Workflows.
agentql
Model Context Protocol server that integrates AgentQL's data extraction capabilities.
rtfmbro
rtfmbro provides always-up-to-date, version-specific package documentation as context for coding agents. An alternative to context7
cursor10x
The Cursor10x MCP is a persistent multi-dimensional memory system for Cursor that enhances AI assistants with conversation context, project history, and code relationships across sessions.
apple-mail
MCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language
adb
An MCP (Model Context Protocol) server for interacting with Android devices through ADB in TypeScript.