Telegram MCP
Provides read-only tools for managing Telegram messages, chats, media, and account resources via the Telethon MTProto client.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Telegram MCPshow my recent chats"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
title: Telegram MCP (personal, read-only) emoji: 📬 colorFrom: blue colorTo: green sdk: docker app_port: 7860 pinned: false license: apache-2.0 short_description: Personal Telegram MCP, read-only, bearer auth
Telegram MCP — personal remote bridge
A self-hosted bridge that exposes chigwell/telegram-mcp (Telethon-based) as a remote MCP server over streamable HTTP.
Userbot — runs under your personal Telegram account via MTProto (Telethon), not the Bot API. No bot needed, no chat to add.
Read-only —
TELEGRAM_EXPOSED_TOOLS=read-only. Only the ~30 read tools are exposed (list chats, read messages, search, download media, etc.). Send/edit/delete/group-admin tools are not registered.Bearer-token gated — Caddy in front of the streamable HTTP server rejects every request without
Authorization: Bearer <MCP_BEARER_TOKEN>.
Endpoint
https://francescomiliani-telegram-mcp.hf.space/mcp (streamable HTTP, MCP spec 2025-03-26).
Required Space secrets
Configure these in the Space's Settings → Variables and secrets:
Name | Value | Where to get it |
| int | |
| string | |
| long base64-ish string | Generate locally with |
| long random string |
|
TELEGRAM_EXPOSED_TOOLS=read-only is set as a default Space variable (not secret).
Connecting from an MCP client
# Claude Code
claude mcp add --transport http telegram \
https://francescomiliani-telegram-mcp.hf.space/mcp \
--header "Authorization: Bearer $MCP_BEARER_TOKEN"
# Codex
codex mcp add telegram \
--url https://francescomiliani-telegram-mcp.hf.space/mcp \
--header "Authorization: Bearer $MCP_BEARER_TOKEN"For stdio-only clients (Claude Desktop, some Windsurf builds), bridge through mcp-remote:
{
"mcpServers": {
"telegram": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://francescomiliani-telegram-mcp.hf.space/mcp",
"--header", "Authorization: Bearer ${MCP_BEARER_TOKEN}"],
"env": { "MCP_BEARER_TOKEN": "<your-token>" }
}
}
}Security
The Space URL is public. The bearer token is the only thing standing between the public internet and your Telegram account.
Treat
TELEGRAM_SESSION_STRINGlike a password — anyone with it can read/write your account.Free HF Spaces sleep after 48h of inactivity. The session is preserved (string-session mode), so the next request just wakes the container and reconnects. Expect a 20–40s cold start.
Architecture
internet ──HTTPS──▶ Caddy :7860 ──(bearer check)──▶ main.py :8765 ──(Telethon/MTProto)──▶ Telegram
│ │
└─ 401 if no/bad bearer └─ streamable HTTP MCP, /mcp endpointThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/francescomiliani/telegram-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server