DEV.co
MCP Servers · chigwell

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.

Source: GitHub — github.com/chigwell/telegram-mcp
1.3k
GitHub stars
319
Forks
Python
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorychigwell/telegram-mcp
Ownerchigwell
Primary languagePython
LicenseApache-2.0 — OSI-approved
Stars1.3k
Forks319
Open issues19
Latest releasev3.2.0 (2026-07-07)
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the telegram-mcp source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/chigwell/telegram-mcp.gitcd telegram-mcp# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

AI-assisted Telegram management

Enable Claude or Cursor to read chat history, draft replies, and send messages on behalf of the user—useful for customer support, community moderation, or personal productivity assistants.

Automated group administration

Delegate group creation, user invitations, permission management, and ban/admin operations to AI agents via MCP tools, reducing manual overhead in large community operations.

Multi-account workflow integration

Route separate work, personal, or client Telegram accounts through a single MCP server, enabling unified automation across multiple identities without spawning redundant Telethon sessions.

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.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
Yes, install from GitHub: `pip install git+https://github.com/chigwell/telegram-mcp.git@<tag>`. However, the README warns against using the PyPI package named `telegram-mcp` (different project). Always verify you are installing from the correct GitHub repository.
Is read-only mode a security sandbox?
No. Read-only mode restricts which MCP tools are exposed via the protocol, but the server process itself still holds full Telegram account authority. An attacker who compromises the server process can still perform all Telegram actions.
How many parallel MCP clients can one server instance serve?
The server holds one Telethon session per configured account. Multiple MCP clients can connect via HTTP transport (preferred for >1 client) to reuse that session. Stdio transport spawns a new server process per client, increasing Telegram throttling risk.
What happens if my session string expires?
Unknown; the README does not detail session expiration or re-authentication flow. You may need to regenerate the session string using session_string_generator.py and restart the server.

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.