telegram-mcp
Telegram MCP is a Python server that connects Claude, Cursor, and other MCP clients to Telegram accounts via the Telethon library. It exposes 80+ tools for reading chats, managing groups, sending messages, and handling contacts through the Model Context Protocol.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | chigwell/telegram-mcp |
| Owner | chigwell |
| Primary language | Python |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.3k |
| Forks | 319 |
| Open issues | 19 |
| Latest release | v3.2.0 (2026-07-07) |
| Last updated | 2026-07-07 |
| Source | https://github.com/chigwell/telegram-mcp |
What telegram-mcp is
Written in Python 3.10+, telegram-mcp wraps Telethon (a Telegram client library) as an MCP server. It supports stdio, HTTP, and SSE transports; multi-account routing via environment variables; optional read-only mode; and session management via session strings or QR login.
Get the telegram-mcp source
Clone the repository and explore it locally.
git clone https://github.com/chigwell/telegram-mcp.gitcd telegram-mcp# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Obtain Telegram API credentials (api_id, api_hash) from my.telegram.org/apps and generate a session string via the bundled session_string_generator.py; session strings must be stored securely.
- Use environment variables (TELEGRAM_API_ID, TELEGRAM_API_HASH, TELEGRAM_SESSION_STRING) or .env files; multi-account setup relies on suffixed variable names (e.g., TELEGRAM_SESSION_STRING_WORK).
- Choose an MCP transport (stdio for single client, http for shared server) to avoid Telegram throttling multiple concurrent Telethon sessions from the same account.
- Enable read-only mode (TELEGRAM_EXPOSED_TOOLS=read-only) if MCP clients should not mutate chats or send messages; this does not sandbox the server's internal Telegram authority.
- Test session lifecycle and reconnection behavior in your MCP client integration; Telethon sessions may time out or require re-authentication.
When to avoid it — and what to weigh
- High-volume, low-latency messaging — Telegram's own API throttling and Telethon's client-side rate limits may not suit applications requiring sub-second message throughput or real-time high-frequency operations.
- Regulatory or data residency constraints — Telegram account credentials and session strings must be stored; if compliance requires no plaintext Telegram auth in local files or environment, this server design may conflict with policy.
- Untrusted or fully adversarial MCP clients — The server holds full Telegram account authority; read-only mode is an MCP tool surface restriction, not a sandbox. A compromised MCP client can still abuse the Telegram session inside the server process.
- Organizations requiring formal vendor support — This is a community project with no commercial backing, SLA, or official support channel. Critical production deployments should plan for community-driven maintenance or internal ownership.
License & commercial use
Licensed under Apache License 2.0 (OSI-approved permissive license). Permits commercial use, modification, and distribution provided the license and copyright notice are retained and no trademark claim is made. No warranty or liability protection for users.
Apache 2.0 permits commercial use without royalty or explicit permission. However, this is a community project with no vendor SLA, liability insurance, or indemnification. Users accept full responsibility for compliance with Telegram's terms of service, which prohibit bots and automated access under certain conditions; review Telegram's policies before deploying in production commercial workflows.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Telegram session strings are long-lived credentials that grant full account access; store them securely (avoid version control, use secret managers). The MCP server process holds unrevoked Telegram authority; do not expose the server to untrusted networks or MCP clients. Read-only mode is a tool-surface restriction, not cryptographic isolation. User-controlled content in tool results is sanitized where practical, but sanitization completeness and media content safety require code review. No mention of TLS enforcement for HTTP transport; default 127.0.0.1:8765 binding assumes local-only deployment.
Alternatives to consider
Telegram Bot API (native)
Official, webhook-based, Telegram-maintained. Better for high-volume, low-latency bots but requires a bot token and does not support user account operations (only channels/groups you own as bot).
Slack + MCP (e.g., slack-mcp community projects)
If you are integrating with Slack instead of Telegram, analogous MCP servers exist; Slack's official API and app ecosystem are more mature and have better commercial support.
Manual integration of Telethon with OpenAI/Claude APIs via function calling, giving you full control over logic flow and credential handling, but requiring custom engineering for each use case.
Build on telegram-mcp with DEV.co software developers
Clone the repository, configure your Telegram API credentials, and integrate telegram-mcp into Claude Desktop or Cursor. Start small with read-only mode, then enable mutations as you gain confidence.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
telegram-mcp FAQ
Can I use telegram-mcp without cloning the repo?
Is read-only mode a security sandbox?
How many parallel MCP clients can one server instance serve?
What happens if my session string expires?
Work with a software development agency
Need help beyond evaluating telegram-mcp? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and mcp servers integrations — and maintain them long-term.
Ready to automate your Telegram workflow?
Clone the repository, configure your Telegram API credentials, and integrate telegram-mcp into Claude Desktop or Cursor. Start small with read-only mode, then enable mutations as you gain confidence.