CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
n24q02m avatar

Better Telegram MCP

n24q02m/better-telegram-mcp
8authSTDIOregistry active
Summary

A dual-mode Telegram integration that speaks both Bot API (via httpx) and MTProto (via Telethon), so you can automate with a bot token or drive a full user account depending on what you need. Six composite tools cover messaging, chat management, media uploads and downloads, contacts, and config. The web-based OTP flow handles headless auth without manual terminal inputs. Useful when you want Claude to send messages, search history, manage group membership, or pull media from conversations without bouncing between the Telegram app and your workflow. The mode switches automatically based on whether you provide bot credentials or user API keys.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →

telegram

mcp-name: io.github.n24q02m/better-telegram-mcp

Telegram for AI agents: messages, chats, media, and contacts in bot and user-account modes.

Mode CI codecov PyPI Docker License: Apache-2.0

Python Telegram MCP semantic-release Renovate

Sister projects from n24q02m (click to expand)
ProjectTaglineTag
agent-chat-pluginPeer AI agents chat in a shared folder — no human relay, no orchestrator, wor...Tooling
better-code-review-graphKnowledge graph for token-efficient code reviews -- semantic search and call-...MCP
better-drive2-way Google Drive sync with .driveignore filter — rclone engine, Windows trayTooling
better-email-mcpIMAP/SMTP email for AI agents -- read, send, organize folders, and manage att...MCP
better-godot-mcpComposite MCP server for Godot Engine -- 17 composite tools for AI-assisted g...MCP
better-notion-mcpMarkdown-first Notion for AI agents -- pages, databases, blocks, and comments...MCP
better-semantic-releaseDrop-in python-semantic-release fork with built-in release-safety guards (orp...Tooling
better-telegram-mcpTelegram for AI agents -- messages, chats, media, and contacts across both bo...MCP
better-workspace-mcpGoogle Workspace MCP server (Docs/Drive/Calendar/Gmail/Sheets/Slides/Tasks/Ch...MCP
claude-pluginsClaude Code plugin marketplace for the n24q02m MCP servers -- install web sea...Marketplace
imagine-mcpImage and video understanding + generation for AI agents -- across Gemini, Op...MCP
jules-task-archiverChrome Extension for bulk operations on Jules tasks via batchexecute API -- a...Tooling
mcp-coreShared foundation for building MCP servers -- Streamable HTTP transport, OAut...MCP
mnemo-mcpPersistent AI memory with hybrid search and embedded sync. Open, free, unlimi...MCP
qwen3-embedLightweight Qwen3 text embedding and reranking via ONNX Runtime and GGUFLibrary
skretSecrets without the server.CLI
tacetA self-distilling neuro-symbolic cascade that amortises LLM cost across knowl...Tooling
web-coreShared web infrastructure package for search, scraping, HTTP security, and st...Library
wet-mcpOpen-source MCP server for AI agents: web search, content extraction, and lib...MCP

Table of contents

  • Features
  • Status
  • Install
  • Smithery
  • Configuration
  • CLI
  • Documentation
  • Tools
  • Comparison
  • Security
  • Build from Source
  • Trust Model
  • License
better-telegram-mcp MCP server

Features

  • Dual mode -- Bot API (httpx) for bots, MTProto (Telethon) for user accounts
  • 7 tools with action dispatch: message, chat, media, contact, config, help, config__open_relay
  • Auto-detect mode -- Set bot token for bot mode, or API credentials for user mode
  • Web-based OTP auth -- HTTP-mode browser relay form handles phone, OTP, and 2FA for user accounts
  • Local CLI auth -- auth configures a single-user machine; login remains a deprecated alias
  • Tool annotations -- Each tool declares readOnlyHint, destructiveHint, idempotentHint, openWorldHint
  • MCP Resources -- Documentation available as telegram://docs/* resources
  • Security hardened -- SSRF protection, path traversal prevention, error sanitization

Status

The executable defaults to stdio for local single-user operation. HTTP is opted into with --http, MCP_TRANSPORT=http, or TRANSPORT_MODE=http; HTTP is the deployment mode for browser relay setup and optional multi-user access. The canonical stack mode matrix names HTTP remote relay as the deployed Telegram default, so changing the executable default requires a separate transport-contract decision and migration. This repository does not silently claim those two defaults are already reconciled.

There are no daemon-bridge layers and no auto-spawn from stdio. See Modes overview for the full transport model.

Sister MCP servers from the same author are listed in the collapsible section above -- they share this architecture, so install patterns transfer.

Install

# Local default: plugin install via Claude Code (stdio, bot mode)
/plugin marketplace add n24q02m/claude-plugins
/plugin install better-telegram-mcp@n24q02m-plugins

# Method 1 (CLI): direct uvx invocation (stdio, bot mode)
claude mcp add telegram -e TELEGRAM_BOT_TOKEN=123456:ABC-DEF -- uvx n24q02m-telegram

# Method 2 (fallback): Docker stdio
docker run -i --rm -e TELEGRAM_BOT_TOKEN=123456:ABC-DEF n24q02m/telegram

# Method 3 (recommended for user mode / multi-device / OAuth): Docker HTTP
docker run -d --name telegram-http -p 8080:8080 \
  -e MCP_TRANSPORT=http \
  -e PUBLIC_URL=https://telegram.example.com \
  -e MCP_DCR_SERVER_SECRET=<32+ random bytes> \
  n24q02m/telegram:latest

The package is n24q02m-telegram (formerly better-telegram-mcp; old package receives one final release then freezes). The MCP Registry id stays io.github.n24q02m/better-telegram-mcp, the Docker image is now n24q02m/telegram, and the legacy better-telegram-mcp command is kept as an alias of telegram. Local data moves once from ~/.better-telegram-mcp to ~/.telegram on first start.

Install matrix

ClientInstall
Claude Code/plugin marketplace add n24q02m/claude-plugins + /plugin install better-telegram-mcp@n24q02m-plugins (stdio bot mode), or claude mcp add as in the block above
Cursor / Windsurf / Gemini CLI / any MCP clientmcpServers JSON in the client's config — stdio command, or type: "http" + url pointing at a deployment

Full per-client walkthroughs: mcp.n24q02m.com/servers/better-telegram-mcp/setup/.

Stdio mode is local single-user mode. Bot mode uses TELEGRAM_BOT_TOKEN; user mode can be configured locally with telegram auth --phone <+number>. HTTP user mode uses the browser-based relay form at /authorize for phone, OTP, and 2FA.

Remote endpoint -- an HTTP deployment is OAuth-gated and serves /mcp. Point any MCP client that speaks Streamable HTTP + OAuth 2.1 at https://<your-host>/mcp; each user completes the browser relay setup (bot token, or phone + OTP) on first connect. To run one, use the Docker HTTP method above.

Full setup matrices live at the canonical docs site mcp.n24q02m.com/servers/better-telegram-mcp/setup/, and the paste-to-agent snippets at claude-plugins/plugins/better-telegram-mcp/setup-with-agent.md.

Smithery

Also listed on Smithery. Per smithery.yaml, Smithery starts the server over stdio with uvx --python 3.13 n24q02m-telegram and takes no install-time configuration (empty configSchema) -- credentials are provided at runtime through the server's own setup flow: the TELEGRAM_BOT_TOKEN env var or local auth command for stdio single-user mode, or the browser relay form for HTTP user mode (see Configuration).

Configuration

Settings load from TELEGRAM_-prefixed environment variables (Pydantic Settings).

Stdio mode (local single-user):

VariableRequiredDescription
TELEGRAM_BOT_TOKENYesBot token from @BotFather (format 123456789:ABCdef...)

HTTP mode (bot + user): credentials are entered via the browser relay form, not env vars. Server-side env vars for self-hosting:

VariableRequiredDefaultDescription
MCP_TRANSPORTYesstdioSet to http to enable HTTP mode (--http CLI flag or TRANSPORT_MODE=http also work)
PUBLIC_URLSelf-host--Public URL of the server; presence enables the multi-user OAuth branch
MCP_DCR_SERVER_SECRETSelf-host--Multi-user OAuth shared secret, 32+ random bytes (legacy DCR_SERVER_SECRET still accepted)
HOSTNo0.0.0.0Bind address
PORTNo8080HTTP port

User-mode credentials (optional overrides): TELEGRAM_API_ID and TELEGRAM_API_HASH ship with built-in public dev defaults, so only TELEGRAM_PHONE is needed to start the phone + OTP flow. TELEGRAM_SESSION_NAME and TELEGRAM_DATA_DIR customize the Telethon session file location. There is no TELEGRAM_PASSWORD env var -- HTTP relay 2FA is entered through the web UI; local CLI auth prompts interactively and never stores it in the environment.

CLI

The telegram console script (installed by uvx / pip; better-telegram-mcp server** when run with no subcommand, and exposes a few operator subcommands for local single-user setup and diagnostics. Any flag that is not a subcommand is passed straight through to the server (e.g. --http).

telegram            # start the MCP server (stdio, bot mode by default)
telegram --http     # start in HTTP mode
telegram --version  # print the version

Subcommands (telegram <subcommand>):

SubcommandUsageDescription
authauth --bot-token <token> or auth --phone <+number>Authenticate this machine (single-user). Bot mode validates the token; phone mode runs the interactive OTP/2FA flow and stores the Telethon session on disk
loginSame arguments as authDeprecated alias of auth
logoutlogoutRevoke the Telegram session server-side, delete the local session file, and clear saved credentials
configconfig status, config delete [--yes]Show or delete the saved local credential config (env overrides still take precedence at server start)
relayrelay status, relay open, relay resetInspect, open (print a fresh setup URL for), or reset the browser relay setup session
doctordoctorPrint environment diagnostics -- Python version, credential backend, config + relay state, and transport mode
# Bot mode: validate a bot token and save it to the local config
telegram auth --bot-token 123456:ABC-DEF

# User mode: interactive phone + OTP (+ 2FA if enabled) sign-in
telegram auth --phone +15551234567

# Remove local credentials and revoke the session
telegram logout

The auth command, its deprecated login alias, and logout are single-user and local-machine only -- they write the on-disk Telethon session and the encrypted single-user config, so run them on the machine that hosts the stdio server. For remote / multi-user HTTP deployments, credentials are entered through the browser relay form instead (see the remote endpoint and Configuration).

Documentation

Full docs at mcp.n24q02m.com/servers/better-telegram-mcp/:

  • Setup -- install methods for Claude Code, Codex, Gemini CLI, Cursor, Windsurf, mcp.json
  • Modes overview -- stdio (local, single-user) and HTTP (remote, OAuth 2.1)
  • Multi-user setup -- per-JWT-sub credential model

Install with AI agent -- paste this to your AI coding agent:

Install MCP server telegram following the steps at https://raw.githubusercontent.com/n24q02m/claude-plugins/main/plugins/better-telegram-mcp/setup-with-agent.md

Tools

ToolActionsDescription
messagesend, edit, delete, forward, pin, react, search, historySend, edit, delete, forward messages. Pin, react, search, browse history
chatlist, info, create, join, leave, members, admin, settings, topicsList and manage chats, groups, channels. Members, admin, forum topics
mediasend_photo, send_file, send_voice, send_video, downloadSend photos, files, voice notes, videos. Download media from messages
contactlist, search, add, blockList, search, add contacts. Block/unblock users (user mode only)
configstatus, set, cache_clear, setup_status, setup_start, setup_reset, setup_completeServer status, runtime settings, cache, credential setup (relay, status, reset, complete)
help--Full documentation for any topic
config__open_relay--Re-trigger the zero-config relay setup flow (prints a fresh relay URL for the browser form). Registered via mcp-core's register_open_relay_tool so an LLM can restart setup without a manual restart

MCP Resources

URIContent
telegram://docs/messagesMessage operations reference
telegram://docs/chatsChat management reference
telegram://docs/mediaMedia send/download reference
telegram://docs/contactsContact management reference
telegram://statsAll documentation combined

Comparison

How telegram stacks up against direct competitors in each pillar:

Capabilitytelegramchigwell/telegram-mcpsparfenyuk/mcp-telegramguangxiangdebizi/telegram-mcp
Bot API mode (bot token)Yes (httpx)NoNoYes
MTProto user-account modeYes (Telethon)YesYesNo
Send / edit / delete messagesYesYesNo (read-only, draft only)Yes (send only)
Media download from messagesYesYesYesNo (send only)
Contact management (add / block)Yes (user mode)YesPartial (list only)No
Web-based / browser OTP authYes (relay form, headless)No (CLI session string)No (CLI sign-in)No (pre-set bot token)
Multi-user remote, per-user isolationYes (per-JWT-sub backends)NoNoNo
SSRF protectionYes (URL validation + DNS-rebinding)??No
Path-traversal preventionYesYes (real-path allowed-root)?No
Self-hostableYesYesYesYes

Security

  • SSRF Protection -- All URLs validated against internal/private IP ranges, DNS rebinding blocked
  • Path Traversal Prevention -- File paths validated, sensitive directories blocked
  • Session File Security -- 600 permissions, 2FA via web UI only (never stored in env vars)
  • Error Sanitization -- Credentials never leaked in error messages

Build from Source

git clone https://github.com/n24q02m/telegram.git
cd telegram
uv sync
uv run telegram

Trust Model

This plugin implements TC-NearZK (in-memory, ephemeral). See mcp-core trust model for full classification.

The project no longer operates an n24q02m-hosted Telegram endpoint. HTTP mode is available only on infrastructure an operator deploys and controls.

ModeStorageEncryptionWho can read your data?
HTTP self-host (opt-in)In-memory dict[sub] = MTProtoSessionIn-process onlyOperator-controlled server process (cleared on restart)
stdio~/.config/mcp/config.enc (credentials) + ~/.telegram/<name>.session (Telethon session)AES-GCM, machine-bound keyOnly your OS user (file perm 0600)

Workspace username (HTTP setup form)

The browser setup form has an optional workspace username field. Entering the same username always lands you in the same per-sub bucket, so your session stays reachable across a re-authorization and across devices, instead of being tied to the one-off subject minted for each /authorize round-trip. Leaving it blank keeps the previous per-authorize behaviour.

Trust boundary: when the form is gated by a shared MCP_RELAY_PASSWORD, the username is a partition key, not a secret -- anyone who knows that password can type any username and reach that bucket. That is fine for a trusted group; an untrusted multi-tenant deployment needs a per-user secret or delegated OAuth instead.

One-time migration: existing users must re-authenticate once after this change. Nothing is deleted; sessions stored under the old random subject are simply no longer addressed.

License

Apache-2.0 -- See LICENSE.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →

Configuration

TELEGRAM_BOT_TOKENsecret

Telegram bot token from @BotFather (for bot mode)

TELEGRAM_API_ID

Telegram API ID from my.telegram.org (for user mode)

TELEGRAM_API_HASHsecret

Telegram API hash from my.telegram.org (for user mode)

Categories
Communication & Messaging
Registryactive
Packagebetter-telegram-mcp
TransportSTDIO
AuthRequired
UpdatedJun 9, 2026
View on GitHub

More from n24q02m

  • Mnemo Mcp7
  • Imagine Mcp2
  • Better Notion Mcp31
  • Better Code Review Graph53
  • Better Godot Mcp24
  • Better Email Mcp21
  • Wet Mcp9

Related Communication & Messaging MCP Servers

View all →
domdomegg avatar
Gmail

domdomegg/gmail-mcp

Allow AI systems to read, send, archive, and manage emails via Gmail.
7
parthjadhav avatar
Telegram Notify Mcp

parthjadhav/telegram-notify-mcp

Send Telegram notifications from AI agents — text, photos, and documents.
7
samihalawa avatar
Samihalawa Whatsapp Go Mcp

ai.smithery/samihalawa-whatsapp-go-mcp

Scan QR codes and go! No more troublesome autos or APIs! Send text messages, images, links, locati…
5
virtualsms-io avatar
Sms

io.github.virtualsms-io/sms

Real SIM phone numbers for AI agents. 145+ countries, 2500+ services. #1 on ChatGPT and Perplexity.
4
geiserx avatar
Telegram Archive Mcp

geiserx/telegram-archive-mcp

MCP server for Telegram Archive — search messages, browse chats, and access history
3
maxim-mazurok avatar
Microsoft Teams API

maxim-mazurok/teams-api

AI-native Microsoft Teams integration — read chats, send messages, search people
3