MCP Telegram Cloud
Open source MCP server that connects a Telegram account to AI assistants over OAuth + QR login, enabling read-only and safe state-change operations.
README
MCP Telegram Cloud
Open source MCP server that connects a Telegram account to AI assistants (Claude.ai, ChatGPT) over OAuth + QR login. Hosted free at mcp-telegram.com, or self-host on your own infrastructure.
This is the cloud / multi-user flavour. For the single-user CLI
(stdio transport, full read+write, all MTProto tools), use the upstream
@overpod/mcp-telegram.
What it does
- Exposes a Telegram account to an MCP-aware client (Claude.ai, ChatGPT Apps, custom MCP hosts) over Streamable HTTP.
- Read-only and safe-state-change tools only — no
send-message, nodelete-message, no admin actions. The hosted service trades off capability for a smaller blast radius. - OAuth 2.0 with dynamic client registration and PKCE (RFC 8414 + 7591 + 7636). QR login is embedded in the OAuth authorize page — connect once, reconnect via refresh token for 30 days.
Quick start (hosted)
- Open Claude.ai → Settings → Connectors → Add custom connector.
- Server URL:
https://mcp-telegram.com/mcp. - Click Connect. You will be redirected to scan a QR code with Telegram (Settings → Devices → Link Desktop Device).
- Done. Ask Claude to read your unread messages, search chats, etc.
ChatGPT Apps Directory submission is in review. Until then, add
https://mcp-telegram.com/mcp manually as a custom MCP server.
Quick start (self-hosted)
git clone https://github.com/mcp-telegram/mcp-telegram-cloud.git
cd mcp-telegram-cloud
cp .env.example .env
# fill in TELEGRAM_API_ID + TELEGRAM_API_HASH (from https://my.telegram.org/apps)
# and ISSUER (your public HTTPS URL). ADMIN_TOKEN is optional but
# recommended — without it admin-only operations on /api/* (stats,
# operator-side session import) return 401.
docker compose -f docker-compose.example.yml up -d --build
The example compose file binds to 127.0.0.1:3000 and does not include
TLS termination. OAuth clients require HTTPS, so put a reverse proxy
in front (Traefik, nginx + certbot, Caddy, managed LB). See
docs/self-hosting.md for the threat model,
hardening checklist, and incident response.
⚠️ The session database stores live MTProto session strings in plaintext. Read
docs/self-hosting.md§Threat model before running this in production.
MCP tools exposed
Cloud whitelists a subset of the upstream tools. All are annotated
readOnlyHint: true or are safe state-changes (mark-as-read, mute).
Read & search
telegram-status— connection statustelegram-list-chats— dialogs with filteringtelegram-read-messages— paginated message readtelegram-search-chats— search chats by name / description / sizetelegram-search-global— full-text search across public chats and channelstelegram-search-messages— full-text search inside a chattelegram-get-unread— unread chats with per-topic breakdown for forums
Chat & member info
telegram-get-chat-info— chat details and metadatatelegram-get-chat-members— group/channel memberstelegram-get-chat-folders— user's chat folderstelegram-list-topics— forum topics with unread countstelegram-read-topic-messages— read messages from a forum topictelegram-get-invite-links— chat invite linkstelegram-get-reactions— message reactions with user details
Profiles & contacts
telegram-get-profile— detailed user profile (bio, photo, last seen, premium)telegram-get-profile-photo— download profile phototelegram-get-contacts— contacts listtelegram-get-contact-requests— incoming non-contact messages
Stickers
telegram-get-sticker-settelegram-search-sticker-setstelegram-get-installed-stickerstelegram-get-recent-stickers
Media
telegram-download-media— download photos and documents
Safe state changes
telegram-mark-as-read— mark a chat as readtelegram-mute-chat— mute notifications
Account info
telegram-get-sessions— list active Telegram sessions
For the full upstream tool catalogue (including send-message,
forward-message, group admin, profile write, etc.), use the CLI
@overpod/mcp-telegram.
Architecture
- Transport: Streamable HTTP (
/mcp) - Auth: OAuth 2.0 (RFC 8414 + 7591 + 7636/PKCE S256)
- Login: QR via MTProto, embedded in OAuth authorize page
- Storage: SQLite (sessions, OAuth tokens, usage log)
- Telegram client:
@overpod/mcp-telegramvia Master/Client IPC — each user runs in an isolated worker - Pages: Hono JSX (landing, OAuth authorize, privacy, terms)
- Observability: structured logs to OTLP HTTP (SigNoz, Grafana
Cloud, etc.), or stderr if
SIGNOZ_ENDPOINTis empty - Deploy: Docker. Production runs Docker Swarm + Traefik.
See docs/architecture.md for the component
map, request lifecycles, and storage layout.
Configuration
All runtime config is environment variables. Required:
TELEGRAM_API_ID, TELEGRAM_API_HASH, ISSUER. ADMIN_TOKEN is
recommended — admin-only operations on /api/* (stats, operator-side
session import) return 401 without it.
Full reference with required-vs-optional flags and change-impact
warnings: docs/configuration.md.
Development
pnpm install
cp .env.example .env
pnpm dev # tsx watch
pnpm test # unit tests (node:test)
pnpm typecheck # tsc --noEmit
pnpm lint # biome
pnpm build # tsc → dist/
The pre-commit hook (husky + biome check --staged) runs Biome on
staged files and gitleaks protect --staged if Gitleaks is installed locally
(brew install gitleaks). The same scan plus TruffleHog runs in CI on
every PR.
Contributing
PRs welcome. Please read CONTRIBUTING.md first —
it covers the cloud-vs-upstream scope split, dev setup, and the
"won't merge" list. By contributing you agree to the
Code of Conduct. See ROADMAP.md
for what's planned, what's deferred, and what's explicitly out of scope.
Tool-level features (new telegram-* MCP tools, MTProto coverage)
belong in the upstream
mcp-telegram repo.
This repo handles hosting concerns: OAuth, multi-user session storage,
rate limiting, landing pages, ops.
Maintenance
Maintained by one person in spare time. Expected response time on issues and PRs: ~2-3 days. No SLA, no paid support tier — but the hosted service is best-effort kept up.
Status updates land via the
@mcp_telegram_cloud_bot Telegram
bot (subscribe via /start).
Security
Vulnerability disclosure: see SECURITY.md. Please
do not open public issues for security problems.
License
MIT © overpod, 2025-2026.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。